Parent Directory
|
Revision Log
Revision 70 - (view) (download) (as text)
| 1 : | sam | 11 | #!/usr/local/bin/webwork-perl |
| 2 : | sam | 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 : | sam | 70 | 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 : | sam | 2 | |
| 18 : | sam | 70 | use webworkInit; # WeBWorKInitLine |
| 19 : | |||
| 20 : | sam | 2 | 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 : | gage | 6 | |
| 34 : | sam | 2 | 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 |