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

Results returned from external tool activities don't update completion status

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Create a new course, enable completion
      Add an external tool activity (or quiz) that returns a grade.
      Set activity to show as complete when student receives a grade.
      Launch the external tool activity as a student and achieve a grade.
      Return to the course. Make sure the activity is marked as completed.

      Test 2:
      in the same course create assignment with completion based on grade
      login as student in one browser and view course page, make sure completion is not marked
      in another browser login as teacher and grade student's assignment
      in the student's browser refresh course view page and make sure completion is marked

      Show
      Create a new course, enable completion Add an external tool activity (or quiz) that returns a grade. Set activity to show as complete when student receives a grade. Launch the external tool activity as a student and achieve a grade. Return to the course. Make sure the activity is marked as completed. Test 2: in the same course create assignment with completion based on grade login as student in one browser and view course page, make sure completion is not marked in another browser login as teacher and grade student's assignment in the student's browser refresh course view page and make sure completion is marked
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull Master Branch:
      wip-MDL-46960-master

      Description

      When an external tool returns a grade for a student, completion status that depends on that grade is not indicated until the student logs out and logs back in again.

      To reproduce:

      Create a new course.
      Add an external tool activity that returns a grade.
      Set activity to show as complete when student receives a grade.
      Launch the external tool activity as a student and achieve a grade.
      Return to the course.

      Expected result: The activity should be marked as completed.

      Actual result: The activity is marked as not completed.

      It appears that this is happening because $SESSION->completioncache isn't being updated when the external tool submits a result back to Moodle. The tool provider submits a request directly to the Moodle server, so it doesn't have access to the user's $SESSION.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15