Parent Directory
|
Revision Log
test development branch
1 #!/usr/bin/env perl -d 2 ################################################################################ 3 # WeBWorK Online Homework Delivery System 4 # Copyright © 2000-2007 The WeBWorK Project, http://openwebwork.sf.net/ 5 # $CVSHeader: webwork2/bin/wwsh,v 1.10 2006/05/31 01:07:25 gage Exp $ 6 # 7 # This program is free software; you can redistribute it and/or modify it under 8 # the terms of either: (a) the GNU General Public License as published by the 9 # Free Software Foundation; either version 2, or (at your option) any later 10 # version, or (b) the "Artistic License" which comes with this package. 11 # 12 # This program is distributed in the hope that it will be useful, but WITHOUT 13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 # FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the 15 # Artistic License for more details. 16 ################################################################################ 17 18 =head1 NAME 19 20 wwdb - command-line interface to the WeBWorK libraries. 21 22 =cut 23 24 use Data::Dumper; 25 26 BEGIN { 27 DB::parse_options("NonStop=1"); 28 unless ($ENV{WEBWORK_ROOT}) { 29 die "WEBWORK_ROOT not found in environment.\n"; 30 } 31 } 32 33 use lib "$ENV{WEBWORK_ROOT}/lib"; 34 use WeBWorK::CourseEnvironment; 35 use WeBWorK::DB; 36 37 our $ce; 38 our $db; 39 40 my $courseID = shift @ARGV; 41 unless ($courseID) { 42 die "usage: $0 courseID\n"; 43 } 44 45 $ce = WeBWorK::CourseEnvironment->new({ 46 webwork_dir => $ENV{WEBWORK_ROOT}, 47 courseName => $courseID, 48 }); 49 $db = WeBWorK::DB->new($ce->{dbLayout}); 50 51 print <<'EOF'; 52 wwsh - The WeBWorK Shell 53 Available objects: $ce (WeBWorK::CourseEnvironment) 54 $db (WeBWorK::DB) 55 Available modules: Data::Dumper 56 EOF 57 58 DB::parse_options("NonStop=0");
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |