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

Move activity UI component to output classes and templates

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-72578-master
    • Hide

      Creating courses

      1. Enable debug mode developer (mdk run mindev.php)
      2. Create a course in topic format.
      3. Add some sections and activities. At least one activity must be a regular one (forum, assign...) and another should be a label.
        1. check no error nor warnings are displayed
      4. Enable completion tracking in the course
      5. Add different completion conditions to the activities. Make sure at least one is manual, one is with conditions, and one without completion. Then return to the course.
        1. check no error nor warnings are displayed
      6. Add some access restriction to one or two of the activities (leave some activity without restriction). The code for rendering the availability is not part of the issue so a single restriction is enough. Then return to the course.
        1. check no error nor warnings are displayed
      7. Disable edition and check no error nor warnings are displayed.
      8. Change the format to weeks and return to the course
        1. check no error nor warnings are displayed
      9. Enable edition
        1. check no errors nor warnings are displayed.
      10. Create a social format course
        1. check no error nor warnings are displayed in both edit and no edit.
        2. Uncollapse the blocks drawer and add the social activities block if it is not there.
        3. Add some activities to the social activities block (at least one of them should be a label) and check no warnings appears.
      11. Create a single activity format course (the type of activity is not important)
        1. check no error nor warnings are displayed in both edit and no edit.

      Test main menú block

      1. Go to the site home page and add the Main Menú block
      2. Add some activities to the block. At least one of them should be a label.
        1. Check no warning nor error is displayed.

      Test third party formats

      1. Keep debug enabled.
      2. Download the following course format plugin and install them. Check that during the installation some deprecation warning appears but the plugins can be installed.
        1. https://moodle.org/plugins/format_trail
        2. https://moodle.org/plugins/format_grid
        3. https://moodle.org/plugins/format_topcoll
      3. Create one course with trail format and go to the course
        1. Check some deprecations warning appears but the format is displayed.
      4. Disable debug (mdk run undev.php)
      5. Access the course again
        1. Check the course is working without visible warning
      6. Reenable debug mode (mdk run mindev.php)
      7. Repeat steps 3, 4, 5, and 6 with a grid format course
      8. Repeat steps 3, 4, 5, and 6 with a topcoll format course

       

      Show
      Creating courses Enable debug mode developer (mdk run mindev.php) Create a course in topic format. Add some sections and activities. At least one activity must be a regular one (forum, assign...) and another should be a label. check no error nor warnings are displayed Enable completion tracking in the course Add different completion conditions to the activities. Make sure at least one is manual, one is with conditions, and one without completion. Then return to the course. check no error nor warnings are displayed Add some access restriction to one or two of the activities (leave some activity without restriction). The code for rendering the availability is not part of the issue so a single restriction is enough. Then return to the course. check no error nor warnings are displayed Disable edition and  check no error nor warnings are displayed. Change the format to weeks and return to the course check no error nor warnings are displayed Enable edition check no errors nor warnings are displayed. Create a social format course check no error nor warnings are displayed in both edit and no edit. Uncollapse the blocks drawer and add the social activities block if it is not there. Add some activities to the social activities block (at least one of them should be a label) and check no warnings appears. Create a single activity format course (the type of activity is not important) check no error nor warnings are displayed in both edit and no edit. Test main menú block Go to the site home page and add the Main Menú block Add some activities to the block. At least one of them should be a label. Check no warning nor error is displayed. Test third party formats Keep debug enabled. Download the following course format plugin and install them. Check that during the installation some deprecation warning appears but the plugins can be installed. https://moodle.org/plugins/format_trail https://moodle.org/plugins/format_grid https://moodle.org/plugins/format_topcoll Create one course with trail format and go to the course Check some deprecations warning appears but the format is displayed. Disable debug (mdk run undev.php) Access the course again Check the course is working without visible warning Reenable debug mode (mdk run mindev.php) Repeat steps 3, 4, 5, and 6 with a grid format course Repeat steps 3, 4, 5, and 6 with a topcoll format course  
    • Moppies Kanban

    Description

      Since MDL-71863 all course templates must be moved to mustache+outpuc components. However, because the activity card will be implemented in this issue, most elements of the module rendering are still done by course renderer methods.

      Those are some of the methods that should be moved to output components

      • course_section_cm_name (¿and course_section_cm_name_title?) -> core_courseformat\output\local\content\cm\title
      • course_section_cm_text -> core_courseformat\output\local\content\cm\innercontent
      • course_section_cm_availability -> core_courseformat\output\local\content\cm\availability
      • course_section_cm_edit_actions -> core_courseformat\output\local\content\cm\controlmenu

      And templates should be located in the equivalent location path in course/format/templates/local/content/section/cm

       

      Attachments

        Issue Links

          Activity

            People

              tusefomal Ferran Recio
              tusefomal Ferran Recio
              Carlos Escobedo Carlos Escobedo
              Adrian Greeve Adrian Greeve
              Amaia Anabitarte Amaia Anabitarte
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Mikel Martín Corrales, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                19/Apr/22

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 2 days, 2 hours, 30 minutes
                  1w 2d 2h 30m