Skip to content

Commit

Permalink
SAK-50724 rubric Implement archive/merge
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish committed Dec 9, 2024
1 parent 9cda702 commit 907d3e7
Show file tree
Hide file tree
Showing 12 changed files with 455 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ protected String archiveSite(Site site, Document doc, Stack stack, String fromSy

if ( pattern != null ) {
NodeList nl = siteNode.getElementsByTagName("property");
List<Element> toRemove = new ArrayList<Element>();
List<Element> toRemove = new ArrayList<>();

for(int i = 0; i < nl.getLength(); i++) {
Element proptag = (Element)nl.item(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<value>DiscussionForumService</value>
<value>WebService</value>
<value>LessonBuilderEntityProducer</value>
<value>rubrics</value>
</list>
</property>
<property name="mergeFilteredSakaiRoles">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@
# archive.merge.filter.services=false

# List of data service types that can merge in data from an archive
# DEFAULT: AnnouncementService,AssignmentService,ContentHostingService,CalendarService,ChatEntityProducer,DiscussionService,MailArchiveService,SyllabusService,RWikiObjectService,DiscussionForumService,WebService,LessonBuilderEntityProducer
# DEFAULT: AnnouncementService,AssignmentService,ContentHostingService,CalendarService,ChatEntityProducer,DiscussionService,MailArchiveService,SyllabusService,RWikiObjectService,DiscussionForumService,WebService,LessonBuilderEntityProducer,RubricsService
# archive.merge.filtered.services={list of service names}

# Controls if user role filtering is enabled. If enabled, any user roles not in the list cannot archive or merge data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,27 @@

public interface RubricsConstants {

public static final String RBCS_TOOL = "sakai.rubrics";
public static final String RBCS_TOOL_ASSIGNMENT_GRADES = "sakai.assignment.grades";
public static final String RBCS_TOOL_FORUMS = "sakai.forums";
public static final String RBCS_TOOL_GRADEBOOKNG = "sakai.gradebookng";
public static final String RBCS_TOOL_SAMIGO = "sakai.samigo";
public static final String RBCS_TOOL_LESSONBUILDERTOOL = "sakai.lessonbuildertool";
public static final String RBCS_TOOL = "sakai.rubrics";
public static final String RBCS_TOOL_ASSIGNMENT_GRADES = "sakai.assignment.grades";
public static final String RBCS_TOOL_FORUMS = "sakai.forums";
public static final String RBCS_TOOL_GRADEBOOKNG = "sakai.gradebookng";
public static final String RBCS_TOOL_SAMIGO = "sakai.samigo";
public static final String RBCS_TOOL_LESSONBUILDERTOOL = "sakai.lessonbuildertool";

public static final String RBCS_PREFIX = "rbcs-";
public static final String RBCS_CONFIG_PREFIX = "config-";
public static final String RBCS_CONFIG = RBCS_PREFIX + RBCS_CONFIG_PREFIX;
public static final String RBCS_MULTIPLE_OPTIONS_CONFIG = RBCS_PREFIX + "multiple-options-config-";
public static final String RBCS_ASSOCIATION_STATE_DETAILS = RBCS_PREFIX + "state-details";
public static final String RBCS_ASSOCIATE_SUFFIX = "associate";
public static final String RBCS_ASSOCIATE = RBCS_PREFIX + RBCS_ASSOCIATE_SUFFIX;// values: 0 or empty no association, 1 regular association, 2 dynamic rubric in Samigo
public static final String RBCS_LIST_SUFFIX = "rubricslist";
public static final String RBCS_LIST = RBCS_PREFIX + RBCS_LIST_SUFFIX;
public static final String RBCS_SOFT_DELETED = RBCS_PREFIX + "soft-deleted";
public static final String RBCS_ASSESSOR_ID = "assessorId";
public static final String RBCS_HAS_ASSOCIATED_RUBRIC = "hasAssociatedRubric";
public static final String RBCS_STUDENT_SELF_REPORT = "studentSelfReport";
public static final String RBCS_STUDENT_SELF_REPORT_MODE = "studentSelfReportMode";
public static final String RBCS_PREFIX = "rbcs-";
public static final String RBCS_CONFIG_PREFIX = "config-";
public static final String RBCS_CONFIG = RBCS_PREFIX + RBCS_CONFIG_PREFIX;
public static final String RBCS_MULTIPLE_OPTIONS_CONFIG = RBCS_PREFIX + "multiple-options-config-";
public static final String RBCS_ASSOCIATION_STATE_DETAILS = RBCS_PREFIX + "state-details";
public static final String RBCS_ASSOCIATE_SUFFIX = "associate";
public static final String RBCS_ASSOCIATE = RBCS_PREFIX + RBCS_ASSOCIATE_SUFFIX;// values: 0 or empty no association, 1 regular association, 2 dynamic rubric in Samigo
public static final String RBCS_LIST_SUFFIX = "rubricslist";
public static final String RBCS_LIST = RBCS_PREFIX + RBCS_LIST_SUFFIX;
public static final String RBCS_SOFT_DELETED = RBCS_PREFIX + "soft-deleted";
public static final String RBCS_ASSESSOR_ID = "assessorId";
public static final String RBCS_HAS_ASSOCIATED_RUBRIC = "hasAssociatedRubric";
public static final String RBCS_STUDENT_SELF_REPORT = "studentSelfReport";
public static final String RBCS_STUDENT_SELF_REPORT_MODE = "studentSelfReportMode";

public static final String RBCS_PERMISSIONS_EVALUATOR = "rubrics.evaluator";
public static final String RBCS_PERMISSIONS_EDITOR = "rubrics.editor";
Expand All @@ -53,12 +53,13 @@ public interface RubricsConstants {

public static final String RBCS_EXPORT_PDF = "rubrics.export.pdf";

//samigo custom props
public static final String RBCS_PUBLISHED_ASSESSMENT_ENTITY_PREFIX = "pub.";
//samigo custom props
public static final String RBCS_PUBLISHED_ASSESSMENT_ENTITY_PREFIX = "pub.";

//forums custom props
public static final String RBCS_FORUM_ENTITY_PREFIX = "for.";
public static final String RBCS_TOPIC_ENTITY_PREFIX = "top.";
public static final String RBCS_MSG_ENTITY_PREFIX = "msg.";

//forums custom props
public static final String RBCS_FORUM_ENTITY_PREFIX = "for.";
public static final String RBCS_TOPIC_ENTITY_PREFIX = "top.";
public static final String RBCS_MSG_ENTITY_PREFIX = "msg.";

public static final String LINE_SEPARATOR = System.getProperty("line.separator");
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import java.util.Optional;

import org.sakaiproject.entity.api.Entity;
import org.sakaiproject.entity.api.EntityProducer;
import org.sakaiproject.rubrics.api.beans.AssociationTransferBean;
import org.sakaiproject.rubrics.api.beans.CriterionTransferBean;
import org.sakaiproject.rubrics.api.beans.EvaluationTransferBean;
Expand All @@ -37,7 +38,7 @@
import org.sakaiproject.rubrics.api.model.Rubric;
import org.sakaiproject.rubrics.api.model.ToolItemRubricAssociation;

public interface RubricsService {
public interface RubricsService extends EntityProducer {

public static final String REFERENCE_ROOT = Entity.SEPARATOR + "rubrics";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public class Rubric implements PersistableEntity<Long>, Serializable, Cloneable
@GeneratedValue(strategy = GenerationType.AUTO, generator ="rbc_seq" )
private Long id;

@Column(nullable = false)
private String title;

private Boolean weighted = Boolean.FALSE;
Expand All @@ -81,14 +82,15 @@ public class Rubric implements PersistableEntity<Long>, Serializable, Cloneable
@OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true, mappedBy = "rubric")
private List<ToolItemRubricAssociation> associations = new ArrayList<>();

private Instant created;
@Column(nullable = false)
private Instant created = Instant.now();

private Instant modified;

@Column(length = 99)
@Column(length = 99, nullable = false)
private String ownerId;

@Column(length = 99)
@Column(length = 99, nullable = false)
private String creatorId;

private Boolean shared = Boolean.FALSE;
Expand Down
5 changes: 5 additions & 0 deletions rubrics/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,11 @@
<groupId>org.sakaiproject.edu-services.sections</groupId>
<artifactId>sections-api</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.common</groupId>
<artifactId>archive-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Loading

0 comments on commit 907d3e7

Please sign in to comment.