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

Assignment grades don't show when teachers view Recent Activity page - undefined capability moodle/course:viewrecent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • 1.8.6, 1.9.2
    • 1.8.2, 1.8.3
    • Assignment (2.2)
    • None
    • MOODLE_18_STABLE
    • MOODLE_18_STABLE, MOODLE_19_STABLE

      In mod/assignment/lib.php, the function assignment_print_recent_mod_activity() includes a check for "moodle/course:viewrecent" to determine whether or not to print assignment grades on the course Recent Activity page. This capability doesn't seem to exist, so grades are only showing up when viewed by an admin. This should be changed to a valid capability so that course instructors will see grades as well.

      Index: lib.php
      ===================================================================
      RCS file: /cvsroot/moodle/moodle/mod/assignment/lib.php,v
      retrieving revision 1.219.2.17
      diff -c -r1.219.2.17 lib.php

          • lib.php 24 Sep 2007 06:32:19 -0000 1.219.2.17
          • lib.php 30 Oct 2007 16:52:21 -0000
            ***************
          • 2177,2183 ****

      }

      ! if (has_capability('moodle/course:viewrecent', get_context_instance(CONTEXT_COURSE, $course)))

      { $grades = "(" . $activity->content->grade . " / " . $activity->content->maxgrade . ") "; $assignment->id = $activity->instance; --- 2150,2156 ---- }

      ! if (has_capability('moodle/course:viewcoursegrades', get_context_instance(CONTEXT_COURSE, $course))) {
      $grades = "(" . $activity->content->grade . " / " . $activity->content->maxgrade . ") ";

      $assignment->id = $activity->instance;

            adamann2 Ann Adamcik (Inactive)
            adamann2 Ann Adamcik (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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