Skip to content

Commit

Permalink
fixed db warning; merged from MOODLE_19_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Mar 8, 2008
1 parent a450311 commit bf9211e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion grade/edit/outcome/course.php
Expand Up @@ -72,7 +72,10 @@
}

// now check all used standard outcomes are in outcomes_course too
if ($realused = get_records_select('grade_items', "courseid=$courseid and outcomeid IS NOT NULL", '', 'outcomeid')) {
$sql = "SELECT DISTINCT outcomeid
FROM {$CFG->prefix}grade_items
WHERE courseid=$courseid and outcomeid IS NOT NULL";
if ($realused = get_records_sql($sql)) {
$realused = array_keys($realused);
foreach ($realused as $oid) {
if (array_key_exists($oid, $standardoutcomes)) {
Expand Down

0 comments on commit bf9211e

Please sign in to comment.