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

Delegated sections should not be listed in course page as regular sections

    XMLWordPrintable

Details

    • MOODLE_404_STABLE
    • MOODLE_404_STABLE
    • MDL-80190-main
    • Hide

      Core changes are tested using PHPUnit.

      Test 1: testing UI with mod_subsection plugin

      Some features of this issues are not used by core plugins yet. To test it you need to use the alpha version of mod_subsection:

      1. Decompress the mod_subsection.zipcode attached to this issue into the instance "mod" folder.
        1. Check you have a "mod/subsection" folder.
      2. Login as admin and install the plugin
      3. In the terminal, init behat and run selenium.
      4. Execute all behats using the option --tags=@mod_subsection
        1. Check all tests pass.

      Test 2: test subsection loop prevention

      1. Do test 1 first. You will need mod_subsection installed and behat libraries loaded.
      2. Login as admin and ensure you have debug level to developer (site administration -> development -> debug messages).
      3. Go to site administration -> development -> Create testing scenarios. Once there, upload and submit the attached MDL-80190-scenario.featurefile.
        1. Alternatively, you can use the terminal: php admin/tool/generator/cli/runtestscenario.php --feature="absolute/path/to/file.feature"
      4. Go to the course management and open the "MDL-80190 test" course
      5. Click on the "Subsection1" activity to display the subsection
      6. Try drag-dropping from the course index the activity "Subsection1" into the course content elements:
        1. Check dropping over the Subactivity1 does nothing
        2. Check dropping over the Section name does nothing
        3. Check dropping over the course content itself does nothing
      7. Try now to drag-droppping  from the course index the activity "Subsection2" into the course content elements:
        1. Check dropping over the Subactivity1 does nothing
        2. Check dropping over the Section name does nothing
        3. Check dropping over the content itself does nothing

       

      Show
      Core changes are tested using PHPUnit. Test 1: testing UI with mod_subsection plugin Some features of this issues are not used by core plugins yet. To test it you need to use the alpha version of mod_subsection: Decompress the mod_subsection.zip code attached to this issue into the instance "mod" folder. Check you have a "mod/subsection" folder. Login as admin and install the plugin In the terminal, init behat and run selenium. Execute all behats using the option --tags=@mod_subsection Check all tests pass. Test 2: test subsection loop prevention Do test 1 first. You will need mod_subsection installed and behat libraries loaded. Login as admin and ensure you have debug level to developer (site administration -> development -> debug messages). Go to site administration -> development -> Create testing scenarios. Once there, upload and submit the attached MDL-80190-scenario.feature file. Alternatively, you can use the terminal: php admin/tool/generator/cli/runtestscenario.php --feature="absolute/path/to/file.feature" Go to the course management and open the " MDL-80190 test" course Click on the "Subsection1" activity to display the subsection Try drag-dropping from the course index the activity "Subsection1" into the course content elements: Check dropping over the Subactivity1 does nothing Check dropping over the Section name does nothing Check dropping over the course content itself does nothing Try now to drag-droppping  from the course index the activity "Subsection2" into the course content elements: Check dropping over the Subactivity1 does nothing Check dropping over the Section name does nothing Check dropping over the content itself does nothing  
    • 3
    • HQ2024 Sprint I1.1 Moppies

    Description

      This issue is part of the course hierarchy project.

      Description

      Delegated sections should not be listed on the course page unless the delegate plugins say so.

      Issue goals

      • Add a course_modinfo::get_listed_section_info_all to get all listed delegated sections (omitting delegated sections).
      • Update the course content rendering to ignore delegated sections.
      • Add a section state attribute with the delegated component and item id.
      • Update reorder_sections so it ignores any delegated section.
      • Ensure course_create_sections_if_missing and course_create_section works, ignoring the delegated section's section numbers.
      • Modify the can_add_moduleinfo logic so it can be used with delegated sections.
      • Incorporate mod_subsection repository the mod_subsection\courseformat\sectiondelegate class extending ore_courseformat\sectiondelegate.

      Future issues

      The final version of mod_subsection will use sectiondelegate to hide the section from the course page.

       

      Attachments

        1. MDL-80190-scenario.feature
          0.6 kB
        2. MDL-80190-test 1.png
          MDL-80190-test 1.png
          84 kB
        3. MDL-80190-test 2.png
          MDL-80190-test 2.png
          154 kB
        4. mod_subsection.zip
          142 kB

        Issue Links

          Activity

            People

              tusefomal Ferran Recio
              tusefomal Ferran Recio
              Mikel Martín Corrales Mikel Martín Corrales
              Amaia Anabitarte Amaia Anabitarte
              Ron Carl Alfon Yu Ron Carl Alfon Yu
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Clockify

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