Difference between revisions of "WeBWorK shell - wwsh"
Line 27: | Line 27: | ||
=== DESCRIPTION === |
=== DESCRIPTION === |
||
− | print $me->status( |
||
− | The WeBWorK shell is a command line script for system administrators. The script |
||
+ | The WeBWorK shell provides a specialized version of the Perl debugger intended for use by system administrators and developers. It can be used for course maintenance tasks and debugging. It can also be used to restore access to a course from the command line. |
||
− | export WEBWORK_ROOT=/opt/webwork/ |
||
− | webwork2/ |
||
+ | Inside the shell, the user has access to the <tt>$ce$ course environment object and <tt>$db</tt> database object for the WeBWorK course whose name is provided as the argument to <tt>wwsh</tt>. |
||
− | /opt/webwork/webwork2/bin/wwsh bridgeport-math110 |
||
+ | The script for starting the shell is located in |
||
− | Then I did |
||
+ | webwork2/bin/ |
||
− | $me = $db -> getUser("aubreyja"); |
||
+ | along with a number of other useful maintenance scripts. |
||
− | print $me->status(); |
||
− | which returned D for dropped. Same goes for sdesanto. I re-enrolled you with |
||
+ | To start the WeBWorK shell, first export the location of your WeBWorK system code as <tt>WEBWORK_ROOT</t>. The standard installation instructions have the WeBWorK system code installed in <tt>/opt/webwork/webwork2</tt>. Using the bash shell the following command will export this location to <tt>WEBWORK_ROOT</tt>: |
||
− | $stephen -> status("C"); |
||
+ | export WEBWORK_ROOT=/opt/webwork/webwork2 |
||
− | I think now you should be able to login and fix things. |
||
+ | From within the <tt>webwork2/</tt> directory, the command |
||
− | $db -> putUser($user); |
||
+ | $ bin/wwsh COURSE_NAME |
||
− | $pl = $db -> getPermissionLevel("sdesanto") |
||
+ | will start the WeBWorK shell for course COURSE_NAME. |
||
− | |||
− | ; |
||
− | $pl -> permission(10); |
||
− | $db -> putPermissionLevel($pl); |
Revision as of 16:52, 5 August 2011
wwsh - the WeBWorK shell
SYNOPSIS
wwsh COURSE ID
my @userIDs = $db->listUsers(); my $new_user = $db->{user}->{record}->new(); $new_user->user_id("sammy"); $new_user->first_name("Sam"); $new_user->last_name("Hathaway"); $db->addUser($new_user); $db->putUser($new_user);
$Dennis = $db->getUser("dennis"); print $Dennis -> status(); $Dennis->status("C"); $db->putUser->($Dennis);
$pl = $db -> getPermissionLevel("dennis"); $pl -> permission(10); $db -> putPermissionLevel($pl);
DESCRIPTION
The wwsh script gives commandline access to the course environment object ($ce) and database object ($db).
DESCRIPTION
The WeBWorK shell provides a specialized version of the Perl debugger intended for use by system administrators and developers. It can be used for course maintenance tasks and debugging. It can also be used to restore access to a course from the command line.
Inside the shell, the user has access to the $ce$ course environment object and $db database object for the WeBWorK course whose name is provided as the argument to wwsh.
The script for starting the shell is located in
webwork2/bin/
along with a number of other useful maintenance scripts.
To start the WeBWorK shell, first export the location of your WeBWorK system code as WEBWORK_ROOT</t>. The standard installation instructions have the WeBWorK system code installed in /opt/webwork/webwork2. Using the bash shell the following command will export this location to WEBWORK_ROOT:
export WEBWORK_ROOT=/opt/webwork/webwork2
From within the webwork2/ directory, the command
$ bin/wwsh COURSE_NAME
will start the WeBWorK shell for course COURSE_NAME.