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

Manage courses and categories: 'courses' tab produce error for course creator

    XMLWordPrintable

Details

    Description

      An error happen when users with 'moodle/course:create'  and without 'moodle/category:manage' capability select the "courses" tab of "Manage courses and categories". That's the case for users with "course creator" role. Here is the Exception message:

      Exception - url_select::__construct(): Argument #1 ($urls) must be of type array, null given, called in [dirroot]/course/classes/output/manage_categories_action_bar.php on line 116

       

      Step to reproduce the problem:

      1. Create new user
      2. Assign "course creator" system role the new user
      3. logout
      4. login with the new account
      5. go to the "Site administration"
      6. Select "courses" tab
      7.  Follow the "Manage courses and categories" link
      8. In the category tab (page), select "courses" option from the "course categories and courses" box
      9. An error shoud show up. : Exception - url_select::__construct(): Argument #1 ($urls) must be of type array, null given

       

      This error happen on version 4.1, and 4.3. It should happen in 4.2 too because the code didn't change.

       

      To solve the problem: 
      $options variable should be initialised outside the loop "for" of the "get_category_select" methode in file course/classes/output/manage_categories_action_bar.php 

      Attachments

        Issue Links

          Activity

            People

              jtsheke Johnny Tsheke
              jtsheke Johnny Tsheke
              Meirza Meirza
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Kim Jared Lucas Kim Jared Lucas
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 3 minutes
                  2h 3m

                  Clockify

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