Skip to content

Commit

Permalink
Merge branch 'wip-MDL-33603-MOODLE_21_STABLE' of git://github.com/abg…
Browse files Browse the repository at this point in the history
…reeve/moodle into MOODLE_21_STABLE
  • Loading branch information
danpoltawski committed Jun 18, 2012
2 parents 47e26d4 + 7040ab6 commit 1cdcf60
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mod/data/view.php
Expand Up @@ -613,8 +613,12 @@
if ($record) { // We need to just show one, so where is it in context?
$nowperpage = 1;
$mode = 'single';
$page = (int)array_search($record->id, $recordids);

$page = 0;
// TODO MDL-33797 - Reduce this or consider redesigning the paging system.
if ($allrecordids = $DB->get_fieldset_sql($sqlselect, $allparams)) {
$page = (int)array_search($record->id, $allrecordids);
unset($allrecordids);
}
} else if ($mode == 'single') { // We rely on ambient $page settings
$nowperpage = 1;

Expand Down

0 comments on commit 1cdcf60

Please sign in to comment.