Parent Directory
|
Revision Log
changed #! lines to /usr/bin/env perl THIS SHOULD BE THE LAST TIME #! LINES ARE CHANGED!!!!!!!
1 #!/usr/bin/env perl 2 3 4 BEGIN { 5 my $useLibDir = '.'; 6 if ($0 =~ m|^(/.*)/|) { $useLibDir = $1; } 7 elsif ($0 =~ m|^(\..*)/|) { $useLibDir = $1; } 8 elsif ($0 =~ m|^(.+)/|) { $useLibDir = "./$1"; } 9 unshift @INC, $useLibDir; 10 } 11 12 use webworkInit; # WeBWorKInitLine 13 use Global; 14 15 16 # This file is deleteColumns.pl 17 18 19 ## Takes four command line arguments. 20 ## The first is the course name. 21 ## The second is the filename (without the extension), 22 ## the third is the first column of a range ofcolumns to delete, 23 ## the fourth is the last column of a range ofcolumns to delete, 24 ## e.g. deleteLastColumns.pl className s5ful 14 24 or deleteLastColumns.pl className s5scr 9 13. 25 ## Note that "ful" files contain 2 columns for each problem (a `#corr' and an `#incorr' 26 ## column) where as "scr" files contain 1 column for each problem (a `score' column). 27 28 29 #require "webwork.ph"; 30 #require "${scriptDirectory}$DBglue_pl"; 31 #require "${scriptDirectory}$SCRtools_pl"; 32 #require "${scriptDirectory}FILE.pl"; 33 34 if (@ARGV != 4) 35 {print "\nSyntax is deleteColumns.pl courseID dataSetFile firstColumn lastColumn \n"; 36 print "File names are entered with or without the extension, e.g. enter s7scr or s7scr.csv \n"; 37 print " (e.g. deleteColumns.pl MTH140A s7scr 10 15 or\n"; 38 print " deleteColumns.pl MTH140A s7scr -6 -1 ) \n\n"; 39 exit(0); 40 } 41 42 local($courseID, $fileName1,$num1, $num2)=@ARGV; 43 44 $scriptDirectory = $Global::scriptDirectory; 45 &Global::getCourseEnvironment($courseID); 46 47 require "${scriptDirectory}$Global::DBglue_pl"; 48 require "${scriptDirectory}$Global::FILE_pl"; 49 require "${scriptDirectory}$Global::SCRtools_pl"; 50 51 $fileName1 =~ s/\.$Global::dat$//; ## remove dat extension if present 52 53 54 55 &delete_columns ($fileName1,$num1, $num2,1);
| aubreyja at gmail dot com | ViewVC Help |
| Powered by ViewVC 1.0.9 |