Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55a568f
)
MDL-34532 quiz reports: error when showing users without attempts.
author
Tim Hunt
<T.J.Hunt@open.ac.uk>
Thu, 26 Jul 2012 09:07:09 +0000
(10:07 +0100)
committer
Tim Hunt
<T.J.Hunt@open.ac.uk>
Fri, 27 Jul 2012 22:21:32 +0000
(23:21 +0100)
We were not checking if attempt state was null before trying to convert it to a string.
mod/quiz/report/attemptsreport_table.php
patch
|
blob
|
blame
|
history
diff --git
a/mod/quiz/report/attemptsreport_table.php
b/mod/quiz/report/attemptsreport_table.php
index
4334256
..
f119da0
100644
(file)
--- a/
mod/quiz/report/attemptsreport_table.php
+++ b/
mod/quiz/report/attemptsreport_table.php
@@
-152,7
+152,11
@@
abstract class quiz_attempts_report_table extends table_sql {
* @return string HTML content to go inside the td.
*/
public function col_state($attempt) {
- return quiz_attempt::state_name($attempt->state);
+ if (!is_null($attempt->attempt)) {
+ return quiz_attempt::state_name($attempt->state);
+ } else {
+ return '-';
+ }
}
/**