#!/usr/local/bin/webwork-perl ## This file is profScoring.pl ## It provides access to utilities for building, correcting and viewing problem sets ## #################################################################### # Copyright @ 1995-1998 University of Rochester # All Rights Reserved #################################################################### use lib '.'; use webworkInit; # WeBWorKInitLine use CGI qw(:standard); use Global; use Auth; use strict; # begin Timing code use Benchmark; my $beginTime = new Benchmark; # end Timing code &CGI::ReadParse; my %inputs =%main::in; # get information from CGI inputs (see also below for additional information) my $Course = $inputs{'course'}; my $User = $inputs{'user'}; my $Session_key = $inputs{'key'}; # verify that information has been received unless($Course && $User && $Session_key) { &wwerror("$0","The script did not receive the proper input data.","",""); die "The script profLogin.pl did not receive the proper input data."; } # establish environment for this script &Global::getCourseEnvironment($inputs{'course'}); my $cgiURL = getWebworkCgiURL; my $courseScriptsDirectory = getCourseScriptsDirectory; my $databaseDirectory = getCourseDatabaseDirectory; my $htmlURL = getCourseHtmlURL; my $scriptDirectory = getWebworkScriptDirectory; my $scoringDirectory = getCourseScoringDirectory; my $dat = getDat; require "${scriptDirectory}$Global::DBglue_pl"; require "${scriptDirectory}$Global::classlist_DBglue_pl"; require "${scriptDirectory}$Global::FILE_pl"; require "${scriptDirectory}$Global::HTMLglue_pl"; # log access &Global::log_info('', query_string); my $permissionsFile = &Global::getCoursePermissionsFile($inputs{'course'}); my $permissions = &get_permissions($inputs{'user'}, $permissionsFile); my $keyFile = &Global::getCourseKeyFile($inputs{'course'}); #verify session key &verify_key($inputs{'user'}, $inputs{'key'}, $keyFile, $inputs{'course'}); # verify permissions are correct if ($permissions != $Global::instructor_permissions ) { print "permissions = $permissions instructor_permissions = $Global::instructor_permissions\n"; print &html_NO_PERMISSION; exit(0); } # get the rest of the information from the submitted form # nothing further to get in this case # get information from the data base. # a list of all of the currently created sets: # Keys contains the set numbers and the value is a representative psvn my %availableSets = &getAllProbSetNumbersHash; my @sortedSetNames = &sortSetNamesByDueDate(\%availableSets); # print HTML text print &htmlTOP("Scoring Utilities"); # print navigation buttons print qq! [Up]

!; print <

WeBWorK scoring programs for $Course

From this page, you can score problem sets, download and upload the scoring spread sheet files, etc.

EOF ## profScoring form -- allows you to score problem sets print <


1. Score problem sets in $Course:

Select the set(s) you want to score.
EOF # enter the available set numbers print qq! \n!; print qq{
Append totals to ${Course}_totals.csv (Recommended)
Sort Order: by Student Name by Student ID
by Section then by Student Name by Section then by Student ID
by Recitation then by Student Name by Recitation then by Student ID
}; # resume printing the rest of the form print < EOF print <

2. Download (or view) $Course scoring files to your personal computer.

You can download files for editing or viewing in either cvs (i.e. comma delimited), html, text, or tab (i.e. tab delimited) format.
csv is a supported format for Excel and is the recommended format if you use Excel.

The totals file (${Course}_totals.csv) is the cummulative semester record of grades.
The scr files (e.g. s2scr.csv) give, for each problem set, the STATUS of individual problems. The STATUS is a number between 0 and 1 depending on (partial) credit earned. "STATUS" times "PROB VAL" gives the score for the problem.
The ful files (e.g. s2ful.csv) give, for each problem set, the STATUS plus data on the number of correct and incorrect attempts for each problem.
all files include backup files, etc.
format: csv html text tab
totals file scr files ful files all files
EOF # resume printing the rest of the form print < EOF print <

3. Simple editing of $Course scoring files.

Use this for simple editing, e.g. changing a few scores or possibly adding a new column of exam grades. For more complicated editing, download the file to a preadsheet program such as Excel by option 2 above.
totals file scr files ful files EOF # resume printing the rest of the form print < EOF print <

4. Upload $Course scoring files from your personal computer.

You can upload scoring files from your personal computer in cvs (i.e. comma delimited), tab (i.e. tab delimited), or html format. Usually you would do this after downloading and editing a file in Excel or some other spreadsheet program. Only valid scoring files with filenames ending in "_totals.ext", "scr.ext", and "ful.ext" can be uploaded where the extension "ext" must be "csv", "txt" (for tab delimited), "html" or "htm". You can not upload backup files without renaming them.
format on personal computer: csv tab html
Overwrite existing file Backup existing file first
File to upload:

the file.
EOF print <

5. Sort $Course scoring files.

Use this for sorting scoring files. Student records can be sorted by one of six methods: (a) by student name, (b) by student ID, (c) by section then by student name, (d) by section then by student ID, (e) by recitation then by student name and (f) by recitation then by student ID.
totals file scr files ful files
Sort Order: by Student Name by Student ID
by Section then by Student Name by Section then by Student ID
by Recitation then by Student Name by Recitation then by Student ID
EOF print &htmlBOTTOM("profScoring.pl", \%inputs,'profScoringHelp.html'); # begin Timing code my $endTime = new Benchmark; &Global::logTimingInfo($beginTime,$endTime,"profScoring.pl",$inputs{'course'},$inputs{'user'}); # end Timing code exit;