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

Add node key to competencies navigation node

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Before applying the patch:

      • Login as admin and enable competencies (setting: core_competency | enabled )
      • Login to Moodle as any user who is allowed to manage competencies in a course (e.g. a teacher)
      • Open the nav drawer
      • Look at the HTML code of the link to the competencies. It is:

        <a class="list-group-item list-group-item-action " href="https://demo.moodle.net/admin/tool/lp/coursecompetencies.php?courseid=1234" data-key="2">
                        <div class="m-l-0">
                                Competencies
                        </div>
                    </a>
        

      • You will see that this node has a data-key attribute with an arbitrary integer value.

      After applying the patch:

      • Login as admin and enable competencies (setting: core_competency | enabled )
      • Login to Moodle as any user who is allowed to manage competencies in a course (e.g. a teacher)
      • Open the nav drawer
      • Look at the HTML code of the link to the competencies. It is:

        <a class="list-group-item list-group-item-action " href="https://demo.moodle.net/admin/tool/lp/coursecompetencies.php?courseid=1234" data-key="competencies">
                        <div class="m-l-0">
                                Competencies
                        </div>
                    </a>
        

      • You will see that this node has a data-key attribute with the value "competencies"
      Show
      Before applying the patch: Login as admin and enable competencies (setting: core_competency | enabled ) Login to Moodle as any user who is allowed to manage competencies in a course (e.g. a teacher) Open the nav drawer Look at the HTML code of the link to the competencies. It is: <a class="list-group-item list-group-item-action " href="https://demo.moodle.net/admin/tool/lp/coursecompetencies.php?courseid=1234" data-key="2"> <div class="m-l-0"> Competencies </div> </a> You will see that this node has a data-key attribute with an arbitrary integer value. After applying the patch: Login as admin and enable competencies (setting: core_competency | enabled ) Login to Moodle as any user who is allowed to manage competencies in a course (e.g. a teacher) Open the nav drawer Look at the HTML code of the link to the competencies. It is: <a class="list-group-item list-group-item-action " href="https://demo.moodle.net/admin/tool/lp/coursecompetencies.php?courseid=1234" data-key="competencies"> <div class="m-l-0"> Competencies </div> </a> You will see that this node has a data-key attribute with the value "competencies"
    • Affected Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE, MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-59879-master

      Description

      Similar to MDL-58165, the "competencies" navigation node is the only navigation node in the course navigation section of Boost's nav drawer which does not have a real string key, it only has a not-so-easy-to-guess integer key which is autogenerated when the navigation node is added to the navigation tree.

      Because of that it is difficult to find this navigation node in the navigation tree and you can't reliably select the navigation node in CSS with the node's data-key attribute if needed.

      I propose to add a string key to the competencies navigation node to overcome these obstacles.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  13/Nov/17