]> git.mjollnir.org Git - moodle.git/commitdiff
correct logic error that broke caching.
authorjamiesensei <jamiesensei>
Thu, 16 Aug 2007 05:19:33 +0000 (05:19 +0000)
committerjamiesensei <jamiesensei>
Thu, 16 Aug 2007 05:19:33 +0000 (05:19 +0000)
lib/questionlib.php

index e9abc60b2fc6d10420b57b523e2acbb073517c3d..68707d3da5d852f32818a8a111afc98917975008 100644 (file)
@@ -1910,11 +1910,10 @@ function question_has_capability_on($question, $cap, $cachecat = -1){
     // these are capabilities on existing questions capabilties are
     //set per category. Each of these has a mine and all version. Append 'mine' and 'all'
     $question_questioncaps = array('edit', 'view', 'use', 'move');
-
     static $questions = array();
     static $categories = array();
     static $cachedcat = array();
-    if ($cachecat != -1 && (array_search($cachecat, $cachedcat)!==FALSE)){
+    if ($cachecat != -1 && (array_search($cachecat, $cachedcat)===FALSE)){
         $questions += get_records('question', 'category', $cachecat);
         $cachedcat[] = $cachecat;
     }