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

Notice after submitting numerical question with empty units

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3
    • Component/s: Questions, Quiz
    • Labels:
    • Difficulty:
      Moderate
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      Detected @ PULL-391 by Aparup: to reproduce, setup the numerical question with a penalty on Units w.r.t. answer grade. preview it and just hit submit (ie totally wrong/empty answer)

      trace:

      Notice: Undefined variable: empty_unit in /home/aparup/mcode/m20/mssql/moodle/question/type/numerical/display.html on line 66 Call Stack: 0.0005 724384
       
      1. {main}() /home/aparup/mcode/m20/mssql/moodle/mod/quiz/attempt.php:0 0.9741 77755264
      2. quiz_attempt->print_question() /home/aparup/mcode/m20/mssql/moodle/mod/quiz/attempt.php:141 0.9742 77760032
      3. print_question() /home/aparup/mcode/m20/mssql/moodle/mod/quiz/attemptlib.php:848 0.9742 77760112
      4. default_questiontype->print_question() /home/aparup/mcode/m20/mssql/moodle/lib/questionlib.php:2167 0.9835 78007232
      5. include('/home/aparup/mcode/m20/mssql/moodle/question/type/question.html') /home/aparup/mcode/m20/mssql/moodle/question/type/questiontype.php:967 0.9839 78007232
      6. question_numerical_qtype->print_question_formulation_and_controls() /home/aparup/mcode/m20/mssql/moodle/question/type/question.html:20 0.9870 78129528
      7. include('/home/aparup/mcode/m20/mssql/moodle/question/type/numerical/display.html') /home/aparup/mcode/m20/mssql/moodle/question/type/numerical/questiontype.php:617 Undefined unit

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            stronk7 Eloy Lafuente (stronk7)
            Tester:
            Aparup Banerjee
            Participants:
            Component watchers:
            Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Tim Hunt, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/May/11