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

Saving attempts of practice lessons

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 2.7.3, 2.8.1
    • 2.9
    • Lesson
    • MOODLE_19_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • MOODLE_29_STABLE
    • Hide

      What this patch do

      Before this patch when the lesson was a practice one, no record was created in lesson_grades and records in lesson_attempts were deleted
      After this patch a record in lesson_grades is always created or updated even for practice lessons and records in lesson attempts are never deleted.
      This patch don't change database structure but existing practice lessons are modified so that heir behaviour is not changed (prior to that patch as attempts to questions were deleted at the end of the lesson it was possible to re-take the lesson even if "Re-takes allowed" setting was set to "No", but now that attempts are no more deleted it is necessary to set "Re-takes allowed" explicitly to "Yes" to allow multiple re-takes of the lesson)
      So testing must verify that nothing is broken for existing attempts and for new attempts.

      Before applying this patch

      You need a course with 2 students Student 1 and Student 2

      • create a lesson with "Allow student review" set to "Yes" in the "Flow control" section and "Practice lesson" set to "Yes" and "Re-takes allowed" set to "No" in the "Grade" section
      • add a question page (any type will do) and a content page with a jump to next page to the lesson
      • logout, connect as Student 1 and attempt the lesson answer the question and navigate until you reach the end of lesson page
      • verify that you can re-take the lesson one more time even if "Re-takes allowed" is set to "No"
      • don't attempt the lesson as Student 2

      After applying this patch

      • connected as a teacher, going to the lesson's "Reports" tab or menu verify that "No attempts have been made on this lesson." is displayed (this is because the attempts made by student 1 were deleted as the present patch was not yet applied when he made them)
      • Display the lesson settings and verify "Re-takes allowed" has been changed to "Yes" during upgrade
      • connect as student 1 and attempt the lesson again. You should see no error or notice as if you were attempting the lesson for the first time. Click on "Review lesson" link and you should be able to review all lesson pages but your answers to question should be read-only
      • return to course and click on the lesson again, you should be able to re-take the lesson with no problem
      • logout and connect as Student 2, and attempt the lesson, you should see no error or notice and be able to answer question and navigate until you reach the end of lesson page. Click on "Review lesson" link and you should be able to review all lesson pages but your answers to question should be read-only
      • return to course and click on the lesson again, you should be able to re-take the lesson with no problem
      • logout, connect as a teacher and go to the "Reports" tab or menu and verify you see both Student 1 and Student 2 attempts to question
      Show
      What this patch do Before this patch when the lesson was a practice one, no record was created in lesson_grades and records in lesson_attempts were deleted After this patch a record in lesson_grades is always created or updated even for practice lessons and records in lesson attempts are never deleted. This patch don't change database structure but existing practice lessons are modified so that heir behaviour is not changed (prior to that patch as attempts to questions were deleted at the end of the lesson it was possible to re-take the lesson even if "Re-takes allowed" setting was set to "No", but now that attempts are no more deleted it is necessary to set "Re-takes allowed" explicitly to "Yes" to allow multiple re-takes of the lesson) So testing must verify that nothing is broken for existing attempts and for new attempts. Before applying this patch You need a course with 2 students Student 1 and Student 2 create a lesson with "Allow student review" set to "Yes" in the "Flow control" section and "Practice lesson" set to "Yes" and "Re-takes allowed" set to "No" in the "Grade" section add a question page (any type will do) and a content page with a jump to next page to the lesson logout, connect as Student 1 and attempt the lesson answer the question and navigate until you reach the end of lesson page verify that you can re-take the lesson one more time even if "Re-takes allowed" is set to "No" don't attempt the lesson as Student 2 After applying this patch connected as a teacher, going to the lesson's "Reports" tab or menu verify that "No attempts have been made on this lesson." is displayed (this is because the attempts made by student 1 were deleted as the present patch was not yet applied when he made them) Display the lesson settings and verify "Re-takes allowed" has been changed to "Yes" during upgrade connect as student 1 and attempt the lesson again. You should see no error or notice as if you were attempting the lesson for the first time. Click on "Review lesson" link and you should be able to review all lesson pages but your answers to question should be read-only return to course and click on the lesson again, you should be able to re-take the lesson with no problem logout and connect as Student 2, and attempt the lesson, you should see no error or notice and be able to answer question and navigate until you reach the end of lesson page. Click on "Review lesson" link and you should be able to review all lesson pages but your answers to question should be read-only return to course and click on the lesson again, you should be able to re-take the lesson with no problem logout, connect as a teacher and go to the "Reports" tab or menu and verify you see both Student 1 and Student 2 attempts to question

    Description

      Currently practice lessons do not save student's attempts and his/her grades, the attempts are actually deleted after lesson is over. I find it inconvenient, though, that if lesson is set to practice mode, teachers can't review students' activity and attempts. I think that it's better to save them, and attached patch does this: it just comments out the lines that delete attempts of practice lessons. There is just a small problem, considering lesson report: all attemps have "not completed" status as there's no grade for these attempts.

      Attachments

        Issue Links

          Activity

            People

              jmvedrine Jean-Michel Vedrine
              argentum Vlas Voloshin
              Adrian Greeve Adrian Greeve
              Dan Poltawski Dan Poltawski
              Ankit Agarwal Ankit Agarwal
              Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                11/May/15