Skip to content

Commit 0581b72

Browse files
palves-ulhtjoao-marques-a22108693
authored andcommitted
link to the assignment's github page on the assignment detail and the build report should only be available to teachers
1 parent 712d751 commit 0581b72

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/kotlin/org/dropProject/dao/ProjectGroupRestrictions.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.dropProject.dao
22

3+
import javax.persistence.Column
34
import javax.persistence.Entity
45
import javax.persistence.GeneratedValue
56
import javax.persistence.Id
@@ -12,6 +13,8 @@ data class ProjectGroupRestrictions(
1213

1314
var minGroupSize: Int = 1,
1415
var maxGroupSize: Int? = null,
16+
17+
@Column(length = 1000)
1518
var exceptions: String? = null // comma separated list of users that are exempt from the restrictions
1619
) {
1720

src/main/resources/templates/build-report.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
<h1 class="page-header" th:text="'Build report for submission ' + ${submission.id}"></h1>
2525
<h6>
26-
Assignment: <a th:href="${assignment.linkToGithub()}" th:text="${assignment.id}"></a> |
26+
Assignment: <a th:if="${isTeacher}" th:href="${assignment.linkToGithub()}" th:text="${assignment.id}"></a>
27+
<span th:if="${!isTeacher}" th:text="${assignment.id}"></span> |
2728
Submitted: <span th:text="${#dates.format(submission.submissionDate, 'dd-MM HH:mm:ss')}"></span>
2829
<a th:if="${isTeacher}"
2930
th:href="@{'/submissions?assignmentId=' + ${assignment.id} + '&groupId=' + ${submission.group.id}}">(other submissions)</a>

0 commit comments

Comments
 (0)