-
Sub-task
-
Resolution: Not a bug
-
Minor
-
None
-
2.0
-
None
-
MOODLE_20_STABLE
OU Moodle with September 2008 reports
On the detailed 'Responses' page
I clicked on the question number ('#1', '#2' ...) at the top of a column and got
ERROR: syntax error at or near "{" at character 1124
SELECT ''||u.id||'#'||COALESCE(qa.attempt, '0') AS concattedid, (CASE WHEN qa.sumgrades = (SELECT MAX(qa2.sumgrades) FROM dev_quiz_attempts qa2 WHERE qa2.quiz = qa.quiz AND qa2.userid = qa.userid) AND qa.timestart = (SELECT MIN(qa3.timestart) FROM dev_quiz_attempts qa3 WHERE qa3.quiz = qa.quiz AND qa3.userid = qa.userid AND qa3.sumgrades = qa.sumgrades) THEN 1 ELSE 0 END) AS gradedattempt, qa.uniqueid, qa.id AS attempt, u.id AS userid, u.idnumber, u.firstname, u.lastname, u.institution, u.department, u.email, u.picture, u.imagealt, qa.sumgrades, qa.timefinish, qa.timestart, qa.timefinish - qa.timestart AS duration, qa.layout , qs289.grade AS qsgrade289, qs289.answer AS qsanswer289, qs289.event AS qsevent289, qs289.id AS qsid289 FROM dev_user u LEFT JOIN dev_quiz_attempts qa ON qa.userid = u.id AND qa.quiz = 132 AND qa.sumgrades = (SELECT MAX(qa2.sumgrades) FROM dev_quiz_attempts qa2 WHERE qa2.quiz = qa.quiz AND qa2.userid = qa.userid) AND qa.timestart = (SELECT MIN(qa3.timestart) FROM dev_quiz_attempts qa3 WHERE qa3.quiz = qa.quiz AND qa3.userid = qa.userid AND qa3.sumgrades = qa.sumgrades) LEFT JOIN
{question_sessions}qns289 ON qns289.attemptid = qa.uniqueid AND qns289.questionid = 289 LEFT JOIN
{question_states}qs289 ON qs289.id = qns289.newgraded WHERE u.id IN ( 88,91,94,95,96,102,107,108,111,112,113,114,119,120,123,125,127,131,132,133,134,135,142,144,145,146,147,153,155,156,157,158,159,161,163,165,166,177,179,180,182,183,195,198,208,209,211,212,214,215,217,220,221,225,227,228,229,230,233,236,238,239,240,241,242,243,244,245,246,249,250,253,254,255,257,258,259,261,263,264,266,267,268,269,270,271,272,276,277,279,280,281,282,283,284,285,286,290,291,294,295,297,300,302,304,305,306,308,309,310,311,312,313,314,315,317,320,321,322,325,326,327,332,336,339,340,342,343,344,345,347,348,349,350,352,353,354,355,356,357,358,365,366,367,369,370,373,375,380,381,382,387,388,389,391,392,393,394,395,396,397,398,402,403,404,406,412,413,415,416,418,419,420,423,427,429,430,435,436,438,439,440,441,442,443,446,449,450,451,452,455,456,457,459,462,466,468,469,471,474,476,478,479,481,482,485,486,491,492,495,496,497,498,501,503,506,507,508,510,511,515,516,517,518,520,521,522,523,525,526,527,528,529,530,533,534,535,538,539,540,541,542,543,544,546,548,550,552,555,556,558,560,561,562,563,564,565,566,567,571,572,573,574,576,577,578,579,580,581,582,583,585,586,587,588,589,590,594,596,597,599,600,603,604,605,606,607,608,610,611,612,615,616,617,618,619,620,621,622,623,624,628,631,632,633,634,638,640,641,642,643,644,645,648,650,653,654,655,656,657,665,666,667,672,673,674,675,676,677,678,681,682,683,684,685,686,687,688,689,690,691,692,694,696,697,698,700,701,702,705,706,708,709,711,712,713,714,716,717,719,721,722,723,724,725,727,728,731,736,741,744,747,748,749,752,753,754,755,757,758,760,761,762,764,767,768,769,770,771,772,774,775,776,777,778,780,782,783,784,785,789,791,792,793,794,795,797,800,801,802,803,805,806,809,811,813,814,816,818,819,823,824,825,826,827,828,829,831,832,835,839,841,843,847,849,850,852,854,855,858,859,862,863,864,865,867,868,869,870,874,875,876,879,880,881,884,885,897,898,899,901,902,903,905,906,907,908,910,911,914,916,918,920,921,922,923,927,929,930,932,933,936,939,940,941,942,943,944,945,946,949,950,952,953,955,956,958,960,961,962,963,964,965,966,967,975,976,977,980,982,1001,1002,1003,1005,1006,1007,1008,1010,1011,1013,1015,1017,1018,1020,1021,1022,1023,1027,1028,1029,1030,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1043,1045,1046,1048,1050,1051,1052,1053,1054,1056,1057,1058,1060,1061,1065,1066,1068,1069,1070,1071,1072,1075,1076,1077,1078,140,601,765,551,514,207,499,216,98,136,232,878,319,206,639,524,668,324,160,224,401,189,651,422,360,154,293,124,513,337,273,467,699,504,150,379,121,186,817,184,882,454,110,635,856,979,614,679,981,168,568,359,151,1067,371,707,545,669,453,109,226,185,428,252,421,374,130,461,536,822,680,205,671,670,128,470,773,405,116,630,187,200,329,493,860,938,750,973,660,487,575,303,201,464,663,756,316,851,434,937,553,796,334,919,810,547,275,509,625,799,188,424,292,909,848,152,199,1044,627,287,763,502,512,196,1074,872,460,386,335,505,181,488,237,262,137,274,194,626,730,871,323,1059,296,926,866,431,838,390,77,72,45,55,331,842,256,447,931,213,549,647,837,833,333,318,595,307,265,93,425,364,231,445,637,840,448,338,652,788,531,97,480,532,593,659,804,912,951,400,834,483,363,235,100,89,658,222,99,790,662,484,836,104,433,974) AND qa.preview = 0 AND qa.id IS NOT NULL ORDER BY qsanswer289 ASC, concattedid ASC
- line 796 of lib/dmllib.php: call to debugging()
- line 1088 of lib/dmllib.php: call to get_recordset_sql()
- line 1812 of lib/tablelib.php: call to get_records_sql()
- line 211 of mod/quiz/report/responses/responses_table.php: call to table_sql->query_db()
- line 1832 of lib/tablelib.php: call to quiz_report_responses_table->query_db()
- line 322 of mod/quiz/report/responses/report.php: call to table_sql->out()
- line 118 of mod/quiz/report.php: call to quiz_responses_report->display()
- duplicates
-
MDL-16504 Error on displaying detailed responses
-
- Closed
-