Moodle

Quiz 1.8 Review Page missing variables in table

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.8.1
  • Fix Version/s: 1.8.3
  • Component/s: Quiz
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

The quiz review page skips two variables in the Grade row of the attempt table. See below.

Attempts: 1, 2
Started on: Wednesday, 20 June 2007, 11:47 PM
Completed on: Wednesday, 20 June 2007, 11:47 PM
Time taken: 46 secs
Raw score: 3.42/10 (34 %)
Grade: out of a maximum of

Activity

Hide
Tom Murdock added a comment -

these are the quiz settings

Moodle 1.8.1 (2007021510)
This the version of Moodle...

Show
Tom Murdock added a comment - these are the quiz settings Moodle 1.8.1 (2007021510) This the version of Moodle...
Hide
Tom Murdock added a comment -

questions (more settings)

Show
Tom Murdock added a comment - questions (more settings)
Hide
Tim Hunt added a comment -

Is your language pack up-to-date?

About a year ago, I changed the language string from

$string['outof'] = ' out of a maximum of ';

to

$string['outof'] = '$a->grade out of a maximum of $a->maxgrade';

Changing language strings is bad, but I didn't know any better in those days. However, it has been changed for a year, and no-one else has reported a problem, so I will leave it for now.

Anyway, if you still have the old language string, it will not display the grades.

Show
Tim Hunt added a comment - Is your language pack up-to-date? About a year ago, I changed the language string from $string['outof'] = ' out of a maximum of '; to $string['outof'] = '$a->grade out of a maximum of $a->maxgrade'; Changing language strings is bad, but I didn't know any better in those days. However, it has been changed for a year, and no-one else has reported a problem, so I will leave it for now. Anyway, if you still have the old language string, it will not display the grades.
Hide
Tom Murdock added a comment -

Yup. I have that correct language string.
Thanks for the suggestion.
Odd. I wonder what is going on...

why will $a not render? I checked with standard themes to no avail.

Show
Tom Murdock added a comment - Yup. I have that correct language string. Thanks for the suggestion. Odd. I wonder what is going on... why will $a not render? I checked with standard themes to no avail.
Hide
Tim Hunt added a comment -

Well it definitely works for me in 1.8.1+. I have just checked again.

And the code looks fine. It is line 203 of mod/quiz/review.php, and the ones just before it. $grade is set on line 34.

How are you PHP skills. Are you up to doing some debugging to find out what is actually happening? (Try sticking in echo $grade after line 34, and print_object($a) just before line 203) - that sort of thing.

Also, if you have not already done so, turn the debugging setting on admin -> server -> debugging to DEBUG_ALL.

Show
Tim Hunt added a comment - Well it definitely works for me in 1.8.1+. I have just checked again. And the code looks fine. It is line 203 of mod/quiz/review.php, and the ones just before it. $grade is set on line 34. How are you PHP skills. Are you up to doing some debugging to find out what is actually happening? (Try sticking in echo $grade after line 34, and print_object($a) just before line 203) - that sort of thing. Also, if you have not already done so, turn the debugging setting on admin -> server -> debugging to DEBUG_ALL.
Hide
Tim Hunt added a comment -

In the absence of any further information, I can only close this as won't fix.

Show
Tim Hunt added a comment - In the absence of any further information, I can only close this as won't fix.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: