[LON-CAPA-cvs] cvs: loncom /homework lonhomework.pm /interface lonextresedit.pm
raeburn
raeburn at source.lon-capa.org
Wed Sep 10 22:06:02 EDT 2025
raeburn Thu Sep 11 02:06:02 2025 EDT
Modified files:
/loncom/interface lonextresedit.pm
/loncom/homework lonhomework.pm
Log:
- Bug 6623. Display: "was due on <duedate>" between duedate and answerdate,
if no grace parameter in effect, and "was within the grace period up to
<overduedate>" between grace end date and answerdate.
Index: loncom/interface/lonextresedit.pm
diff -u loncom/interface/lonextresedit.pm:1.22 loncom/interface/lonextresedit.pm:1.22.2.1
--- loncom/interface/lonextresedit.pm:1.22 Fri Dec 15 16:33:51 2017
+++ loncom/interface/lonextresedit.pm Thu Apr 9 22:37:32 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: lonextresedit.pm,v 1.22 2017/12/15 16:33:51 raeburn Exp $
+# $Id: lonextresedit.pm,v 1.22.2.1 2020/04/09 22:37:32 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -258,7 +258,6 @@
sub update_exttool {
my ($marker,$cdom,$cnum,$args) = @_;
- my %toolhash=&Apache::lonnet::dump('exttool_'.$marker,$cdom,$cnum);
my (%newhash,$changed, at deleted,$errormsg);
($newhash{'target'},$newhash{'width'},$newhash{'height'},$newhash{'linktext'},$newhash{'explanation'},
$newhash{'crslabel'},$newhash{'crstitle'},$newhash{'crsappend'}) = split(/:/,$args);
Index: loncom/homework/lonhomework.pm
diff -u loncom/homework/lonhomework.pm:1.399 loncom/homework/lonhomework.pm:1.400
--- loncom/homework/lonhomework.pm:1.399 Tue Sep 9 23:00:00 2025
+++ loncom/homework/lonhomework.pm Thu Sep 11 02:06:01 2025
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Homework handler
#
-# $Id: lonhomework.pm,v 1.399 2025/09/09 23:00:00 raeburn Exp $
+# $Id: lonhomework.pm,v 1.400 2025/09/11 02:06:01 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -556,6 +556,7 @@
my $status;
my $datemsg = '';
my $lastdate = '';
+ my $hadgrace = '';
my $type;
my $passed;
@@ -628,6 +629,7 @@
&Apache::lonxml::debug("found :$date: for :$temp:");
if ($date eq '') {
if ($temp eq 'overduedate') {
+ $date = $lastdate;
$passed = 1;
} else {
$date = &mt("an unknown date"); $passed = 0;
@@ -638,7 +640,7 @@
if (time < $date) { $passed = 0; } else { $passed = 1; }
$date = &Apache::lonlocal::locallocaltime($date);
}
- if (!$passed) { $type=$temp; last; }
+ if (!$passed) { $type=$temp; last; } elsif ($temp eq 'overduedate') { $hadgrace = 1; }
}
&Apache::lonxml::debug("have :$type:$passed:");
if ($passed) {
@@ -655,8 +657,13 @@
$datemsg = &mt('past-due grace period until [_1]',$date);
} elsif ($type eq 'answerdate') {
$status='CLOSED';
- $datemsg = &mt('was due on [_1], and answers will be available on [_2]',
+ if ($hadgrace) {
+ $datemsg = &mt('was within the grace period up to [_1], and answers will be available on [_2]',
$lastdate,$date);
+ } else {
+ $datemsg = &mt('was due on [_1], and answers will be available on [_2]',
+ $lastdate,$date);
+ }
}
}
if ($status eq 'CAN_ANSWER' ||
More information about the LON-CAPA-cvs
mailing list