Moodle
  1. Moodle
  2. MDL-35023

Strict standards in calculated question type

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.4, 2.3.1, 2.4
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Questions
    • Labels:
    • Testing Instructions:
      Hide
      1. Make sure you have debugging turned up to the max.
      2. Go to the question bank.
      3. Start to create a new calculated question.
      4. When you get to that point, choose to create a new shared data set for the wild cards
      5. On the next page, verify that there are no Strict Syntax warnings.

      http://docs.moodle.org/23/en/Calculated_question_type if you are not already familiar with qtype calculated.

      Show
      Make sure you have debugging turned up to the max. Go to the question bank. Start to create a new calculated question. When you get to that point, choose to create a new shared data set for the wild cards On the next page, verify that there are no Strict Syntax warnings. http://docs.moodle.org/23/en/Calculated_question_type if you are not already familiar with qtype calculated.
    • Affected Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      43626

      Description

      1. Create a new quiz
      2. Add a new calculated question to the quiz
      3. Create a new shared data set for the wild cards

      The page displays:

      Strict standards: Creating default object from empty value in /home/fred/www/repositories/stable_master/moodle/question/type/calculated/questiontype.php on line 1712
      
      Call Stack:
          0.0006     839744   1. {main}() /home/fred/www/repositories/stable_master/moodle/question/question.php:0
          0.1791   54623008   2. qtype_calculated->next_wizard_form() /home/fred/www/repositories/stable_master/moodle/question/question.php:198
          0.1811   55341904   3. question_dataset_dependent_items_form->__construct() /home/fred/www/repositories/stable_master/moodle/question/type/calculated/questiontype.php:443
          0.1823   55350352   4. moodleform->moodleform() /home/fred/www/repositories/stable_master/moodle/question/type/calculated/datasetitems_form.php:107
          0.1850   55475760   5. question_dataset_dependent_items_form->definition() /home/fred/www/repositories/stable_master/moodle/lib/formslib.php:191
          0.1853   55522824   6. qtype_calculated->print_dataset_definitions_category_shared() /home/fred/www/repositories/stable_master/moodle/question/type/calculated/datasetitems_form.php:123
      
      
      Strict standards: Creating default object from empty value in /home/fred/www/repositories/stable_master/moodle/question/type/calculated/questiontype.php on line 1712
      
      Call Stack:
          0.0006     839744   1. {main}() /home/fred/www/repositories/stable_master/moodle/question/question.php:0
          0.1791   54623008   2. qtype_calculated->next_wizard_form() /home/fred/www/repositories/stable_master/moodle/question/question.php:198
          0.1811   55341904   3. question_dataset_dependent_items_form->__construct() /home/fred/www/repositories/stable_master/moodle/question/type/calculated/questiontype.php:443
          0.1823   55350352   4. moodleform->moodleform() /home/fred/www/repositories/stable_master/moodle/question/type/calculated/datasetitems_form.php:107
          0.1850   55475760   5. question_dataset_dependent_items_form->definition() /home/fred/www/repositories/stable_master/moodle/lib/formslib.php:191
          0.1853   55522824   6. qtype_calculated->print_dataset_definitions_category_shared() /home/fred/www/repositories/stable_master/moodle/question/type/calculated/datasetitems_form.php:123
      

        Activity

        Hide
        Tim Hunt added a comment -

        Submitting a fix for integration. I also cleaned up the code a bit, because I could not see the problem until the code was a bit clearer.

        Show
        Tim Hunt added a comment - Submitting a fix for integration. I also cleaned up the code a bit, because I could not see the problem until the code was a bit clearer.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

        TIA and ciao

        Show
        Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Integrated, thanks! (22, 23 & master)

        Show
        Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (22, 23 & master)
        Hide
        Adrian Greeve added a comment -

        Tested pre-patch to make sure that I had a working equation.
        Tested with 2.2, 2.3 and master.
        No strict standards errors are showing.
        Test passed.

        Show
        Adrian Greeve added a comment - Tested pre-patch to make sure that I had a working equation. Tested with 2.2, 2.3 and master. No strict standards errors are showing. Test passed.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        I'm so proud...of you, many thanks!

        http://youtu.be/n64CdfDRnZY

        Closing as fixed, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - I'm so proud...of you, many thanks! http://youtu.be/n64CdfDRnZY Closing as fixed, ciao
        Hide
        Pierre Pichet added a comment -

        There are another one that has not been corrected
        line 1635
        if ($questionb = $DB->get_records_sql($sql1, array($r->question))) {
        $datasetdefs["$r->type-$r->category-$r->name"]->questions[
        $r->question]>name = $questionb[$r->question]>name;

        see http://moodle.org/mod/forum/discuss.php?d=211619

        should we reopen or create a new one ?

        Show
        Pierre Pichet added a comment - There are another one that has not been corrected line 1635 if ($questionb = $DB->get_records_sql($sql1, array($r->question))) { $datasetdefs ["$r->type-$r->category-$r->name"] ->questions[ $r->question] >name = $questionb [$r->question] >name; see http://moodle.org/mod/forum/discuss.php?d=211619 should we reopen or create a new one ?
        Hide
        Tim Hunt added a comment -

        Please create a new issue for this Pierre.

        Show
        Tim Hunt added a comment - Please create a new issue for this Pierre.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: