Difference between revisions of "WeBWorK shell - wwsh"
Jump to navigation
Jump to search
(Created page with 'wwsh - the WeBWorK shell === SYNOPSIS === wwsh <u>COURSE ID</u> $stephen = $db -> getUser("stephen"); print $me -> status(); $stephen -> status("C"); $db -> putUser($user)…') |
|||
Line 4: | Line 4: | ||
wwsh <u>COURSE ID</u> |
wwsh <u>COURSE ID</u> |
||
+ | |||
+ | Access <tt>$db</tt> database object: |
||
+ | |||
+ | 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"); |
||
+ | $Dennis->status("C"); |
||
+ | $db->putUser->($Dennis); |
||
+ | |||
$stephen = $db -> getUser("stephen"); |
$stephen = $db -> getUser("stephen"); |
||
print $me -> status(); |
print $me -> status(); |
||
Line 11: | Line 26: | ||
$pl -> permission(10); |
$pl -> permission(10); |
||
$db -> putPermissionLevel($pl); |
$db -> putPermissionLevel($pl); |
||
− | |||
=== DESCRIPTION === |
=== DESCRIPTION === |
Revision as of 14:57, 5 August 2011
wwsh - the WeBWorK shell
SYNOPSIS
wwsh COURSE ID Access $db database object:
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"); $Dennis->status("C"); $db->putUser->($Dennis);
$stephen = $db -> getUser("stephen"); print $me -> status(); $stephen -> status("C"); $db -> putUser($user); $pl = $db -> getPermissionLevel("sdesanto"); $pl -> permission(10); $db -> putPermissionLevel($pl);
DESCRIPTION
print $me->status(
The WeBWorK shell is a command line script for system administrators. The script export WEBWORK_ROOT=/opt/webwork/
webwork2/
/opt/webwork/webwork2/bin/wwsh bridgeport-math110
Then I did
$me = $db -> getUser("aubreyja"); print $me->status();
which returned D for dropped. Same goes for sdesanto. I re-enrolled you with
$stephen -> status("C");
I think now you should be able to login and fix things.
$db -> putUser($user);
$pl = $db -> getPermissionLevel("sdesanto")
$pl -> permission(10); $db -> putPermissionLevel($pl);