'.
''.
@@ -631,8 +639,7 @@ sub sub_page_kw_js {
//===================== Show list of keywords ====================
function keywords(keyform) {
- var keywds = keyform.value;
- var nret = prompt("Keywords list, separated by a space. Add/delete to list if desired.",keywds);
+ var nret = prompt("Keywords list, separated by a space. Add/delete to list if desired.",keyform.value);
if (nret==null) return;
keyform.value = nret;
@@ -701,91 +708,97 @@ sub sub_page_kw_js {
return;
}
+// var pWin = null;
function savedMsgHeader(Nmsg,usrctr,fullname) {
- var height = 50*Nmsg+250;
+ var height = 70*Nmsg+250;
var scrollbar = "no";
if (height > 600) {
height = 600;
scrollbar = "yes";
}
-/* if (window.pWin)
- window.pWin.close(); */
+// if (window.pWin) window.pWin.close();
pWin = window.open('', 'MessageCenter', 'toolbar=no,location=no,scrollbars='+scrollbar+',screenx=70,screeny=75,width=600,height='+height);
- pWin.document.write("");
- pWin.document.write("Message Central");
-
- pWin.document.write("
@@ -985,6 +1003,9 @@ sub submission {
if ($counter == 0) {
&sub_page_js($request);
&sub_page_kw_js($request);
+ $ENV{'form.probTitle'} = $ENV{'form.probTitle'} eq '' ?
+ &Apache::lonnet::gettitle($symb) : $ENV{'form.probTitle'};
+
$request->print(' Submission Record'."\n".
' Problem: '.$ENV{'form.probTitle'}.''."\n");
@@ -1015,8 +1036,10 @@ sub submission {
$request->print('
+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 ---
@@ -2776,40 +2878,41 @@ sub show_grading_menu_form {
my $result.=''."\n";
return $result;
}
+
#--- Displays the main menu page -------
sub gradingmenu {
my ($request) = @_;
my ($symb,$url)=&get_symb_and_url($request);
if (!$symb) {return '';}
+ my $probTitle = &Apache::lonnet::gettitle($symb);
+ my $saveCmd = ($ENV{'form.saveCmd'} eq '' ? 'pickStudentPage' : $ENV{'form.saveCmd'});
+ my $saveSec = ($ENV{'form.saveSec'} eq '' ? 'all' : $ENV{'form.saveSec'});
+ my $saveSub = ($ENV{'form.saveSub'} eq '' ? 'yes' : $ENV{'form.saveSub'});
+ my $saveStatus = ($ENV{'form.saveStatus'} eq '' ? 'Active' : $ENV{'form.saveStatus'});
$request->print(<
function checkChoice(formname) {
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) {
- formname.submit();
- }
+ formname.saveCmd.value = radioSelection(cmd);
+ formname.saveSec.value = pullDownSelection(formname.section);
+ formname.saveSub.value = radioSelection(formname.submitonly);
+ formname.saveStatus.value = pullDownSelection(formname.status);
+ if (cmd[0].checked || cmd[1].checked || cmd[2].checked || cmd[4].checked) formname.submit();
- if (cmd[3].checked) {
- var url = "/adm/grades?command=csvform&symb="+formname.symb.value+"&url="+formname.url.value;
- var options = "width=620,height=340,screenx=70,screeny=75,";
- options += "resizable=no,scrollbars=no,status=no,";
- options += "menubar=no,toolbar=no,location=no,directories=no";
- var newWin = window.open(url, "CSVFile", options);
- newWin.focus();
- }
+ if (cmd[3].checked) browseAndUpload();
- if (cmd[4].checked) {
+ if (cmd[5].checked) {
if (!checkReceiptNo(formname,'notOK')) { return false;}
formname.submit();
}
@@ -2826,35 +2929,94 @@ sub gradingmenu {
formname.receipt.focus();
return false;
}
- formname.command[4].checked = true;
+ formname.command[5].checked = true;
return true;
}
function radioSelection(radioButton) {
var selection=null;
- for (var i=0; i 1) {
+ for (var i=0; i 1) {
+ for (var i=0; i");
+ lDoc.write("Browse And Upload");
+
+ lDoc.write("
GRADINGMENUJS
- my $probTitle = &Apache::lonnet::metadata($ENV{'form.url'},'title');
my $result=' Manual Grading/View Submission'.
''.
- 'Problem: '.$probTitle.' | ';
+ 'Problem: '.$probTitle.' | '."\n";
my ($partlist,$handgrade) = &response_type($url);
my ($resptype,$hdgrade)=('','no');
for (sort keys(%$handgrade)) {
@@ -2865,11 +3027,9 @@ GRADINGMENUJS
'Type: '.$responsetype.' | '.
'Handgrade: '.$handgrade.' | ';
}
- $result.=' ';
+ $result.=' '."\n";
- my ($classlist,$sections) = &getclasslist('all','0');
- my $lastCmd = ($ENV{'form.lastCmd'} eq '' ? 'pickStudentPage' : $ENV{'form.lastCmd'});
- my $lastSec = ($ENV{'form.lastSec'} eq '' ? 'all' : $ENV{'form.lastSec'});
+ my (undef,$sections) = &getclasslist('all','0');
$result.=' |