Parent Directory
|
Revision Log
rewriten allowing png mode and error checking
1 #!/usr/local/bin/webwork-perl 2 3 ## $Id$ 4 5 ################################################################ 6 # Copyright @1995-2002 by Michael E. Gage, Arnold K. Pizer and 7 # WeBWorK at the University of Rochester. 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 use Global; 20 ## l2hPrecreateProb.pl 21 ## 22 ## pre-creates latex2html output for each student for a single problem 23 ## so that WeBWorK doesn't have to run latex2html in processProblems 24 25 ## NOTE: problem set has to be built before precreating... 26 27 ## this is called with arguments classID setdefinitionfile probnumber 28 ## e.g. l2hPrecreateSet.pl demoCourse set1.def 7 29 30 my ($courseID,$fileName, $probNumber, $lowerLimit, $upperLimit) = @ARGV; 31 32 if( (@ARGV < 3) or (@ARGV > 5) ) { 33 print "\nSyntax is: l2hPrecreateProb.pl course_name set_definition_filename prob_number or\n"; 34 print " l2hPrecreateProb.pl course_name set_definition_filename prob_number lowerLimit or\n"; 35 print " l2hPrecreateProb.pl course_name set_definition_filename prob_number lowerLimit upperLimit\n\n"; 36 print " (e.g. l2hPrecreateProb.pl demoCourse set1.def 2 or\n"; 37 print " (e.g. l2hPrecreateProb.pl demoCourse set1.def 2 30000 or\n"; 38 print " (e.g. l2hPrecreateProb.pl demoCourse set1.def 2 30000 60000\n\n"; 39 40 print "The Problem is pre created for all psvn's between lower and upper limits if the limits\n"; 41 print " are given.\n\n"; 42 exit(0); 43 } 44 45 my $scriptDirectory = getWebworkScriptDirectory(); 46 47 require "${scriptDirectory}precreate.pl"; 48 49 precreate('prob', 'Latex2HTML', $courseID, $fileName, $probNumber, $lowerLimit, $upperLimit); 50
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |