Skip to content

Commit

Permalink
MBS-9754: Fix condition for course form hook to add an instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Garske committed Nov 14, 2024
1 parent 374f258 commit 8e00a71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/local/hook_callbacks.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class hook_callbacks {
* @param after_form_definition $hook
*/
public static function handle_after_form_definition(\core_course\hook\after_form_definition $hook): void {
$tenant = \core\di::get(\local_ai_manager\local\tenant::class);
if ($tenant->is_tenant_allowed()) {
$configmanager = \core\di::get(\local_ai_manager\local\config_manager::class);
if (!$configmanager->is_tenant_enabled()) {
$mform = $hook->mform;
$mform->addElement('checkbox', 'addaichat', get_string('addblockinstance', 'block_ai_chat'), 'add_block_ai_chat');
$mform->addHelpButton('addaichat', 'addblockinstance', 'block_ai_chat');
Expand Down

0 comments on commit 8e00a71

Please sign in to comment.