Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-21782 Major 2.0 enrolments rewrite META
  3. MDL-21844

Change meaning of course_categories.visible

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0
    • 2.0
    • Course, Enrolments
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

      The course_parent_visible() in require_login() adds two BD queries on each page, any query dealing with my courses has the same problems with unnecessary nested visibility checks for each course - major problem for paging...

      The solution is to use the course_categories.visible only when browsing category contents - see the original implementation of allowvisiblecoursesinhiddencategories setting.

      Benefits:
      1/ performance
      2/ simplified code
      3/ it is possible to hide courses user is not enrolled in, but still allow access and listing of all my enrolled courses that are not hidden
      4/ hopefully better visualisation of course availability states and more flexibility

      Steps:

      • tweak require_login() and other places that are checking parent categories
      • keep category visibility checks only when browsing course categories
      • implement new category+course hiding/unhiding logic - needs new visibleold flag in course and course_categories table

            skodak Petr Skoda
            skodak Petr Skoda
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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