Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-22410

The $grader variable is defined twice in "quiz_get_recent_mod_activity" in mod/quiz/lib.php

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.8
    • Fix Version/s: 1.9.9
    • Component/s: Quiz
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Notice how the $grader variable is defined twice in a row in the "quiz_get_recent_mod_activity" function:

      $context = get_context_instance(CONTEXT_MODULE, $cm->id);
      $grader = has_capability('moodle/grade:viewall', $context);
      $accessallgroups = has_capability('moodle/site:accessallgroups', $context);
      $viewfullnames = has_capability('moodle/site:viewfullnames', $context);
      $grader = has_capability('mod/quiz:grade', $context);
      $groupmode = groups_get_activity_groupmode($cm, $course);

      I'm assuming the second one is correct, meaning the first could simply be deleted.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            timhunt Tim Hunt added a comment -

            Thank you very much for finding this. Actually, I think it should be checking mod/quiz:viewreports.

            Show
            timhunt Tim Hunt added a comment - Thank you very much for finding this. Actually, I think it should be checking mod/quiz:viewreports.

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  8/Jun/10