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

Standardise course js methods

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: JavaScript
    • Labels:
    • Affected Branches:
      MOODLE_23_STABLE

      Description

      As discussed in MDL-33683, there are several methods in use to determine the section id for a given section. Even where the same method is used, it's not from the same function for each of the place it's in use.

      I propose a quick audit of all of the code in:

      • course/yui/modchooser
      • course/yui/dragdrop
      • course/yui/toolboxes
      • course/dragdrop.js

      To check for any sections of code which should be standardised. These can be placed into

      • course/yui/coursebase

      Which has the M.course.coursebase namespace already and is already used a dependency to all of the above pieces of code.

      We should definitely have standardised functions for:

      • get_section_id
      • get_activity_id
      • get_activity_type

      We should also look at standardising all of the CSS content where possible to the same coursebase location. At present we have duplicates of many CSS selectors (e.g. section is likely specified in every of the above files).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dobedobedoh Andrew Nicols
              Reporter:
              dobedobedoh Andrew Nicols
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: