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

Make build_navigation more helpful by having it optionally build the activity and activityinstance links too

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I want to enhance build navigation so that it can take an optional $cm object parameter, and if this is passed in, then automatically build the 'Forums' and 'General Developer Forum' (for example) navigation links.

      This requires that $cm was obtained using get_coursemodule_from_instance or get_coursemodule_from_id functions, so the $cm->modname and $cm->name fields are present. If they are missing, build_navigation will get them at the cost of two more DB queries, and print a developer debug message.

      The attached patch implements the improvements in build_navigation. I would like to check this into Moodle 1.9 (I need it to make some OU-internal customisation easier), but leave updating all the callers until Moodle 2.0.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              timhunt Tim Hunt
              Tester:
              Nobody
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08