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

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9
    • 1.9
    • Libraries
    • None
    • MOODLE_19_STABLE
    • 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

              timhunt Tim Hunt
              timhunt Tim Hunt
              Nobody Nobody
              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:
                3/Mar/08