Issue Details (XML | Word | Printable)

Key: MDL-10274
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Petr Skoda
Reporter: Dilan Anuruddha Karanachcharighe
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle
MDL-17458

Parsing the command line arguments for script

Created: 27/Jun/07 06:45 PM   Updated: 04/Jun/09 12:30 AM
Return to search
Component/s: Unknown
Affects Version/s: 1.8.1
Fix Version/s: 2.0

Environment: PHP

Participants: Dilan Anuruddha Karanachcharighe and Petr Skoda
Security Level: None
Resolved date: 04/Jun/09
Affected Branches: MOODLE_18_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
PEAR library is used to fetch the command line arguments. Then the PEAR result if further processed using our own functions. Final output is an array containing valid options and valid arguments

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Dilan Anuruddha Karanachcharighe added a comment - 27/Jun/07 06:54 PM
At the moment I have done the part of fetching the arguments using PEAR Console library and formatting them to appropriate format. PEAR errors are in English only. So we will not print errors returned by PEAR. instead we will use our own error messages which will be in lang/install.php.
Custom functions are at the moment kept in the same script file. But moving them to library file has to be done. At the moment it will be a file like libinstall.php in lib directory.

Dilan Anuruddha Karanachcharighe added a comment - 27/Jun/07 07:00 PM
Also these arguments for the script is to be used for non interactive mode. At the moment Penny(correct me if i'm wrong) suggested that we will go with level of interactivity scheme where
Level 0 --mean non interactive
Level 1 --mean interactive for options that are not provided in the arguments to the script
Level 2 – mean total interactive (ignore script arguments provided)

This scheme seems fine. So I'm planning to use this scheme.


Petr Skoda added a comment - 04/Jun/09 12:30 AM
I have committed a bit different code that is using Moodle coding style, I hope it will be sufficient for all tasks
thanks anyway