[LON-CAPA-cvs] cvs: loncom /homework grades.pm

www www@source.lon-capa.org
Mon, 12 Apr 2010 22:19:54 -0000


This is a MIME encoded message

--www1271110794
Content-Type: text/plain

www		Mon Apr 12 22:19:54 2010 EDT

  Modified files:              
    /loncom/homework	grades.pm 
  Log:
  Eliminate unused "form.saveStatus"
  Breadcrumbs
  
  
--www1271110794
Content-Type: text/plain
Content-Disposition: attachment; filename="www-20100412221954.txt"

Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.612 loncom/homework/grades.pm:1.613
--- loncom/homework/grades.pm:1.612	Mon Apr 12 13:11:42 2010
+++ loncom/homework/grades.pm	Mon Apr 12 22:19:53 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.612 2010/04/12 13:11:42 www Exp $
+# $Id: grades.pm,v 1.613 2010/04/12 22:19:53 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -617,7 +617,6 @@
 	"\n");
     $jscript.= '<form action="/adm/grades" method="post" name="onestudent">'."\n".
 	'<input type="hidden" name="symb"    value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
-	'<input type="hidden" name="saveState" value="'.$env{'form.saveState'}.'" />'."\n".
 	'<input type="hidden" name="Status"  value="'.$stu_status.'" />'."\n".
 	'<input type="hidden" name="command" value="submission" />'."\n".
 	'<input type="hidden" name="student" value="" />'."\n".
@@ -920,7 +919,6 @@
 	'<input type="hidden" name="submitonly"  value="'.$submitonly.'" />'."\n".
 	'<input type="hidden" name="handgrade"   value="'.$env{'form.handgrade'}.'" /><br />'."\n".
 	'<input type="hidden" name="showgrading" value="'.$env{'form.showgrading'}.'" /><br />'."\n".
-	'<input type="hidden" name="saveState"   value="'.$env{'form.saveState'}.'" />'."\n".
 	'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
 	'<input type="hidden" name="saveStatusOld" value="'.$saveStatus.'" />'."\n";
 
@@ -1956,7 +1954,6 @@
 	my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status'));
 	$request->print('<form action="/adm/grades" method="post" name="SCORE" enctype="multipart/form-data">'."\n".
 			'<input type="hidden" name="command"    value="handgrade" />'."\n".
-			'<input type="hidden" name="saveState"  value="'.$env{'form.saveState'}.'" />'."\n".
 			'<input type="hidden" name="Status"     value="'.$stu_status.'" />'."\n".
 			'<input type="hidden" name="overRideScore" value="'.$overRideScore.'" />'."\n".
 			'<input type="hidden" name="refresh"    value="off" />'."\n".
@@ -3289,7 +3286,6 @@
 	'<input type="hidden" name="symb"    value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
 	'<input type="hidden" name="command" value="editgrades" />'."\n".
 	&build_section_inputs().
-	'<input type="hidden" name="saveState" value="'.$env{'form.saveState'}.'" />'."\n".
 	'<input type="hidden" name="Status" value="'.$env{'stu_status'}.'" />'."\n".
 
     my ($common_header,$specific_header);
@@ -3856,7 +3852,6 @@
 <input type="hidden" name="upfile_associate" 
                                        value="$env{'form.upfile_associate'}" />
 <input type="hidden" name="symb"       value="$symb" />
-<input type="hidden" name="saveState"  value="$env{'form.saveState'}" />
 <input type="hidden" name="command"    value="csvuploadoptions" />
 <hr />
 ENDPICK
@@ -3934,7 +3929,6 @@
 <form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload">
 <input type="hidden" name="symb" value="$symb" />
 <input type="hidden" name="command" value="csvuploadmap" />
-<input type="hidden" name="saveState"  value="$env{'form.saveState'}" />
 $upfile_select
 <br /><input type="button" onclick="javascript:checkUpload(this.form);" value="$upload" />
 <label><input type="checkbox" name="noFirstLine" />$ignore</label>
@@ -4248,8 +4242,7 @@
     my $stu_status = join(':',&Apache::loncommon::get_env_multiple('form.Status'));
     $result.='<input type="hidden" name="Status"  value="'.$stu_status.'" />'."\n".
 	'<input type="hidden" name="command" value="displayPage" />'."\n".
-	'<input type="hidden" name="symb"    value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
-	'<input type="hidden" name="saveState" value="'.$env{'form.saveState'}.'" />'."<br />\n";
+	'<input type="hidden" name="symb"    value="'.&Apache::lonenc::check_encrypt($symb).'" />'."<br />\n";
 
     $result.='&nbsp;<b>'.&mt('Use CODE').': </b> <input type="text" name="CODE" value="" /> <br />'."\n";
 
@@ -4388,8 +4381,7 @@
 	'<input type="hidden" name="page"    value="'.$pageTitle.'" />'."\n".
 	'<input type="hidden" name="title"   value="'.$env{'form.title'}.'" />'."\n".
 	'<input type="hidden" name="symb"    value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
-	'<input type="hidden" name="overRideScore" value="no" />'."\n".
-	'<input type="hidden" name="saveState" value="'.$env{'form.saveState'}.'" />'."\n";
+	'<input type="hidden" name="overRideScore" value="no" />'."\n";
 
     if (defined($env{'form.CODE'})) {
 	$studentTable.=
@@ -4852,8 +4844,7 @@
 
 sub defaultFormData {
     my ($symb)=@_;
-    return '<input type="hidden" name="symb"    value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
-     '<input type="hidden" name="saveState" value="'.$env{'form.saveState'}.'" />';
+    return '<input type="hidden" name="symb"    value="'.&Apache::lonenc::check_encrypt($symb).'" />';
 }
 
 
@@ -8417,7 +8408,6 @@
     my ($symb)=@_;
     my $result.='<br /><form action="/adm/grades" method="post">'."\n".
 	'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
-	'<input type="hidden" name="saveState"  value="'.$env{'form.saveState'}.'" />'."\n".
 	'<input type="hidden" name="command" value="gradingmenu" />'."\n".
 	'<input type="submit" name="submit" value="'.&mt('Grading Menu').'" />'."\n".
 	'</form>'."\n";
@@ -8822,7 +8812,6 @@
 <form method="post" enctype="multipart/form-data" action="/adm/grades" name="gradesupload">
 <input type="hidden" name="symb" value="$symb" />
 <input type="hidden" name="command" value="processclickerfile" />
-<input type="hidden" name="saveState"  value="$env{'form.saveState'}" />
 <input type="file" name="upfile" size="50" />
 <br /><label>$type: $selectform</label>
 <br /><label><input type="radio" name="gradingmechanism" value="attendance"$checked{'attendance'} onclick="sanitycheck()" />$attendance </label>
@@ -8928,7 +8917,6 @@
 <form method="post" action="/adm/grades" name="clickeranalysis">
 <input type="hidden" name="symb" value="$symb" />
 <input type="hidden" name="command" value="assignclickergrades" />
-<input type="hidden" name="saveState"  value="$env{'form.saveState'}" />
 <input type="hidden" name="gradingmechanism" value="$env{'form.gradingmechanism'}" />
 <input type="hidden" name="pcorrect" value="$env{'form.pcorrect'}" />
 <input type="hidden" name="pincorrect" value="$env{'form.pincorrect'}" />
@@ -9196,11 +9184,13 @@
 }
 
 sub startpage {
-    my ($r,$symb,$crumbs,$onlyfolderflag) = @_;
+    my ($r,$symb,$crumbs,$onlyfolderflag,$nodisplayflag) = @_;
     unshift(@$crumbs,{href=>"/adm/grades?command=gradingmenu&symb=".&HTML::Entities::encode($symb,'<>&"'),text=>"Grading"});
     $r->print(&Apache::loncommon::start_page('Grading',undef,
                                           {'bread_crumbs' => $crumbs}));
-    $r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag));
+    unless ($nodisplayflag) {
+       $r->print(&Apache::lonhtmlcommon::resource_info_box($symb,$onlyfolderflag));
+    }
 }
 
 sub handler {
@@ -9266,13 +9256,13 @@
             &startpage($request,$symb);
             $request->print(&submit_options($request,$symb));
         } elsif ($command eq 'table' && $perm{'vgr'}) {
-            &startpage($request,$symb);
+            &startpage($request,$symb,[{href=>"", text=>"Grading table"}],1);
             $request->print(&submit_options_table($request,$symb));
         } elsif ($command eq 'all_for_one' && $perm{'vgr'}) {
             &startpage($request,$symb);
             $request->print(&submit_options_sequence($request,$symb));
 	} elsif ($command eq 'viewgrades' && $perm{'vgr'}) {
-            &startpage($request,$symb);
+            &startpage($request,$symb,[{href=>"/adm/grades?symb=".&HTML::Entities::encode($symb,'<>&"')."&command=table", text=>"Grading table"},{href=>'', text=>"Modify grades"}],1);
 	    $request->print(&viewgrades($request,$symb));
 	} elsif ($command eq 'handgrade' && $perm{'mgr'}) {
             &startpage($request,$symb);

--www1271110794--