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

Error on validating the correct attempts in lesson

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.1, 2.2, 2.3
    • Fix Version/s: None
    • Component/s: Lesson
    • Labels:
    • Testing Instructions:
      Hide

      Make sure MDL-31775 patch is applied.

      Create a lesson with the following setting:
      Settings:
      Practice lesson No
      Re-takes allowed Yes.

      Login as student and access the lesson

      make sure the following notice are not exist:

      Notice: Trying to get property of non-object in /moodle/mod/lesson/view.php on line 198
      Notice: Trying to get property of non-object in /moodle/mod/lesson/view.php on line 201

      Show
      Make sure MDL-31775 patch is applied. Create a lesson with the following setting: Settings: Practice lesson No Re-takes allowed Yes. Login as student and access the lesson make sure the following notice are not exist: Notice: Trying to get property of non-object in /moodle/mod/lesson/view.php on line 198 Notice: Trying to get property of non-object in /moodle/mod/lesson/view.php on line 201
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Notice the error while reviewing MDL-31775.

      The validation for the number of attempts is always true, eventhough the correct attempt is 0.

      if ($corrrectattempts>0) 

      changing it to use !empty() instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rwijaya Rossiani Wijaya
              Reporter:
              rwijaya Rossiani Wijaya
              Integrator:
              Dan Poltawski
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: