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

Missing categories (and PHP notices raised) in course prerequisite select (Course completion form)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 3.3.7
    • Course completion
    • MOODLE_33_STABLE

      There is an issue when a user has the capability moodle/course:update, and hence can view/edit the completions settings for a course, but does not have the capability moodle/category:viewhiddencategories.

      The list of courses generated for the 'criteria_course' field (course prerequisites) may not have all category info prepended to each course correctly and PHP notices may be raised.

      In this case the course list isn't restricted in the same way as the category list is (rightly so, i believe) and it looks like there possibly needs to be a way to force the make_categories_list() function to ignore the moodle/category:viewhiddencategories check (but it's a little more complex than just that due to the caching).

      An example would be a user who is an 'editingteacher'.

      Discovered in 3.3.7 and looks to be an issue right through to master.

      I'm happy to pick this up myself and propose a potential solution for review.

            Unassigned Unassigned
            xantico-simon Simon Lewis
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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