do not join "hotpot_attempts" and "hotpot_details" tables when displaying "hotpot/index.php". This should speed display when courses have many HotPot activities, especially for students

This commit is contained in:
gbateson 2006-10-01 06:39:51 +00:00
parent 0351730630
commit 42cd7a105b

View File

@ -241,7 +241,7 @@
// restrict results to this user only
$select .= " AND a.userid='$USER->id'";
}
$usejoin = 1;
$usejoin = 0;
if (has_capability('mod/hotpot:grade', get_context_instance(CONTEXT_SYSTEM, SITEID)) && $usejoin) {
// join attempts table and details table
$tables .= ",{$CFG->prefix}hotpot_details AS d";