From d15ff63ab6da2a01d998bedc4490dd663a040401 Mon Sep 17 00:00:00 2001 From: odziminski Date: Fri, 23 Feb 2024 08:29:28 +0100 Subject: [PATCH] fix option's description, change variable to moodlecase --- Moosh/Command/Moodle41/Question/QuestionDelete.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Moosh/Command/Moodle41/Question/QuestionDelete.php b/Moosh/Command/Moodle41/Question/QuestionDelete.php index 85d4815e..1a5cde71 100644 --- a/Moosh/Command/Moodle41/Question/QuestionDelete.php +++ b/Moosh/Command/Moodle41/Question/QuestionDelete.php @@ -16,14 +16,14 @@ public function __construct() { parent::__construct('delete', 'question'); $this->addArgument('questionid'); - $this->addOption('check-only', null, 'Only check if the question is in use, do not delete'); + $this->addOption('check-only', 'Only check if the question is in use, do not delete'); } public function execute() { global $DB, $CFG; $questionid = $this->arguments[0]; - $checkOnly = $this->expandedOptions['check-only']; + $checkonly = $this->expandedOptions['check-only']; require_once($CFG->dirroot . '/question/engine/lib.php'); require_once($CFG->dirroot . '/question/type/questiontypebase.php'); @@ -42,11 +42,11 @@ public function execute() } if (questions_in_use($questionsToCheck)) { mtrace("[ID:$questionid] Question in use in activities - can not delete"); - if ($checkOnly) { + if ($checkonly) { return; } } - if (!$checkOnly) { + if (!$checkonly) { question_delete_question($question->id); } }