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

'Complete another course' allows to select courses that has completion tracking disabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.5, 3.8.2, 3.9, 3.9.9, 3.10.6, 3.11.2, 4.0
    • Fix Version/s: 3.10.8, 3.11.4
    • Component/s: Course completion
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable course completion on the site.
      2. Create 3 courses with following completion tracking settings:
        -Course 1 - completion tracking enabled
        -Course 2 - completion tracking enabled
        -Course 3 - completion tracking disabled, note ID of the course.
      3. In Course 1, navigate to "Edit" -> "Course completion", expand "Condition: Completion of other courses".
      4. Press on "Courses available" search dialog, observe that you can only see "Course 2"
      5. Select "Course 2"
      6. Open dev tool, find "select" element with name="criteria_course[]", replace value for "Course 2" option with ID from "Course 3", save the form.
      7. If you are still in the form, refresh the page. If not, in Course 1, navigate to "Edit" -> "Course completion", expand "Condition: Completion of other courses"
      8. Make sure that course "Course 3" is not selected.
      Show
      Enable course completion on the site. Create 3 courses with following completion tracking settings: -Course 1 - completion tracking enabled -Course 2 - completion tracking enabled -Course 3 - completion tracking disabled, note ID of the course. In Course 1, navigate to "Edit" -> "Course completion", expand "Condition: Completion of other courses". Press on "Courses available" search dialog, observe that you can only see "Course 2" Select "Course 2" Open dev tool, find "select" element with name="criteria_course[]", replace value for "Course 2" option with ID from "Course 3", save the form. If you are still in the form, refresh the page. If not, in Course 1, navigate to "Edit" -> "Course completion", expand "Condition: Completion of other courses" Make sure that course "Course 3" is not selected.
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE
    • Pull from Repository:
    • Pull 3.10 Branch:
      MDL-68325-310
    • Pull 3.11 Branch:
      MDL-68325-311
    • Pull Master Branch:
      MDL-68325-master

      Description

      How to reproduce:

      1. Make sure course completion is enabled on the site.
      2. Create 3 courses with following completion tracking settings:
        1. Course 1 - completion tracking enabled
        2. Course 2 - completion tracking enabled
        3. Course 3 - completion tracking disabled, note ID of the course.
      3. In Course 1, navigate to "Edit" -> "Course completion", expand "Condition: Completion of other courses".
      4. Press on "Courses available" search dialog, observe that you can only see "Course 2"
      5. Select "Course 2"
      6. Open dev tool, find "select" element with name="criteria_course[]", replace value for "Course 2" option with ID from "Course 3", save the form.
      7. In Course 1, navigate to "Edit" -> "Course completion", expand "Condition: Completion of other courses", observe that currently selected course is "Course 3"

      This has been discovered while writing a testing instruction for MDL-68315 (in order to replicate issue you can follow that test instruction). Basically the issue is partially results from MDL-68315 (Course form element does not respect 'onlywithcompletion' attribute), but in addition to that verification is missing on submission which ideally should check that selected courses have got completion enabled.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              odei.alba@moodle.com Odei Alba
              Reporter:
              kabalin Ruslan Kabalin
              Peer reviewer:
              Ruslan Kabalin Ruslan Kabalin
              Integrator:
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Tester:
              Gladys Basiana Gladys Basiana
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Nov/21

                  Time Tracking

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