Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-9221

Quiz completions not marked as red


    • 2022112800

      Quiz completions that are marked as incorrect return as yellow not red.

      We use unlimited resubmissions with manual grading. When graded as incorrect, we expect this to appear as red. Yellow suggests that a new attempt has been submitted?


      I've changed the code with the following which looks to have fixed this issue, however I don't know if that will affect any other logic at this point.

      In classes/completion_progress.php line 575:

      // code placeholder
      foreach ($rset as $compl) {
          $submission = $this->submissions[$compl->userid][$compl->cmid] ?? null;
          if ($compl->completionstate == COMPLETION_INCOMPLETE && $submission && !$submission->graded) {
              $this->completions[$compl->userid][$compl->cmid] = 'submitted';
          } else if ($compl->completionstate == COMPLETION_INCOMPLETE && $submission && $submission->graded) {
              $this->completions[$compl->userid][$compl->cmid] = COMPLETION_COMPLETE_FAIL;
          } else if ($compl->completionstate == COMPLETION_COMPLETE_FAIL && $submission && !$submission->graded) {
              $this->completions[$compl->userid][$compl->cmid] = 'submitted';
          } else {
              $this->completions[$compl->userid][$compl->cmid] = $compl->completionstate;

            jonof Jonathon Fowler
            philippotter Philip Potter
            1 Vote for this issue
            3 Start watching this issue


                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.