Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'wip-MDL-33603-MOODLE_22_STABLE' of git://github.com/abg…

…reeve/moodle into MOODLE_22_STABLE
  • Loading branch information...
commit d9a92e8f41da609b3f766316cd0c667cd26f5eec 2 parents 2b4dff5 + d9a3cd3
@danpoltawski danpoltawski authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 mod/data/view.php
View
8 mod/data/view.php
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.