Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Duplicate
-
Affects Version/s: 1.8.2, 1.8.3
-
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
| This issue will be resolved by: | ||||
| MDL-12889 | Bad capability check in assignment recent activity |
|
|
|
This makes sense for 1.8.x .... not sure if it's valid for 1.9, you'll have to check that closely.