Moodle

Bad capability check in assignment recent activity

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7.3, 1.8.3, 1.9
  • Fix Version/s: 1.7.4, 1.8.4, 1.9, 2.0
  • Component/s: Assignment
  • Labels:
    None
  • Affected Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE

Description

Capability "moodle/course:viewrecent" was not found! This should be fixed in code.

  • line 333 of lib/accesslib.php: call to debugging()
  • line 2483 of mod/assignment/lib.php: call to has_capability()
  • line 286 of course/recent.php: call to assignment_print_recent_mod_activity()

Issue Links

Activity

Hide
Dan Poltawski added a comment -

fixed in CVS

Show
Dan Poltawski added a comment - fixed in CVS
Hide
Anthony Borrow added a comment -

After seeing Dan's commits and trying to make sure that things get properly merged back into the 18STABLE and 17STABLE branches, I did a search of the code for course:viewrecent in both 17STABLE and 18STABLE and only found the result in /mod/assignment/lib.php. I applied the patch used for 19STABLE and HEAD and committed; however, then I realized that the grade:viewall might be new. I searched for grade:viewall and not finding it elsewhere thought it best to simply undo the commit, reopen this issue, and tag it as affecting Moodle versions 1.7 and 1.8 so that Dan can determine the best way to address it those versions. Peace - Anthony

Show
Anthony Borrow added a comment - After seeing Dan's commits and trying to make sure that things get properly merged back into the 18STABLE and 17STABLE branches, I did a search of the code for course:viewrecent in both 17STABLE and 18STABLE and only found the result in /mod/assignment/lib.php. I applied the patch used for 19STABLE and HEAD and committed; however, then I realized that the grade:viewall might be new. I searched for grade:viewall and not finding it elsewhere thought it best to simply undo the commit, reopen this issue, and tag it as affecting Moodle versions 1.7 and 1.8 so that Dan can determine the best way to address it those versions. Peace - Anthony
Hide
Dan Poltawski added a comment -

Thanks Anthony - viewall has moved from moodle/course:viewcoursegrades, so i'll apply that capability check

Show
Dan Poltawski added a comment - Thanks Anthony - viewall has moved from moodle/course:viewcoursegrades, so i'll apply that capability check
Hide
Dan Poltawski added a comment -

Should be fixed in 1.7/1.8 now too, thanks

Show
Dan Poltawski added a comment - Should be fixed in 1.7/1.8 now too, thanks
Hide
Martin Dougiamas added a comment -

Looks good ... moodle/course:viewcoursegrades for < 1.9 and moodle/grade:viewall for >= 1.9

Show
Martin Dougiamas added a comment - Looks good ... moodle/course:viewcoursegrades for < 1.9 and moodle/grade:viewall for >= 1.9

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: