Closed tlock closed 14 years ago
This has shown another issue to fix :-
Progress result 0 of 5
ERROR: syntax error at or near ")" at character 60
SELECT * FROM mdl_bim_marking WHERE bim=3 and userid in ( ) line 686 of lib/dmllib.php: call to debugging() line 609 of lib/dmllib.php: call to get_recordset_sql() line 930 of lib/dmllib.php: call to get_recordset_select() line 119 of mod/bim/lib/locallib.php: call to get_records_select() line 179 of mod/bim/lib/bim_rss.php: call to bim_get_marking_details() line 78 of mod/bim/student/view.php: call to bim_process_unallocated() line 120 of mod/bim/coordinator/find_student.php: call to show_student_details() line 55 of mod/bim/coordinator/find_student.php: call to bim_process_find_student() line 59 of mod/bim/coordinator/view.php: call to bim_find_student() line 97 of mod/bim/view.php: call to show_coordinator()
Thanks Tim. Have made the changes will commit them later on tonights. Owe you a drink or two. Maybe at Moodlemoot'AU 2010
Tim,
Just looking at the 2nd SQL error - locallib.php 119.
My assumption is that this is happening when there's no userid, hence it's empty and creates bad SQL.
I've added in a test for this, however, I'm trying to understand how it's happening. Seems to indicate a broader problem. I believe/hope that there should be a valid student id whenever it is called.
Any insights you can share are more than welcome.
If there is somewhere that calls the find student which requires the userid passed via the browser which may not be passed at that point could explain it.
Your change missed the $search where "%search% " below :-
Having to look at this again as I didn't factor in the division in databases around concat (I've been on MySQL for a long time). I've add some code to make it work nicer on different dbases and fixed this problem (hopefully)
Fixed bug with finding a student with a different role id than 5.
/mod/bim/coordinator/find_student.php