Skip to content

Commit

Permalink
S2U-32 S2U-28 Assignments and Messages: Tag support
Browse files Browse the repository at this point in the history
  • Loading branch information
4 people committed Jan 3, 2024
1 parent 527176f commit 4300b2a
Show file tree
Hide file tree
Showing 96 changed files with 15,245 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ public final class AssignmentConstants {
public static final String NEW_ASSIGNMENT_REVIEW_SERVICE_EXCLUDE_VALUE = "exclude_value";
public static final String SUBMISSION_REVIEW_SERVICE_EULA_AGREEMENT = "review_service_eula_agreement";
public static final String SUBMISSION_REVIEW_CHECK_SERVICE_EULA_AGREEMENT = "review_check_service_eula_agreement";
public static final String NEW_ASSIGNMENT_TAG_CREATOR = "tag_creator";
public static final String NEW_ASSIGNMENT_TAG_GROUPS = "tag_groups";
public static final String SHOW_TAGS_STUDENT = "show_tags_student";

private AssignmentConstants() {
throw new RuntimeException(this.getClass().getCanonicalName() + " is not to be instantiated");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -891,5 +891,7 @@ public String getDeepLinkWithPermissions(String context, String assignmentId, bo
public String getContentReviewServiceName();

public String getAssignmentModifier(String modifier);

public boolean allowAddTags(String context);

}
10 changes: 10 additions & 0 deletions assignment/api/src/resources/assignment.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1275,3 +1275,13 @@ autoevaluation=Autoevaluation:
instructor_grading=Instructor Grading:
reviewrubric=This is a self-report assignment. You can check your self-report before grading.
reviewrubricreport=This is your self-report.

#S2U-32
tags_header=Tags
tags_groups=Add tags for selected groups automatically.
tags_instructor=Add tag for assignment creator automatically.
tags_note=Note: they will not appear in the select component when editing
tags_search=Search using tags
tags_option_students=Show tags to students
tags_option_students_default=Default (hide tags to students)
tags_option_students_yes=Show tags to students and allow them to use the filter component
10 changes: 10 additions & 0 deletions assignment/api/src/resources/assignment_ca.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1273,3 +1273,13 @@ autoevaluation=Autoevaluaci\u00f3:
instructor_grading=Correcci\u00f3 del profesor:
reviewrubric=Aquesta tasca \u00E9s autoavaluable. Pot revisar la autoavaluaci\u00F3 abans d'enviar-la.
reviewrubricreport=Aquesta \u00E9s la teva autoavaluaci\u00F3.

#S2U-32
tags_header=Etiquetes
tags_groups=Afegir autom\u00e0ticament etiquetes per als grups seleccionats.
tags_instructor=Afegir autom\u00e0ticament etiqueta per a l'autor.
tags_note=Nota: no apareixeran al selector al editar
tags_search=Cercar usant etiquetes
tags_option_students=Mostrar etiquetes als estudiants
tags_option_students_default=Predeterminat (ocultar etiquetes als estudiants).
tags_option_students_yes=Mostrar etiquetes als estudiantes i permetre'ls usar el filtre.
10 changes: 10 additions & 0 deletions assignment/api/src/resources/assignment_es.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1266,3 +1266,13 @@ autoevaluation=Autoevaluaci\u00f3n:
instructor_grading=Correcci\u00f3n del profesor:
reviewrubric=Esta tarea es autoevaluable. Puedes revisar tu autoevaluaci\u00f3n antes de enviarla.
reviewrubricreport=Esta es tu autoevaluaci\u00f3n.

#S2U-32
tags_header=Etiquetas
tags_groups=A\u00f1adir autom\u00e1ticamente etiquetas para los grupos seleccionados.
tags_instructor=A\u00f1adir autom\u00e1ticamente etiquetas para el autor.
tags_note=Nota: no aparecer\u00e1n en el selector al editar
tags_search=Buscar usando etiquetas
tags_option_students=Mostrar etiquetas a los estudiantes.
tags_option_students_default=Por defecto (ocultar etiquetas a los estudiantes).
tags_option_students_yes=Mostrar etiquetas a los estudiantes y permitirles el uso del filtro.
10 changes: 10 additions & 0 deletions assignment/api/src/resources/assignment_eu.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1278,3 +1278,13 @@ autoevaluation=Autoebaluazioa:
instructor_grading=Irakaslearen zuzenketa:
reviewrubric=Zeregin hau autoebaluagarria da. Zure ebaluazioa berrikusi dezakezu bidali baino lehen.
reviewrubricreport=Hau da zure ebaluazioa.

#S2U-32
tags_header=Etiketak
tags_groups=Etiketak gehitu automatikoki hautatutako taldeentzat.
tags_instructor=Etiketak gehitu automatikoki egilearentzat.
tags_note=Oharra: editatzean ez dira hautagailuan agertuko
tags_search=Bilaketa egin etiketak erabiliz
tags_option_students=Erakutsi etiketak ikasleei.
tags_option_students_default=Lehenetsia (ezkutatu etiketak ikasleei).
tags_option_students_yes= Erakutsi etiketak ikasleei eta baimendu erabiltzea iragazkia
4 changes: 4 additions & 0 deletions assignment/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
<groupId>org.sakaiproject.search</groupId>
<artifactId>search-api</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.tags</groupId>
<artifactId>tags-api</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
import org.sakaiproject.site.api.ToolConfiguration;
import org.sakaiproject.taggable.api.TaggingManager;
import org.sakaiproject.taggable.api.TaggingProvider;
import org.sakaiproject.tags.api.TagService;
import org.sakaiproject.tasks.api.Priorities;
import org.sakaiproject.tasks.api.Task;
import org.sakaiproject.tasks.api.TaskService;
Expand Down Expand Up @@ -241,6 +242,7 @@ public class AssignmentServiceImpl implements AssignmentService, EntityTransferr
@Resource private UserMessagingService userMessagingService;
@Setter private UserTimeService userTimeService;
@Setter private TimeSheetService timeSheetService;
@Setter private TagService tagService;

private boolean allowSubmitByInstructor;
private boolean exposeContentReviewErrorsToUI;
Expand Down Expand Up @@ -1114,6 +1116,12 @@ public Assignment addDuplicateAssignment(String context, String assignmentId) th
log.error("Error while trying to duplicate Rubrics: {} ", e.getMessage());
}

// copy tags
if (serverConfigurationService.getBoolean("tagservice.enable.integrations", true)) {
List<String> tagIds = tagService.getTagAssociationIds(assignment.getContext(), assignmentId);
tagService.updateTagAssociations(assignment.getContext(), assignment.getId(), tagIds, true);
}

String reference = AssignmentReferenceReckoner.reckoner().assignment(assignment).reckon().getReference();
// event for tracking
eventTrackingService.post(eventTrackingService.newEvent(AssignmentConstants.EVENT_ADD_ASSIGNMENT, reference, true));
Expand Down Expand Up @@ -5090,4 +5098,9 @@ public String getAssignmentModifier(String modifier) {
}
}

@Override
public boolean allowAddTags(String context) {
String resourceString = AssignmentReferenceReckoner.reckoner().context(context).reckon().getReference();
return permissionCheck(TagService.TAGSERVICE_MANAGE_PERMISSION, resourceString, null);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import org.sakaiproject.search.api.SearchService;
import org.sakaiproject.site.api.SiteService;
import org.sakaiproject.springframework.orm.hibernate.AdditionalHibernateMappings;
import org.sakaiproject.tags.api.TagService;
import org.sakaiproject.tasks.api.TaskService;
import org.sakaiproject.taggable.api.TaggingManager;
import org.sakaiproject.time.api.TimeService;
Expand Down Expand Up @@ -329,4 +330,9 @@ public UserMessagingService userMessagingService() {
public TimeSheetService timeSheetService() {
return mock(TimeSheetService.class);
}

@Bean(name = "org.sakaiproject.tags.api.TagService")
public TagService tagService() {
return mock(TagService.class);
}
}
1 change: 1 addition & 0 deletions assignment/impl/src/webapp/WEB-INF/components.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<property name="userDirectoryService" ref="org.sakaiproject.user.api.UserDirectoryService"/>
<property name="userTimeService" ref="org.sakaiproject.time.api.UserTimeService"/>
<property name="timeSheetService" ref="org.sakaiproject.timesheet.api.TimeSheetService"/>
<property name="tagService" ref="org.sakaiproject.tags.api.TagService"/>
</bean>

<bean id="org.sakaiproject.assignment.impl.AssignmentContentProducer"
Expand Down
4 changes: 4 additions & 0 deletions assignment/tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@
<groupId>org.sakaiproject.rubrics</groupId>
<artifactId>rubrics-api</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.tags</groupId>
<artifactId>tags-api</artifactId>
</dependency>
<!-- ScoringService integration -->
<dependency>
<groupId>org.sakaiproject.edu-services.scoringservice</groupId>
Expand Down
Loading

0 comments on commit 4300b2a

Please sign in to comment.