Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-11573 META: New gradebook bugs reported by OU
  3. MDL-11580

Quiz grade reports need to be hidden from tutors while the quiz is open

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.9
    • 1.9
    • Gradebook, Quiz
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      After some thought, we need to hack the quiz with an open-university-specific hack. We can control this using a $CFG->openuniversityhacks = true in config.php

      The idea is to disallow "tutors" from seeing all the grades (reports) in a quiz until the quiz has finished.

      So, we basically need to add a bit of logic like this:

      $canviewhidden = has_capability('moodle/grade:viewhidden', get_context_instance(CONTEXT_COURSE, $this->course->id));

      if (isset($CFG->openuniversityhacks) && !$canviewhidden && $quiz->timeclose && $quiz->timeclose > time() ) {
      // FORCE THE QUIZ TO APPEAR AS FOR A STUDENT (NO EDIT, NO GRADE VIEW, NO REPORTS etc)
      }

            skodak Petr Skoda
            dougiamas Martin Dougiamas
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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