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

mod_quiz_process_attempt web service doesn't allow finishing attempts in grace period

XMLWordPrintable

    • MOODLE_35_STABLE
    • MOODLE_35_STABLE
    • MDL-63394-master
    • Hide
      Prerequisite
      1. Moodle mobile app.
      2. Your Moodle mobile app should be able to connect to your Moodle website. You can either do the following:
        • Ensure that the phone with the mobile app and the web server are on the same network. Or
        • Expose the web server over the internet via ngrok.
      Test
      1. As admin create a quiz activity in a course with the following settings:
        • "Time limit" set to 5 seconds
        • "When time expires" set to "There is a grace period when open attempts can be submitted, but no more questions answered"
        • "Submission grace period". set to 1 day
      2. Configure the quiz and add at least one question to it
      3. Enrol one user as student in the course
      4. Enable "Mobile services": Site administration ► Mobile app ► Mobile settings
      5. Access to the quiz via the mobile app using the student account
      6. Do not submit the quiz, let the timer finish and confirm that
        • You see an Overdue notice
        • You are redirected to the attempts page where the last attempt indicates that is Overdue
        • You have an option/button for "Continue the last attempt"
        • If you click on that button, you go to a new page where you are able to submit the Overdue attempt
      Show
      Prerequisite Moodle mobile app. Your Moodle mobile app should be able to connect to your Moodle website. You can either do the following: Ensure that the phone with the mobile app and the web server are on the same network. Or Expose the web server over the internet via ngrok. Test As admin create a quiz activity in a course with the following settings: "Time limit" set to 5 seconds "When time expires" set to "There is a grace period when open attempts can be submitted, but no more questions answered" "Submission grace period". set to 1 day Configure the quiz and add at least one question to it Enrol one user as student in the course Enable "Mobile services": Site administration ► Mobile app ► Mobile settings Access to the quiz via the mobile app using the student account Do not submit the quiz, let the timer finish and confirm that You see an Overdue notice You are redirected to the attempts page where the last attempt indicates that is Overdue You have an option/button for "Continue the last attempt" If you click on that button, you go to a new page where you are able to submit the Overdue attempt

      Steps to reproduce:

      1. Setup a quiz with a small "Time limit", "When time expires" set to "There is a grace period when open attempts can be submitted, but no more questions answered" and a long "Submission grace period".
      2. Start a new quiz attempt and wait for the time limit to reach 0.
      3. Now call the WebService mod_quiz_process_attempt with the attemptid and finishattempt set to 1. Check that the WS always returns an exception.

      I checked the WS code and mod_quiz_process_attempt calls validate_attempt with only 2 parameters. This means that $failifoverdue is set to true, so an exception is returned if the state of the attempt is overdue.

        1. IMG_2587.PNG
          IMG_2587.PNG
          61 kB
        2. IMG_2588.PNG
          IMG_2588.PNG
          60 kB
        3. IMG_2589.PNG
          IMG_2589.PNG
          51 kB
        4. IMG_2590.PNG
          IMG_2590.PNG
          173 kB
        5. IMG_2591.PNG
          IMG_2591.PNG
          76 kB
        6. IMG_2592.PNG
          IMG_2592.PNG
          64 kB
        7. IMG_2593.PNG
          IMG_2593.PNG
          59 kB
        8. screenshot-1.png
          screenshot-1.png
          148 kB

            jleyva Juan Leyva
            dpalou Dani Palou
            Tim Hunt Tim Hunt
            David Monllaó David Monllaó
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 31 minutes
                31m

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