Moodle

Quiz item analisys

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.3
  • Fix Version/s: 1.8.3
  • Component/s: Quiz
  • Labels:
    None
  • Environment:
    All
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_15_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

generates hundreds of

Notice: Undefined index: in C:\Inetpub\moodle_PD\moodle\mod\quiz\questiontypes\multichoice\questiontype.php on line 364

Notice: Trying to get property of non-object in C:\Inetpub\moodle_PD\moodle\mod\quiz\questiontypes\multichoice\questiontype.php on line 364

also in PHP.err file

Object of class Format could not be converted to int in C:\Inetpub\moodle_PD\moodle\lib\excel\Worksheet.php on line 1593

also had to modify category.php lines 340 and 364

removed: if ($category->id != $this->defaultcategory) {

replaced: if ($category->id != $this->defaultcategory->id) {

Activity

Hide
Martin Dougiamas added a comment -

From non non (nbhansen at midway.uchicago.edu) Saturday, 22 April 2006, 07:31 AM:

This is partially a duplicate of MDL-5262.

From Gustav Delius (gwd2 at york.ac.uk) Thursday, 27 April 2006, 03:57 PM:

I'll assign this bug to Jean-Michel as soon as I have his bug tracker username.

From Jean_Michel Vedrine (jean-michel.vedrine at wanadoo.fr) Monday, 1 May 2006, 03:38 PM:

To correct the problem with line 364 moodle\mod\quiz\questiontypes\multichoice\questiontype.php

change:

$answer = $answers[$rid]->answer;

$responses[] = $answer;

to

$responses[] = (!empty($answers[$rid]) ? $answers[$rid]->answer : '');

in the moodle\mod\quiz\questiontypes\multichoice\questiontype.php file

Note to Gustav: This is simply a backport of my fix already in the 1.6 branch.

The excel bug problem was reported in bugs 5158 and 4763. It was fixed in the 1.6 branch. it's definitely not a quiz problem, but an excel lib problem.

For the category.php problem, you are right! defaultcategory is an object so on the 2 mentionned lines it should be defaultcategory->id and not defaultcategory. Here also this has been already corrected in the 1.6 branch.

So in mod/quiz/category.php lines 340 and 364

change:

if ($category->id != $this->defaultcategory) {

to:

if ($category->id != $this->defaultcategory->id) {

Gustav, the good news are that none of these problems are in the 1.6 branch !!!!!!!

I'll look at MDL-5262 now.

Show
Martin Dougiamas added a comment - From non non (nbhansen at midway.uchicago.edu) Saturday, 22 April 2006, 07:31 AM: This is partially a duplicate of MDL-5262. From Gustav Delius (gwd2 at york.ac.uk) Thursday, 27 April 2006, 03:57 PM: I'll assign this bug to Jean-Michel as soon as I have his bug tracker username. From Jean_Michel Vedrine (jean-michel.vedrine at wanadoo.fr) Monday, 1 May 2006, 03:38 PM: To correct the problem with line 364 moodle\mod\quiz\questiontypes\multichoice\questiontype.php change: $answer = $answers[$rid]->answer; $responses[] = $answer; to $responses[] = (!empty($answers[$rid]) ? $answers[$rid]->answer : ''); in the moodle\mod\quiz\questiontypes\multichoice\questiontype.php file Note to Gustav: This is simply a backport of my fix already in the 1.6 branch. The excel bug problem was reported in bugs 5158 and 4763. It was fixed in the 1.6 branch. it's definitely not a quiz problem, but an excel lib problem. For the category.php problem, you are right! defaultcategory is an object so on the 2 mentionned lines it should be defaultcategory->id and not defaultcategory. Here also this has been already corrected in the 1.6 branch. So in mod/quiz/category.php lines 340 and 364 change: if ($category->id != $this->defaultcategory) { to: if ($category->id != $this->defaultcategory->id) { Gustav, the good news are that none of these problems are in the 1.6 branch !!!!!!! I'll look at MDL-5262 now.
Hide
Stephen Bourget added a comment -

I cannot reproduce this issue under Moodle 1.7 or Moodle 1.8

Closing

Show
Stephen Bourget added a comment - I cannot reproduce this issue under Moodle 1.7 or Moodle 1.8 Closing

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: