[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework grades.pm
raeburn
raeburn at source.lon-capa.org
Mon Jan 25 09:25:55 EST 2021
raeburn Mon Jan 25 14:25:55 2021 EDT
Modified files: (Branch: version_2_11_X)
/loncom/homework grades.pm
Log:
- For 2.11
Backport 1.782, 1.783, 1.784
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.596.2.12.2.56 loncom/homework/grades.pm:1.596.2.12.2.57
--- loncom/homework/grades.pm:1.596.2.12.2.56 Tue Jan 5 22:01:28 2021
+++ loncom/homework/grades.pm Mon Jan 25 14:25:55 2021
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.596.2.12.2.56 2021/01/05 22:01:28 raeburn Exp $
+# $Id: grades.pm,v 1.596.2.12.2.57 2021/01/25 14:25:55 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1150,6 +1150,8 @@
my @sections;
if ($env{'request.course.sec'} ne '') {
@sections = ($env{'request.course.sec'});
+ } elsif ($env{'form.section'} eq '') {
+ @sections = ('all');
} else {
@sections = &Apache::loncommon::get_env_multiple('form.section');
}
@@ -1191,7 +1193,7 @@
'<input type="hidden" name="symb" value="'.&Apache::lonenc::check_encrypt($symb).'" />'."\n".
'<input type="hidden" name="saveStatusOld" value="'.$saveStatus.'" />'."\n";
if (exists($env{'form.Status'})) {
- $gradeTable .= '<input type="hidden" name="Status" value="'.$stu_status.'" />'."\n";
+ $gradeTable .= '<input type="hidden" name="Status" value="'.$env{'form.Status'}.'" />'."\n";
} else {
$gradeTable .= &Apache::lonhtmlcommon::row_closure()
.&Apache::lonhtmlcommon::row_title(&mt('Student Status'))
@@ -10113,6 +10115,14 @@
my %options =
(&substatus_options,
'select_form_order' => ['yes','queued','graded','incorrect','all']);
+
+ #
+ # PrepareClasslist() needs to be called to avoid getting a sections list
+ # for a different course from the @Sections global in lonstatistics.pm,
+ # populated by an earlier request.
+ #
+ &Apache::lonstatistics::PrepareClasslist();
+
my $result='<div class="LC_columnSection">
<fieldset>
More information about the LON-CAPA-cvs
mailing list