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

Section links block needs to be updated and cleaned up.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.1
    • Fix Version/s: 2.5
    • Component/s: Blocks
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as an admin
      2. Create two courses:
        • Course A: using weeks format with 10 sections.
        • Course B: using topics format with 50 topics.
      3. In each course add a sections links block to the front page.
        • Check course A shows 1..10
        • Check course B shows 5,10,15...50
      4. In course B click the edit icon for the section links blocks.
      5. Chang alternative increase by from 5 => 3. Browse back to the course.
      6. Check course B shows 3,6,9...
      7. Browse to Settings > Plugins > Blocks > Section links
      8. Change the settings as follows:
        • Number of sections => 2
        • Increase by => 2
        • Alternative number of sections => 5
        • Alternative increase by => 2
      9. Browse to course A and check that the section block shows 2,4,6,...
      10. Browse to course B and check that the section block still hows 3,6,9...
      Show
      Log in as an admin Create two courses: Course A: using weeks format with 10 sections. Course B: using topics format with 50 topics. In each course add a sections links block to the front page. Check course A shows 1..10 Check course B shows 5,10,15...50 In course B click the edit icon for the section links blocks. Chang alternative increase by from 5 => 3. Browse back to the course. Check course B shows 3,6,9... Browse to Settings > Plugins > Blocks > Section links Change the settings as follows: Number of sections => 2 Increase by => 2 Alternative number of sections => 5 Alternative increase by => 2 Browse to course A and check that the section block shows 2,4,6,... Browse to course B and check that the section block still hows 3,6,9...
    • Affected Branches:
      MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:
      wip-MDL-37615-m25

      Description

      There are several things wrong with the section links block:

      1. Block instance configuration doesn't work. Still has config_instance.html file, should be using edit_form.php.
      2. Doesn't conform with our current coding style.
      3. Could be made more effecient by using modinfo cache.
      4. Could be using a renderer.

      Just to get started....

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/13