Skip to content

Commit

Permalink
MDL-21190 Re-fixing a regression in dependency calculation
Browse files Browse the repository at this point in the history
Sorry for the last commit. This should be the proper way. The problem
was with the question mark within quotes - it was not considered as a
placeholder.
  • Loading branch information
mudrd8mz committed Dec 25, 2009
1 parent 8b9f980 commit 1b6ab89
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/grade/grade_item.php
Expand Up @@ -1331,16 +1331,15 @@ public function depends_on($reset_cache=false) {

if ($grade_category->aggregatesubcats) {
// return all children excluding category items
$params[] = $grade_category->id;
$params[] = '%/' . $grade_category->id . '/%';
$sql = "SELECT gi.id
FROM {grade_items} gi
WHERE $gtypes
$outcomes_sql
AND gi.categoryid IN (
SELECT gc.id
FROM {grade_categories} gc
WHERE gc.path LIKE '%/?/%')";

WHERE gc.path LIKE ?)";
} else {
$params[] = $grade_category->id;
$params[] = $grade_category->id;
Expand Down

0 comments on commit 1b6ab89

Please sign in to comment.