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

Bad capability check in assignment recent activity

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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 (2.2)
    • 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()

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              poltawski Dan Poltawski added a comment -

              fixed in CVS

              Show
              poltawski Dan Poltawski added a comment - fixed in CVS
              Hide
              aborrow 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
              aborrow 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
              poltawski Dan Poltawski added a comment -

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

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

              Should be fixed in 1.7/1.8 now too, thanks

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

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

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

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Jan/08