Moodle
  1. Moodle
  2. MDL-26724

Notice after submitting numerical question with empty units

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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
    • Rank:
      16625

      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
      

        Activity

        Hide
        Tim Hunt added a comment -

        Pull request done. Apu gives reproduce/testing instructions in PULL-391

        Show
        Tim Hunt added a comment - Pull request done. Apu gives reproduce/testing instructions in PULL-391
        Hide
        Helen Foster added a comment -

        Thanks again Tim.

        Show
        Helen Foster added a comment - Thanks again Tim.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: