白井先生、ご丁寧にありがとうございます。
まだデバッグ途中ですが、その経過を報告いたします。ご指摘のように
echo 'get_records_sql Start';
if (($ausers = get_records_sql($select.$sql.$sort, $table->get_page_start(), $table->get_page_size())) !== false) {
echo 'get_records_sql() true!!';
var_dump($ausers);
と入れてみました。結果、get_records_sql Start は出ますが get_records_sql true!! が出ない、つまり get_records_sql() に失敗しています。
そもそも、そのすぐ上の方で
$table->setup();
if (empty($users)) {
print_heading(get_string('nosubmitusers','assignment'));
return true;
}
とあり、添付画像にもページ移動リンクが表示されていることから、
$table->pagesize($perpage, count($users));
printf("count(users)=%d\n", count($users));
で確認すると44という数字が表示されます。get_records_sql() が怪しいところまでは突き止めました。
あと情報として、MoodleデバッグモードをDEVELOPERにしたphp.logも下記に示します(見やすくなるよう若干編集してあります)。
[09-Sep-2010 10:07:58] PHP Notice: BIGINT UNSIGNED value is out of range in '(`moodle`.`s`.`timemarked` - `moodle`.`s`.`timemodified`)'
SELECT u.id, u.firstname, u.lastname, u.picture, u.imagealt,
s.id AS submissionid, s.grade, s.submissioncomment,
s.timemodified, s.timemarked,
COALESCE(SIGN(SIGN(s.timemarked) + SIGN(s.timemarked - s.timemodified)), 0) AS status FROM mdl_user u LEFT JOIN mdl_assignment_submissions s ON u.id = s.userid
AND s.assignment = 140 WHERE u.id IN (404,340,456,1109,571,446,348,347,338,363,581,939,296,416,398,368,437,426,314,438,475,382,379,313,439,391,355,448,324,385,359,397,291,336,443,460,578,369,409,315,454,318,295,323) ORDER BY lastname ASC
- line 686 of lib/dmllib.php: call to debugging()
- line 966 of lib/dmllib.php: call to get_recordset_sql()
- line 1174 of mod/assignment/lib.php: call to get_records_sql()
- lin in /usr/local/www/moodle/lib/weblib.php on line 7005