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

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Course, Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      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

        Attachments

          Activity

            People

            • Assignee:
              skodak Petr Skoda
              Reporter:
              skodak Petr Skoda
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Sara Arjona (@sarjona)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10