File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ public static function fetch_ai_grade_parameters(): external_function_parameters
5757 * Similar to clicking the submit button.
5858 *
5959 * @param string $response
60- * @param integer $defaultmark
60+ * @param int $defaultmark
6161 * @param string $prompt
6262 * @param string $marksscheme
6363 * @param int $contextid the context id
Original file line number Diff line number Diff line change @@ -381,20 +381,22 @@ protected function export_errorcmid($cmid) {
381381 return '' ;
382382 }
383383 /**
384+ * The name this question should appear as in the create new question
385+ * dropdown.
386+ *
384387 * When using local_ai_manager the availability ai
385- * is controlled by the tenant setting
388+ * is controlled by the tenant setting.
386389 *
387390 * @return mixed
388391 */
389392 public function menu_name () {
390- if (class_exists ('\local_ai_manager\local\tenant ' )) {
391- if ( get_config ( ' qtype_aitext ' , ' backend ' ) === ' local_ai_manager ' ) {
392- $ tenant = \ core \di:: get (\ local_ai_manager \ local \tenant::class);
393- return $ tenant -> is_tenant_allowed () ? parent :: menu_name () : '' ;
393+ if (get_config ( ' qtype_aitext ' , ' backend ' ) === ' local_ai_manager ' && class_exists ('\local_ai_manager\local\tenant ' )) {
394+ $ tenant = \ core \di:: get (\ local_ai_manager \ local \tenant::class);
395+ if (! $ tenant-> is_tenant_allowed ()) {
396+ return '' ;
394397 }
395- } else {
396- return parent ::menu_name ();
397398 }
399+ return parent ::menu_name ();
398400 }
399401
400402}
You can’t perform that action at this time.
0 commit comments