MDL-61364 question: adjust code and fix phpunit errors

This commit is contained in:
Simey Lameze 2018-03-26 11:31:24 +08:00
parent e7329cd026
commit 2cf7bde8e9
5 changed files with 7 additions and 1 deletions

View file

@ -929,7 +929,7 @@ class view {
if (preg_match('!^q([0-9]+)$!', $key, $matches)) {
$key = $matches[1];
$questionlist .= $key.',';
question_require_capability_on($key, 'edit');
question_require_capability_on((int)$key, 'edit');
if (questions_in_use(array($key))) {
$questionnames .= '* ';
$inuse = true;