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

Add node key to competencies navigation node

XMLWordPrintable

    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MOODLE_32_STABLE, MOODLE_33_STABLE
    • MDL-59879-master
    • 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"

      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.

            abias Alexander Bias
            abias Alexander Bias
            Jake Dallimore Jake Dallimore
            David Monllaó David Monllaó
            Marina Glancy Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.