Moodle

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: 1.8.2, 1.8.3
  • Fix Version/s: 1.8.6, 1.9.2
  • Component/s: Assignment (2.2)
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE, MOODLE_19_STABLE

Description

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;

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

This makes sense for 1.8.x .... not sure if it's valid for 1.9, you'll have to check that closely.

Show
Martin Dougiamas added a comment - This makes sense for 1.8.x .... not sure if it's valid for 1.9, you'll have to check that closely.
Hide
Ann Adamcik added a comment -

It looks like this was fixed by MDL-12889. I've verified that grades are now showing correctly in both 1.8.6 and 1.9.2

Show
Ann Adamcik added a comment - It looks like this was fixed by MDL-12889. I've verified that grades are now showing correctly in both 1.8.6 and 1.9.2

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: