[system] / trunk / webwork / system / scripts / totalPointsDataSet.pl Repository:
ViewVC logotype

View of /trunk/webwork/system/scripts/totalPointsDataSet.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (download) (as text) (annotate)
Mon Jun 18 15:21:51 2001 UTC (18 years, 8 months ago) by sam
File size: 1843 byte(s)
another setup script test (changed #! lines)

    1 #!/usr/local/bin/webwork-perl
    2 
    3 ## $Id$
    4 
    5 # This file is totalPointsDataSet.pl
    6 
    7         ## Takes two  command line arguments. The first is the classID
    8   ## The second is the the filename (without the extension) of the score
    9         ## database. E.g. demoCourse s5scr.  Computes the total score by calculating the
   10         ## sum over columns 4,5, ..., last column of (prob value)*(prob scr). Note that col. 1
   11         ## is the student id, and col.'s 2 and 3 hold the student last and first names.
   12         ## The total is appended as a new col in the score database with a prob value of 0
   13         ## so that it will not contribute to future calculations of the total score.
   14 
   15         ## Note: warning messages given by -w switch can safely be ignored AKP 8/20/96
   16 
   17 
   18 if (@ARGV != 2)
   19   {print "\nSyntax is totalPointsDataSet.pl courseID scoreDataSetFile \n";
   20    print "File names are entered with or without the extension, e.g. enter s7scr or s7scr.csv \n";
   21    print "      (e.g. totalPointsDataSet.pl MTH140A s7scr ) \n\n";
   22    exit(0);
   23   }
   24 
   25 #require "webwork.ph";
   26 #require "${scriptDirectory}$DBglue_pl";
   27 #require "${scriptDirectory}$SCRtools_pl";
   28 #require "${scriptDirectory}FILE.pl";
   29 
   30 use lib '.'; use webworkInit; # WeBWorKInitLine
   31 use Global;
   32 
   33 local($courseID,$fileName)=@ARGV;
   34 
   35 $scriptDirectory  = $Global::scriptDirectory;
   36 &Global::getCourseEnvironment($courseID);
   37 
   38 require "${scriptDirectory}$Global::DBglue_pl";
   39 require "${scriptDirectory}$Global::FILE_pl";
   40 require "${scriptDirectory}$Global::SCRtools_pl";
   41 
   42 $fileName =~ s/\.$Global::dat$//;  ## remove dat extension if present
   43 
   44 print "\n       Enter a caption or label for the new total column. E.g. if you totalling \n";
   45 print "the results from set number 3, enter 3 or set 3. Just hit return for no caption.\n";
   46 $caption=<STDIN>;
   47 chomp($caption);
   48 
   49 
   50 &total_score($fileName,$caption);

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9