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

Theme Boost- Cannot uncheck course from course completion at all!

XMLWordPrintable

    • MOODLE_35_STABLE, MOODLE_36_STABLE, MOODLE_37_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-64151-master
    • Easy
    • Hide

      The error occurs in the very specific circumstances when the select/course elements have "setDefault" instead of "set_data". The course completion form is a good example, it normally uses "select" element but it was changed to "course" element in MDL-10965 (currently in integration).
      To test both elements on both versions take the test file from https://gist.github.com/marinaglancy/e70f77b2830dacf45447f24e85ae3e88 . If you don't have courses with ids 2 and 3 change the "setDefault()" in the test file.

      Test on all themes! (boost & clean in 3.5 and 3.6, boost & classic in master)

      1. Submit the form with courses selected and without
      2. Make sure that form data (displayed after submit) always contains both 'courses' and 'cselect' elements and they correctly represent what was selected
      3. Unselect all courses from both elements. Make sure the data has two empty arrays
      4. Check "Enable cselect1 and text1" and submit the form - make sure that properties "cselect1" and "text1" are in the data object
      5. Uncheck "Enable cselect1 and text1" and submit the form - make sure that properties "cselect1" and "text1" are NOT in the data object

      Testing actual course completion form:

      Setup

      Have the following setup:

      1. Log in as an admin.
      2. Go to "Site administration / Advanced features"
      3. Make sure "Enable completion tracking" is ticked.
      4. Create courses A and B, both with completion tracking enabled
      5. Create any activity or resource with completion tracking in Course A.
      6. On Course A's course page, open the cog menu and click "Course completion"
      7. Expand the "Condition: Activity completion" and tick the activity/resource.
      8. Save the changes.
      Test.
      1. Navigate to Course B's course page
      2. Open the cog menu and click "Course completion"
      3. Expand "Condition: Completion of other courses"
      4. Select 'Course A'
      5. Save changes
      6. Open course completion page again and expand the "Condition: Completion of other courses" section.
      7. Confirm that Course A is still selected
      8. Deselect Course A (CTRL+left mouse click on Course A for stables, or press the x on Course A for master)
      9. Save changes
      10. Open course completion page again and expand the "Condition: Completion of other courses" section.
      11. Confirm that 'Course A' is no longer selected. 
      Show
      The error occurs in the very specific circumstances when the select/course elements have "setDefault" instead of "set_data". The course completion form is a good example, it normally uses "select" element but it was changed to "course" element in MDL-10965 (currently in integration). To test both elements on both versions take the test file from https://gist.github.com/marinaglancy/e70f77b2830dacf45447f24e85ae3e88 . If you don't have courses with ids 2 and 3 change the "setDefault()" in the test file. Test on all themes! (boost & clean in 3.5 and 3.6, boost & classic in master) Submit the form with courses selected and without Make sure that form data (displayed after submit) always contains both 'courses' and 'cselect' elements and they correctly represent what was selected Unselect all courses from both elements. Make sure the data has two empty arrays Check "Enable cselect1 and text1" and submit the form - make sure that properties "cselect1" and "text1" are in the data object Uncheck "Enable cselect1 and text1" and submit the form - make sure that properties "cselect1" and "text1" are NOT in the data object Testing actual course completion form: Setup Have the following setup: Log in as an admin. Go to " Site administration / Advanced features " Make sure " Enable completion tracking " is ticked. Create courses A and B, both with completion tracking enabled Create any activity or resource with completion tracking in Course A. On Course A's course page, open the cog menu and click " Course completion " Expand the " Condition: Activity completion " and tick the activity/resource. Save the changes. Test. Navigate to Course B's course page Open the cog menu and click " Course completion " Expand "Condition: Completion of other courses" Select 'Course A' Save changes Open course completion page again and expand the "Condition: Completion of other courses" section. Confirm that Course A is still selected Deselect Course A (CTRL+left mouse click on Course A for stables, or press the x on Course A for master) Save changes Open course completion page again and expand the "Condition: Completion of other courses" section. Confirm that 'Course A' is no longer selected. 

      Hello,

      There is a nasty bug in Boost-theme, if you select a course on "course completion" -page under "Condition: Completion of other courses"  you cannot uncheck it anymore, it is stuck forever as an condition for course completion.

      tested on Moodle 3.5.3 (Build: 20181112) & theme_boost 2018051400

      steps to repeat:

      1. Open course completion
        2. Expand "Condition: Completion of other courses"
        3. Select random course
        4. Save changes
        5. open course completion page again
        6. Press CTRL and click the selected (greyed out course)
        7. Save changes
        8. open the course completion page again.
        9. notice how the course is still selected

       

        1. MDL-64151.jpg
          MDL-64151.jpg
          12 kB
        2. MDL-64151 (2).jpg
          MDL-64151 (2).jpg
          23 kB
        3. sel.png
          sel.png
          56 kB

            marina Marina Glancy
            urpokarhu Jari Vilkman
            Mathew May Mathew May
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            6 Vote for this issue
            Watchers:
            17 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 7 hours, 25 minutes
                1d 7h 25m

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