Permalink
Browse files

mod/lesson, mod/quiz: remove deprecated sql_paging_limit(), use offse…

…t, limit parameters
  • Loading branch information...
martinlanghoff
martinlanghoff committed Sep 26, 2006
1 parent 1ad5c63 commit ea9a729f80f614f8cfd964168bf6e8edbdd57522
Showing with 3 additions and 4 deletions.
  1. +1 −2 mod/data/view.php
  2. +2 −2 mod/lesson/report.php
View
@@ -389,8 +389,7 @@
/// Get the actual records
- $limit = sql_paging_limit($page * $nowperpage, $nowperpage);
- $records = get_records_sql($sqlselect.$limit);
+ $records = get_records_sql($sqlselect, $page * $nowperpage, $nowperpage);
if (empty($records)) { // Nothing to show!
if ($record) { // Something was requested so try to show that at least (bug 5132)
View
@@ -52,14 +52,14 @@
/// Clean up the timer table
$timeid = get_field_sql("SELECT id FROM {$CFG->prefix}lesson_timer
WHERE userid = $userid AND lessonid = $lesson->id
- ORDER BY starttime ".sql_paging_limit($try, 1));
+ ORDER BY starttime", $try, 1);
delete_records('lesson_timer', 'id', $timeid);
/// Remove the grade from the grades and high_scores tables
$gradeid = get_field_sql("SELECT id FROM {$CFG->prefix}lesson_grades
WHERE userid = $userid AND lessonid = $lesson->id
- ORDER BY completed ".sql_paging_limit($try, 1));
+ ORDER BY completed", $try, 1);
delete_records('lesson_grades', 'id', $gradeid);
delete_records('lesson_high_scores', 'gradeid', $gradeid, 'lessonid', $lesson->id, 'userid', $userid);

0 comments on commit ea9a729

Please sign in to comment.