'."\n";
$result.=' Specify a file containing the class scores for problem - '.$ENV{'form.probTitle'}.
@@ -2768,6 +2768,110 @@ sub updateGradeByPage {
#
#-------------------------------------------------------------------
+#--------------------Scantron Grading-----------------------------------
+#
+#------ start of section for handling grading by page/sequence ---------
+
+sub getSequenceDropDown {
+ my ($request,$symb)=@_;
+ my $result='';
+ return $result;
+}
+
+sub scantron_selectphase {
+ my ($r) = @_;
+ my ($symb,$url)=&get_symb_and_url($r);
+ if (!$symb) {return '';}
+ my $sequence_selector=&getSequenceDropDown($r,$symb);
+ my $result;
+ $result.= <
+
+
+
+
+
+
+
+
+
+ Specify file location and which Folder/Sequence to grade
+
+
+
+
+ Sequence to grade: $sequence_selector
+
+
+
+
+
+ Filename of scoring office file:
+
+
+
+
+
+
+
+
+
+SCANTRONFORM
+
+ return $result;
+}
+
+sub scantron_configphase {
+ my ($r) = @_;
+ my $sequence=$ENV{'form.selectpage'};
+ my $result;
+ $result.="got page $sequence";
+ $Apache::lonxml::debug=1;
+ &Apache::lonhomework::showhash(%ENV);
+ $Apache::lonxml::debug=0;
+ #FIXME Needs to present some lines from the file and allow the instructor to specify which columns represent what data, possibly have some nice defaults setup, probably should do a pass through all problems for a student to get an idea of how many questions there are, and homw many lines we'll have,
+ return $result;
+}
+
+sub scantron_process_students {
+ #FIXME
+ # loop through students, {
+ # Check if studnet info valid, if not add line to delay queue
+ # foreach question 'submit' the students answer to the server
+ # through grade target {
+ # generate data to pass back that includes grade recevied
+ # }
+ # }
+ # loop through delay queue {
+ # print out each delayed student with interface to select how
+ # to repair student provided info
+ # Expected errors include
+ # 1 bad/no stuid/username
+ # 2 invalid bubblings
+ # }
+ # if delay queue exists 2 submits one to process delayed students one
+ # to ignore delayed students, possibly saving the delay queue for later
+
+}
+#-------- end of section for handling grading scantron forms -------
+#
+#-------------------------------------------------------------------
+
+
#-------------------------- Menu interface -------------------------
#
#--- Show a Grading Menu button - Calls the next routine ---
@@ -2796,7 +2900,7 @@ sub gradingmenu {
var cmd = formname.command;
formname.lastCmd.value = radioSelection(formname.command);
formname.lastSec.value = pullDownSelection(formname.section);
- if (cmd[0].checked || cmd[1].checked || cmd[2].checked) {
+ if (cmd[0].checked || cmd[1].checked || cmd[2].checked || cmd[4].checked) {
formname.submit();
}
@@ -2809,7 +2913,7 @@ sub gradingmenu {
newWin.focus();
}
- if (cmd[4].checked) {
+ if (cmd[5].checked) {
if (!checkReceiptNo(formname,'notOK')) { return false;}
formname.submit();
}
@@ -2851,7 +2955,7 @@ sub gradingmenu {
GRADINGMENUJS
- my $probTitle = &Apache::lonnet::metadata($ENV{'form.url'},'title');
+ my $probTitle = &Apache::lonnet::gettitle($ENV{'form.url'});
my $result='