Moodle

Various Assignment Types Handle "Time Created" and "Time Modified" In Different Ways

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.8.3, 1.9
  • Fix Version/s: None
  • Component/s: Assignment
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

The bug: Each assignment type has their own, separate code that handles inserting and updating assignment_submission records. Some (assignment_offline) insert the current time for "timecreated" and "timemodified". Others do it differently. It looks as though "prepare_new_submission" in the base assignment class was intended to help here, but it is not being used as intended.

We are trying to put together some numbers for our school administrators to show how long teachers typically take to grade an assignment. Since each type marks the record differently, it's nearly impossible to get accurate numbers for all assignments.

My suggestion would be to keep as much of the standard functionality in the base class and force extended classes to inherit the base functionality. This leaves less room for error/inconsistency in the extended classes. It also would require less code. Another example of this would be in the "assignment_upload" class. It has it's own version of the "view" method that does not extend the base version. Calls like "require_capability('mod/assignment:view', $this->context);" are needlessly duplicated in each class method.

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: