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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9.8
    • 1.9.9
    • Quiz
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE
    • Easy

    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.

      Attachments

        Activity

          People

            timhunt Tim Hunt
            bryce Bryce Thornton
            Nobody Nobody
            Tim Hunt, Amaia Anabitarte, Bas Brands, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Kevin Percy, Laurent David, Mathew May, Mihail Geshoski, Sabina Abellan, Sara Arjona (@sarjona), Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              8/Jun/10