Parent Directory
|
Revision Log
Removed unneeded scripts (as per discussion with gage, apizer). Added BEGIN-block method for library inclusion to command-line scripts.
1 #!/usr/local/bin/webwork-perl 2 3 4 # This file is buildProbSetDBfromPSVNlog.pl 5 # Call with command arguments of the form: classID set5.def classlist.lst psvnlogfile 6 # This file loads the database from the class list and the set definition 7 # copyright 1996 WeBWorK All rights reserved. 8 ################################################################### 9 10 BEGIN { 11 my $useLibDir = '.'; 12 if ($0 =~ m|^(/.*)/|) { $useLibDir = $1; } 13 elsif ($0 =~ m|^(\..*)/|) { $useLibDir = $1; } 14 elsif ($0 =~ m|^(.+)/|) { $useLibDir = "./$1"; } 15 unshift @INC, $useLibDir; 16 } 17 18 use webworkInit; # WeBWorKInitLine 19 20 use Global; 21 use Auth; 22 use TimeLocal; 23 24 25 # Seed random number generator 26 27 srand(); 28 29 # Check that this program was called with four arguments 30 if (@ARGV != 3 ) 31 { print "\nsyntax: rebuildProbSetDBromPSVNlog.pl courseID set4.def psvnLogFileName\n"; 32 print "\nThe psvnLogFiles are located in courseID/logs/\n\n"; 33 34 print "E.g. rebuildProbSetDBfromPSVNlog.pl MTH140A set4.def MTH140A_set:4_bak1.psvnlog\n\n"; 35 exit (0); 36 } 37 else { 38 $classID = $ARGV[0]; 39 $setDefFilename = $ARGV[1]; 40 # $classlistFilename = $ARGV[2]; 41 $logFileName = $ARGV[2]; 42 } 43 44 ### $method ='readFromLogFile' or 'createNewPSVNs' 45 #$logFileName = "sampleCourse_set:3_bak3.psvnlog"; 46 47 $method = 'readFromLogFile'; 48 49 50 $scriptDirectory = $Global::scriptDirectory; 51 require "${scriptDirectory}$Global::buildProbSetTools"; 52 53 #my $message = &buildProbSetDB($classID,$setDefFilename,$classlistFilename,$method,$logFileName); 54 my $message = &buildProbSetDB($classID,$setDefFilename,$method,$logFileName); 55 print $message;
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |