Skip to content

Commit

Permalink
argument trouble for non interactive mode + doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cperves authored and tmuras committed Jul 11, 2024
1 parent 78c8387 commit b9fd574
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Moosh/Command/Moodle39/Course/CourseEnrolChangeStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ public function __construct()
{
parent::__construct('enrol-change-status', 'course');

$this->addOption('i|instanceid:', 'enrolment instance id', 0);
$this->addOption('s|status', 'status to be applied 0 for disable, 1 for enable',0);
$this->addOption('i|instanceid:', 'enrolment instance id, if 0 or not entered you\'ll pass in interactive mode' , 0);
$this->addOption('s|status:', 'status to be applied 1 for disable, 0 for enable, default value to 0',0);
$this->addArgument('courseid');
$this->maxArguments = 255;
}
Expand Down
6 changes: 3 additions & 3 deletions www/commands/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -874,16 +874,16 @@ course-enrol-change-status
Requires course id

Options :
* --instanceid=?, --i=? : enrolment instance id, if not command enter in interactive mode and show all available enrolment instance for the given course, you'll have to choose status from prompt
* --status=0 or 1, --s=0 or 1 : status of enrolment instance 0 (default value) -> enabled, 1 -> disabled
* --instanceid=?, -i ? : enrolment instance id, if not command enter in interactive mode and show all available enrolment instance for the given course, you'll have to choose status from prompt
* --status=0 or 1, -s 0 or 1 : status of enrolment instance 0 (default value) -> enabled, 1 -> disabled

Example1 : change course enrolment instance status in interactive mode

moosh course-enrol-change-status 2

Example1 : change course enrolment instance status to disable for instance 42

moosh course-enrol-change-status --i=42 --s=1 2
moosh course-enrol-change-status -i=42 -s=1 2

course-enableselfenrol
----------------------
Expand Down

0 comments on commit b9fd574

Please sign in to comment.