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

Refactor course index and course content preference names

XMLWordPrintable

    • Moppies Kanban

      In the current version, the course state uses the following variables to indicate the section collapsed/expanded values:

      • bool contentexpanded: indicate the section is expanded in the course content
      • bool isactive: indicate the section is expanded in the course index

      Those variables are used in the mustache files to decide if the section is expanded or collapsed.

      However, when a section is collapsed or expanded, the course preferences saved are:

      • bool contentcollapsed: if the section is collapsed in the content
      • bool indexcollapsed: if the section is collapsed in the course index

      This way of saving the preference is convenient because sections are expanded by default and the result JSON is smaller.

       

      The main problem is that the code for converting preferences to state can be confusing because they are antagonistic. Apart, "isactive" does not help to understand that affects only the course index (in the beginning only the course index was expandable). The code should be refactored to unify criteria:

      1. State and mustache files should work with "contentcollapsed" and "indexcollapsed" instead of "contentexpanded" and "isactive".
      2. Section preferences should not be modified as they are optimal this way and the names are clearer.

       

            tusefomal Ferran Recio
            tusefomal Ferran Recio
            Carlos Escobedo Carlos Escobedo
            Shamim Rezaie Shamim Rezaie
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 5 hours, 3 minutes
                2d 5h 3m

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