mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
correct logic error that broke caching.
This commit is contained in:
parent
3aafb7d9d2
commit
9f1017a0be
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user