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

No 'View all courses' entry in AJAX-built navigation block category list

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Navigation
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      When a category has >=20 courses in it and the user navigates down the category tree, no "View all courses" link is included for a category if the data for the subtree is being fetched using AJAX requests. For comparison, when the tree is built at page render time, for example if a course within one of these categories is being viewed, the "View all courses" link is there.

      The patch at https://github.com/jonof/moodle/commit/c683165a4ad0a15f925d44d48dd393cd2abb509b implements a solution for this problem.

      There is already code in blocks/navigation/yui/navigation/navigation.js in the addChild() function that adds the 'view all courses' link if a category was passed in, but this code is never run because the loop in ajaxProcessResponse() is calling addChild() for each course entry. To reduce redundancy I moved this code to a new function that is called by addChild() and ajaxProcessResponse().

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/May/11