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

Unknown Category Error for Visible Course in Hidden Category

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.4.1
    • 3.4, 3.4 regressions
    • Calendar
    • MOODLE_34_STABLE
    • MOODLE_34_STABLE
    • MDL-60806-master
    • Hide
      1. Login as admin
      2. Navigate to "Site administration / Courses / Add a category"
      3. Create a category "Special Category" as top-level category
      4. Set "Special Category" as hidden
      5. Create a course in "Special Category"
      6. Set course start and end dates so the course is current (start date in past, end date in future)
      7. Enrol a user as student in the course just created
      8. Go back to the course page.
      9. Turn editing on and add the Calendar block to the course
      10. Log in as a student and go to the course.
      11. Make sure you do not get the reported error
      Show
      Login as admin Navigate to " Site administration / Courses / Add a category " Create a category "Special Category" as top-level category Set "Special Category" as hidden Create a course in "Special Category" Set course start and end dates so the course is current (start date in past, end date in future) Enrol a user as student in the course just created Go back to the course page. Turn editing on and add the Calendar block to the course Log in as a student and go to the course. Make sure you do not get the reported error

       

      Environment:

      • Moodle 3.4 (2017111300.00)
      • Ubuntu 16 LTS
      • PHP 7.0 (PHP-FPM via proxy_fcgi)
      • Apache2

      Steps to replicate:

      Install Moodle 3.4 (2017111300.00) (no additional themes or plugins of any kind, configuration all default except site name), then:

      1. Create category "Special Category" as top-level category
      2. Set "Special Category" as hidden
      3. Create course in "Special Category"
      4. Set course start and end dates so the course is current (start date in past, end date in future)
      5. Create user "Student User"
      6. Enrol Student User in the course just created
      7. As the site admin user add the Calendar block to the course just created
      8. As the Student User login. You should see the course in your current courses in the Dashboard and it should be visible in the drawer menu
      9. Attempt to view the course as the Student User

      Result: You get the "Unknown category" error.

      Expected: You can view the course as the student user.

      Additional Notes:

      If you skip step #7 (adding calendar block to the course), then the student is able to view the course without error.

      In Moodle 3.3.1 (2017051501.00) this error does not occur.

      I'm aware of MDL-47231 which was ruled as "not a bug" but this case is not the same.

      If you enrol another user as a teacher in the same course, you get the same unknown category error.

      Even after setting moodle/category:viewhiddencategories to Allow for the Teacher role, the teacher continues to get the same error.

            lameze Simey Lameze
            pennedav David Penner
            Shamim Rezaie Shamim Rezaie
            Damyon Wiese Damyon Wiese
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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