Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S2U-34 Assignments add rubric support for peer review #11950

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

stetsche
Copy link
Contributor

@stetsche stetsche commented Sep 27, 2023

@bgarciaentornos
Copy link
Contributor

Thanks! 5 years since the original development and after more than a few updates, this might make it to master!

@ern ern changed the title S2U-34 Assignments + Rubrics: peer review, self review and group peer S2U-34 Assignments add rubric support for peer review Sep 27, 2023
Comment on lines +66 to +70
@Getter @Setter private ScheduledInvocationManager scheduledInvocationManager;
@Getter @Setter protected AssignmentService assignmentService;
@Getter @Setter private SecurityService securityService = null;
@Getter @Setter private SessionManager sessionManager;
@Getter @Setter private SiteService siteService;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most of the time you only need Setter for services

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we can remove the getters, right @bgarciaentornos?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Markus @stetsche, I think we can remove them, however, I'm not a big fan of changing code that is working and has been verified, even if they are simple and small changes. Let's take advantage of the effort spent on this, this is running in production for many years right now.

I prefer to not introduce differences between Master and the 22.x version of the feature, we did that in the past and that practices almost killed all of our rubrics features, this has been around for five years and we want to be consistent between versions.

Let's stick with what it is in 22.x please.

@mpellicer
Copy link

Does this need a conversion script for 24?

@stetsche
Copy link
Contributor Author

stetsche commented Oct 4, 2023

It seems to work without, but I'll create a PR for it as well.

@bgarciaentornos
Copy link
Contributor

It does need a conversion script, forgot to mention it initially

@stetsche stetsche requested a review from mpellicer October 6, 2023 12:49
@stetsche stetsche marked this pull request as ready for review October 6, 2023 12:49
// If the assignment reference is not equal to the associated gradebook item, then a custom gb item is being used
if (!assignmentRef.equals(assignmentAssociateGradebook)) {
try {
org.sakaiproject.grading.api.Assignment gbAssignment = gradingService.getAssignment(gradebookUid,
Copy link

@mpellicer mpellicer Oct 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put a comment about what differences are between Master and 22.x, what lines we replaced, etc. Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic between master and 22 here should work the same.
On 22.x an org.sakaiproject.service.gradebook.shared.Assignment object is retrieved from the GradebookService if it's null we don't set the context variables.
For the master an org.sakaiproject.service.gradebook.shared.Assignment object is retrieved from the GradingService, if an AssessmentNotFoundException (yes Assessment) thrown, the variables are not added to the context.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But put a comment int the source! :D

@mpellicer
Copy link

Please put comments in the relevant parts where there are differences between 22.x and Master.

Copy link
Contributor Author

@stetsche stetsche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpellicer I added a few comments related to the migration.


if (StringUtils.isBlank(id)) return false;

return associationRepository.findByToolIdAndItemId(tool, id).filter(canEvaluate.or(canEdit).or(isCreator)).isPresent();
return getRubricAssociation(tool, id).isPresent();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like in the s2u22x version this will bypass the permission check

// If the assignment reference is not equal to the associated gradebook item, then a custom gb item is being used
if (!assignmentRef.equals(assignmentAssociateGradebook)) {
try {
org.sakaiproject.grading.api.Assignment gbAssignment = gradingService.getAssignment(gradebookUid,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic between master and 22 here should work the same.
On 22.x an org.sakaiproject.service.gradebook.shared.Assignment object is retrieved from the GradebookService if it's null we don't set the context variables.
For the master an org.sakaiproject.service.gradebook.shared.Assignment object is retrieved from the GradingService, if an AssessmentNotFoundException (yes Assessment) thrown, the variables are not added to the context.

Long associateGradebookAssignmentId = gbAssignment.getId();
context.put("associatedToGbItem", true);
context.put("associatedToGbEntityId", associateGradebookAssignmentId);
} catch (AssessmentNotFoundException e) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wtf

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AssessmentNotFoundException has been in edu-services forever. To the grading service, Assignment = Assessment. Go figure.

@mpellicer
Copy link

Terrific work guys, I want to thank you all involved in this piece of work for five years, it's been a long journey but it's definitely contributed. @bgarciaentornos @stetsche @MRutea @josecebe and Manu Fuster.

@mpellicer mpellicer merged commit e0330bf into sakaiproject:master Oct 10, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants