Skip to content

Error in resurrect achievement items when reduced scoring is enabled #2907

@dlglin

Description

@dlglin

There is an error in the logic for the ResurrectHW and ResurrectGW achievement items:

sub can_use($self, $set, $records) {
return $set->assignment_type eq 'default'
&& (after($set->due_date) || ($set->reduced_scoring_date && after($set->reduced_scoring_date)));
}

This says that if there is a reduced scoring period, then the student can use the item during that period. This is problematic because it then sets the due date to be 24 hours from the current time.

Consider the following scenario: the reduced scoring date was yesterday, and the close date is in a week. Currently if a student uses a resurrect item on the set, it will set both the reduced scoring date and the close date to tomorrow, so although the student will get an extra 24 hours at full credit, they will lose the rest of the week that they used to have for reduced scoring.

What would be the desired behaviour here? My first thought is to say that students should only be able to use resurrect items on sets that are completely closed, and if they do they will get 24 hours at full credit, with no additional reduced scoring period.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions