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

Rewrite course renderers to use templates

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      The course should work almost as before. Some of the cases are tested via behat but the era some course examples without tests.

      Topic format tests

      1. Create a course using the command: mdk run makecourse.sh
      2. Login as admin and enter the course.
      3. Check the 10 sections are displayed and have some activities on it.
      4. Turn editing on
      5. Check all editing element appear (move handlers, pencil to rename, edit dropdown menus and add activity or resource)
      6. Check that if you rename an activity with the pencil icon the activity is renamed.
      7. Check you can drag and drop an activity and it gets fixed in the new position
      8. Add an activity to a section (for example a page)
        1. Check  the activity is created
      9. Drag and drop a file from your computer file explorer into the course and create a resource
        1. Check the resource is created
      10. Delete one activity
        1. Check the activity is deleted.
      11. On an activity edit:
        1. Check "move right" indent the activity
        2. Check "move left" unindent the activity
        3. Check "hide" dimmed the activity and display the "hidden from students" message
        4. Check "show" undimmed the activity and remove the "hidden from students" message
        5. Check "duplicate" creates a copy of the activity right below it.
      12. On the section edit:
        1. Check "highlight" highlights the topic
        2. Check "remove highlight" removes the highlight
        3. Check "hide topic" dimmed the full topic and adds the "hidden from student" message
        4. Check "show topic" undimmed the full topic and remove the "hidden from students" message
        5. Check "delete section" delete the full section.

      Weekly format test

      1. Go to the course settings and change the format to weekly.
      2. Check the course sections are now weeks
      3. Rename one section
        1. Check the section name changes
      4. Dropdown a section "edit" menu
        1. Check no "highlight" option is available (as it is only for topic format)
      5. Check the "add weeks" button creates more weeks at the end of the course.

      Social format test

      1. Go to the course settings and change the format to social.
      2. Check the course only displays the main forum as course content
      3. Add a "social activities" block
        1. Check some activities (the one from topic zero) appears in the block.

      Single activity test

      1. Go to the course settings and change the format to social. Then select "glossary" as activity type. Then add a name to the glossary and go to the course. 
      2. Check the glossary is the only thing displayed in the course content
      Show
      The course should work almost as before. Some of the cases are tested via behat but the era some course examples without tests. Topic format tests Create a course using the command: mdk run makecourse.sh Login as admin and enter the course. Check the 10 sections are displayed and have some activities on it. Turn editing on Check all editing element appear (move handlers, pencil to rename, edit dropdown menus and add activity or resource) Check that if you rename an activity with the pencil icon the activity is renamed. Check you can drag and drop an activity and it gets fixed in the new position Add an activity to a section (for example a page) Check   the activity is created Drag and drop a file from your computer file explorer into the course and create a resource Check the resource is created Delete one activity Check the activity is deleted. On an activity edit: Check "move right" indent the activity Check "move left" unindent the activity Check "hide" dimmed the activity and display the "hidden from students" message Check "show" undimmed the activity and remove the "hidden from students" message Check "duplicate" creates a copy of the activity right below it. On the section edit: Check "highlight" highlights the topic Check "remove highlight" removes the highlight Check "hide topic" dimmed the full topic and adds the "hidden from student" message Check "show topic" undimmed the full topic and remove the "hidden from students" message Check "delete section" delete the full section. Weekly format test Go to the course settings and change the format to weekly. Check the course sections are now weeks Rename one section Check the section name changes Dropdown a section "edit" menu Check no "highlight" option is available (as it is only for topic format) Check the "add weeks" button creates more weeks at the end of the course. Social format test Go to the course settings and change the format to social. Check the course only displays the main forum as course content Add a "social activities" block Check some activities (the one from topic zero) appears in the block. Single activity test Go to the course settings and change the format to social. Then select "glossary" as activity type. Then add a name to the glossary and go to the course.  Check the glossary is the only thing displayed in the course content
    • Affected Branches:
      MOODLE_38_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_400_STABLE
    • Pull Master Branch:
      MDL-65974-master-iteration03
    • Sprint:
      Moppies Kanban

      Description

      Current course renderers use the html_writer class to render course elements like:

      • Course sections
      • Activities
      • Courses shown on the front-page

      These need to be changed to use moustache templates so the course UI can be improved

       

        Attachments

        1. course_templatables_v1.jpg
          course_templatables_v1.jpg
          221 kB
        2. Screenshot_1.jpg
          Screenshot_1.jpg
          77 kB
        3. Screenshot_2.jpg
          Screenshot_2.jpg
          111 kB
        4. Screenshot_3.jpg
          Screenshot_3.jpg
          51 kB
        5. Screenshot_4.jpg
          Screenshot_4.jpg
          48 kB

          Issue Links

            Activity

              People

              Assignee:
              tusefomal Ferran Recio
              Reporter:
              basbrands Bas Brands
              Peer reviewer:
              Ilya Tregubov
              Integrator:
              Adrian Greeve
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Bas Brands
              Votes:
              5 Vote for this issue
              Watchers:
              18 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Nov/21

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 weeks, 3 days, 1 hour, 3 minutes
                  6w 3d 1h 3m