Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'MDL-30739_21' of git://github.com/timhunt/moodle into M…

…OODLE_21_STABLE
  • Loading branch information...
commit 0a6d17e288d5c0b729c677f7585df95ce373890f 2 parents 7d97d3a + 7f17672
Eloy Lafuente (stronk7) authored December 20, 2011

Showing 1 changed file with 6 additions and 4 deletions. Show diff stats Hide diff stats

  1. 10  question/type/numerical/db/upgrade.php
10  question/type/numerical/db/upgrade.php
@@ -70,12 +70,14 @@ function xmldb_qtype_numerical_upgrade($oldversion) {
70 70
 
71 71
         // Set a better default for questions without units.
72 72
         $DB->execute('
73  
-                UPDATE {question_numerical_options} qno
  73
+                UPDATE {question_numerical_options}
74 74
                    SET showunits = 3
75 75
                  WHERE NOT EXISTS (
76  
-                         SELECT 1
77  
-                           FROM {question_numerical_units} qnu
78  
-                          WHERE qnu.question = qno.question)');
  76
+                     SELECT 1
  77
+                       FROM {question_numerical_units}
  78
+                      WHERE {question_numerical_units}.question =
  79
+                                    {question_numerical_options}.question
  80
+                 )');
79 81
 
80 82
         upgrade_plugin_savepoint(true, 2009100100, 'qtype', 'numerical');
81 83
     }

0 notes on commit 0a6d17e

Please sign in to comment.
Something went wrong with that request. Please try again.