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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 3.3.7
    • None
    • Course completion
    • MOODLE_33_STABLE

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              xantico-simon Simon Lewis
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: