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

Add a way to decide what plugin will show in the activity chooser footer

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Requirements:

      1. Site with patch applied and attached admin tool plugin installed (unzip into /admin/tool/)
      2. Tab open on Site admin settings (T1)
      3. Single course with editing on in a seperate tab (T2)

      Test:

      1. In T1 navigate to Course settings
      2. Open Activity chooser settings
      3. Confirm you see the setting "Activity chooser active footer"
      4. Confirm That the currently set option is "Do not show the footer"
      5. In T2 open the activity chooser
      6. Confirm you do not see a footer / any reference to MoodleNet
      7. In T1 change the setting "Activity chooser active footer" to MoodleNet
      8. Press save changes
      9. Reload T2
      10. Open the activity chooser
      11. Confirm you do not see a footer / any reference to MoodleNet
      12. In T1 go back to site admin settings
      13. Open the MoodleNet settings page
      14. Enable the MoodleNet integration
      15. Press save changes
      16. In T2 reload the page
      17. Open the activity chooser
      18. Confirm you do see the MoodleNet footer
      19. In T1 go back to the activity chooser settings
      20. Change the setting "Activity chooser active footer" to Chooser footer example
      21. Press save changes
      22. In T2 reload the page
      23. Open the activity chooser
      24. Confirm you do see 'Show the chooser carousel item' in the footer
      Show
      Requirements: Site with patch applied and attached admin tool plugin installed (unzip into /admin/tool/) Tab open on Site admin settings (T1) Single course with editing on in a seperate tab (T2) Test: In T1 navigate to Course settings Open Activity chooser settings Confirm you see the setting "Activity chooser active footer" Confirm That the currently set option is "Do not show the footer" In T2 open the activity chooser Confirm you do not see a footer / any reference to MoodleNet In T1 change the setting "Activity chooser active footer" to MoodleNet Press save changes Reload T2 Open the activity chooser Confirm you do not see a footer / any reference to MoodleNet In T1 go back to site admin settings Open the MoodleNet settings page Enable the MoodleNet integration Press save changes In T2 reload the page Open the activity chooser Confirm you do see the MoodleNet footer In T1 go back to the activity chooser settings Change the setting "Activity chooser active footer" to Chooser footer example Press save changes In T2 reload the page Open the activity chooser Confirm you do see 'Show the chooser carousel item' in the footer
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE
    • Pull Master Branch:
    • Story Points:
      5
    • Sprint:
      4.0 holding pattern 4

      Description

      As mentioned by Jun during his review of MDL-67883 we add a way to allow site admins to decide what will be displayed in the activity chooser footer with the default set to MoodleNet.

      This will help in the case another plugin implements the required callback and wins the race against MoodleNet.

      See below for context:

      \core_course_external::get_activity_chooser_footer()
      1. I'm not sure whether we should be limiting the execution of other plugins implementing the "_custom_chooser_footer" hook. If another plugin implements this function, but we still want to display the link to MoodleNet, if the call to "\get_plugins_with_function()" runs the other plugin's implementation first, then the MoodleNet link won't be shown anymore. Perhaps we should remove the breaks in the loop and either do the following:
        • Allow the activity chooser footer to be able to display multiple activity_chooser_footer items from plugins.
        • Add an admin setting that allows the admin to select which `activity_chooser_footer` item should be displayed in the activity chooser footer. This would provide reliability on the item will be displayed in the activity chooser footer as opposed to the first-processed, first-displayed nature of the current implementation.
          Let me know your thoughts. In any case, this can be done as a separate issue/follow up.

        Attachments

        1. chooserplugin.zip
          13 kB
        2. Screenshot_1.png
          Screenshot_1.png
          77 kB
        3. Screenshot_2.png
          Screenshot_2.png
          99 kB
        4. Screen Shot 2020-08-10 at 1.09.57 pm.png
          Screen Shot 2020-08-10 at 1.09.57 pm.png
          54 kB

          Activity

            People

            Assignee:
            mathewmay Mathew May
            Reporter:
            mathewmay Mathew May
            Peer reviewer:
            Mihail Geshoski
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Janelle Barcega
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              9/Nov/20

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 55 minutes
                2d 55m