Moodle
  1. Moodle
  2. MDL-23598

Display problem with Display review button setting.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.9, 2.0
    • Fix Version/s: 2.0
    • Component/s: Lesson
    • Labels:
      None
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      26502

      Description

      as per this forum discussion: http://moodle.org/mod/forum/discuss.php?d=155112
      -----------------------------
      Scenario.

      Lesson settings:

      Grade options
      Practice lesson no
      Custom scoring yes
      Maximum grade 10
      Student can re-take yes
      Handling of re-takes use mean
      Display ongoing score no

      Flow control
      Allow student review no
      *Display review button yes/no*
      *Maximum number of attempts 2 (or any number > 1)*
      Action after correct answer normal
      Display default feedback no
      Minimum number of questions 0
      Number of pages (cards) to show 0


      Case #1
      Display review button yes

      Q1 wrong choice:
      You have 1 attempt(s) remaining
      Unfortunately you cannot earn this one point, because your response was not correct. Would you like to keep guessing, just for the sheer joy of learning (but for no point credit)?
      Yes, I'd like to try again

      Q1 wrong choice (again and all further attempts.)
      (Maximum number of attempts reached - Moving to next page)
      Not quite. Would you like to try again?
      Yes, I'd like to try again

      --------------
      Case #2
      Display review button no

      Q1 wrong choice:
      You have 1 attempt(s) remaining
      Continue button
      Q1 wrong choice: (again)
      (Maximum number of attempts reached - Moving to next page)
      Continue button
      goes to next page
      ----------
      Case #2 works as expected, but the displaying of messages in Case #1 is wrong.
      When Display review button is set to yes, the Maximum number of attempts setting is irrelevant: student must answer the question correctly the first time to earn the point; re-trying to answer the same question won't get him any points, as the "Unfortunately etc." message points out.
      This linked behavior of the Display review button and Maximum number of attempts should be made clear in the online help.

      Consequently, When Display review button is set to yes, the displaying of the 2 following messages is irrelevant and misleading:
      You have 1 attempt(s) remaining
      (Maximum number of attempts reached - Moving to next page)

      I will shortly attach suggestion patches against 1.9 and 2.0 to remove the displaying of those messages.

      PS.- The wording of the Display review button setting is confusing, because it has noting to do with the Allow student review setting. I suggest renaming it to Display Try Question Again button.

      1. lesson04_20.txt
        0.9 kB
        Joseph Rézeau
      2. lesson04.txt
        1 kB
        Joseph Rézeau

        Issue Links

          Activity

          Hide
          Joseph Rézeau added a comment -

          patch against 1.9

          Show
          Joseph Rézeau added a comment - patch against 1.9
          Hide
          Joseph Rézeau added a comment -

          patch against 2.0

          Show
          Joseph Rézeau added a comment - patch against 2.0
          Hide
          Helen Foster added a comment -

          Setting a fix version of 2.0, as MDLQA-228 requires this issue to be fixed.

          Show
          Helen Foster added a comment - Setting a fix version of 2.0, as MDLQA-228 requires this issue to be fixed.
          Hide
          Petr Škoda added a comment -

          patch in cvs, reassigning to Helen for the rest of string and help work, thanks everybody!

          Show
          Petr Škoda added a comment - patch in cvs, reassigning to Helen for the rest of string and help work, thanks everybody!
          Hide
          Helen Foster added a comment -

          Joseph, thanks for your clear explanation of this issue. I've reworded the lang strings as suggested and also MDLQA-228 (plus master copy).

          Show
          Helen Foster added a comment - Joseph, thanks for your clear explanation of this issue. I've reworded the lang strings as suggested and also MDLQA-228 (plus master copy).
          Hide
          Joseph Rézeau added a comment -

          This bug has not been fixed in 1.9.
          Why can't I re-open a bug I reported?
          Joseph

          Show
          Joseph Rézeau added a comment - This bug has not been fixed in 1.9. Why can't I re-open a bug I reported? Joseph
          Hide
          Helen Foster added a comment -

          Hi Joseph,

          If you find that an issue which has previously been closed needs further work, please create a new issue for it and then link the two issues. However please note that bug fixes for general core bugs in 1.9.x has ended. (source: http://docs.moodle.org/dev/Releases )

          Show
          Helen Foster added a comment - Hi Joseph, If you find that an issue which has previously been closed needs further work, please create a new issue for it and then link the two issues. However please note that bug fixes for general core bugs in 1.9.x has ended. (source: http://docs.moodle.org/dev/Releases )
          Hide
          Rajneel Totaram added a comment -

          This issue (or similar issue) still exists in v.2.3.x and v2.5. I could reproduce this on the demo.moodle.net site as well.
          When Provide option to try a question again set to Yes and Max number of attempts is greater than 1, then students can attempt a question many times, even when the max attempt value is reached.
          There does not seem to be any workaround to this issue.

          Looks like the maxattemptsreached property of the lesson page object isn't checked in all places. The following changes in /mod/lesson/continue.php seems to solve this issue:

          Change: if ($result->attemptsremaining != 0 && !$lesson->review && !$reviewmode) {
          to: if ($result->attemptsremaining != 0 && $lesson->review && !$reviewmode) {

          Change: if ($result->maxattemptsreached != 0 && !$lesson->review && !$reviewmode) {
          to: if ($result->maxattemptsreached != 0 && $lesson->review && !$reviewmode) {

          Change: echo $result->feedback;
          to: if(!$result->maxattemptsreached && !$reviewmode)
          echo $result->feedback;

          Change: if (!$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$reviewmode && $lesson->review) {
          to: if (!$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$reviewmode && $lesson->review && !$result->maxattemptsreached) {

          Change: if ($lesson->review && !$result->correctanswer && !$result->noanswer && !$result->isessayquestion) {
          to: if ($lesson->review && !$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$result->maxattemptsreached) {

          The following fields in mdl_lesson also creates confusion and may have contributed to this bug being introduced:
          modattempts - this records value for Allow student to review setting
          review - this records value for Provide option to retry question again

          Show
          Rajneel Totaram added a comment - This issue (or similar issue) still exists in v.2.3.x and v2.5. I could reproduce this on the demo.moodle.net site as well. When Provide option to try a question again set to Yes and Max number of attempts is greater than 1, then students can attempt a question many times, even when the max attempt value is reached. There does not seem to be any workaround to this issue. Looks like the maxattemptsreached property of the lesson page object isn't checked in all places. The following changes in /mod/lesson/continue.php seems to solve this issue: Change: if ($result->attemptsremaining != 0 && !$lesson->review && !$reviewmode) { to: if ($result->attemptsremaining != 0 && $lesson->review && !$reviewmode) { Change: if ($result->maxattemptsreached != 0 && !$lesson->review && !$reviewmode) { to: if ($result->maxattemptsreached != 0 && $lesson->review && !$reviewmode) { Change: echo $result->feedback; to: if(!$result->maxattemptsreached && !$reviewmode) echo $result->feedback; Change: if (!$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$reviewmode && $lesson->review) { to: if (!$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$reviewmode && $lesson->review && !$result->maxattemptsreached) { Change: if ($lesson->review && !$result->correctanswer && !$result->noanswer && !$result->isessayquestion) { to: if ($lesson->review && !$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$result->maxattemptsreached) { The following fields in mdl_lesson also creates confusion and may have contributed to this bug being introduced: modattempts - this records value for Allow student to review setting review - this records value for Provide option to retry question again
          Hide
          Helen Foster added a comment -

          Rajneel, thanks for your comment. However, since this issue has been closed, please could you create a new issue for the problem occurring in 2.5, and then link it to this issue.

          Show
          Helen Foster added a comment - Rajneel, thanks for your comment. However, since this issue has been closed, please could you create a new issue for the problem occurring in 2.5, and then link it to this issue.

            People

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

              Dates

              • Created:
                Updated:
                Resolved: