[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonnavmaps.pm
raeburn
raeburn at source.lon-capa.org
Tue Jul 2 11:53:17 EDT 2024
raeburn Tue Jul 2 15:53:17 2024 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonnavmaps.pm
Log:
- For 2.11
Backport 1.563
Index: loncom/interface/lonnavmaps.pm
diff -u loncom/interface/lonnavmaps.pm:1.509.2.15 loncom/interface/lonnavmaps.pm:1.509.2.16
--- loncom/interface/lonnavmaps.pm:1.509.2.15 Mon Jul 1 18:13:20 2024
+++ loncom/interface/lonnavmaps.pm Tue Jul 2 15:53:16 2024
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Navigate Maps Handler
#
-# $Id: lonnavmaps.pm,v 1.509.2.15 2024/07/01 18:13:20 raeburn Exp $
+# $Id: lonnavmaps.pm,v 1.509.2.16 2024/07/02 15:53:16 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
@@ -534,6 +534,10 @@
$resObj->EXCUSED => '#3333FF',
$resObj->PAST_DUE_ANSWER_LATER => '',
$resObj->PAST_DUE_NO_ANSWER => '',
+ $resObj->PAST_DUE_ATMPT_ANS => '',
+ $resObj->PAST_DUE_ATMPT_NOANS => '',
+ $resObj->PAST_DUE_NO_ATMT_ANS => '',
+ $resObj->PAST_DUE_NO_ATMT_NOANS => '',
$resObj->ANSWER_OPEN => '#006600',
$resObj->OPEN_LATER => '',
$resObj->TRIES_LEFT => '',
@@ -679,10 +683,10 @@
return &Apache::lonhtmlcommon::direct_parm_link(&mt("Open, no due date"),$res->symb(),'duedate',$part).$slotinfo;
}
}
- if ($status == $res->PAST_DUE_ANSWER_LATER) {
+ if (($status == $res->PAST_DUE_ANSWER_LATER) || ($status == $res->PAST_DUE_ATMPT_ANS) || ($status == $res->PAST_DUE_NO_ATMT_ANS)) {
return &mt("Answer open [_1]",&Apache::lonhtmlcommon::direct_parm_link(&timeToHumanString($answer,'start'),$res->symb(),'answerdate',$part));
}
- if ($status == $res->PAST_DUE_NO_ANSWER) {
+ if (($status == $res->PAST_DUE_NO_ANSWER) || ($status == $res->PAST_DUE_ATMPT_NOANS) || ($status == $res->PAST_DUE_NO_ATMT_NOANS)) {
if ($res->is_practice()) {
return &mt("Closed [_1]",&Apache::lonhtmlcommon::direct_parm_link(&timeToHumanString($due,'start'),$res->symb(),'answerdate,duedate',$part));
} else {
@@ -5320,7 +5324,6 @@
Open and not yet due.
-
=item * B<PAST_DUE_ANSWER_LATER>:
The due date has passed, but the answer date has not yet arrived.
@@ -5333,6 +5336,26 @@
The answer date is here.
+=item * B<NOTHING_SET>:
+
+No dates have been set for this problem at all.
+
+=item * B<PAST_DUE_ATMPT_ANS>:
+
+The due date has passed, feedback is suppressed, the problem was attempted, and the answer date has not yet arrived.
+
+=item * B<PAST_DUE_ATMPT_NOANS>:
+
+The due date has passed, feedback is suppressed, the problem was attempted, and there is no answer opening date set.
+
+=item * B<PAST_DUE_NO_ATMT_ANS>:
+
+The due date has passed, feedback is suppressed, the problem was not attempted, and the answer date has not yet arrived.
+
+=item * B<PAST_DUE_NO_ATMT_NOANS>:
+
+The due date has passed, feedback is suppressed, the problem was not attempted, and there is no answer opening date set.
+
=item * B<NETWORK_FAILURE>:
The information is unknown due to network failure.
@@ -5348,6 +5371,10 @@
sub PAST_DUE_ANSWER_LATER { return 3; }
sub ANSWER_OPEN { return 4; }
sub NOTHING_SET { return 5; }
+sub PAST_DUE_ATMPT_ANS { return 6; }
+sub PAST_DUE_ATMPT_NOANS { return 7; }
+sub PAST_DUE_NO_ATMT_ANS { return 8; }
+sub PAST_DUE_NO_ATMT_NOANS { return 9; }
sub NETWORK_FAILURE { return 100; }
# getDateStatus gets the date status for a given problem part.
@@ -5537,6 +5564,26 @@
The problem is past due, not considered correct, and an answer date in
the future is set.
+=item * B<PAST_DUE_ATMPT_ANS>:
+
+The problem is past due, feedback is suppressed, the problem was
+attempted and an answer date in the future is set.
+
+=item * B<PAST_DUE_ATMPT_NOANS>:
+
+The problem is past due, feedback is suppressed, the problem was
+attempted and no answer date is set.
+
+=item * B<PAST_DUE_NO_ATMT_ANS>:
+
+The problem is past due, feedback is suppressed, the problem was
+not attempted and an answer date in the future is set.
+
+=item * B<PAST_DUE_NO_ATMT_NOANS>:
+
+The problem is past due, feedback is suppressed, the problem was
+not attempted and no answer date is set.
+
=item * B<ANSWER_OPEN>:
The problem is past due, not correct, and the answer is now available.
@@ -5619,7 +5666,18 @@
# There are a few whole rows we can dispose of:
if ($completionStatus == CORRECT ||
$completionStatus == CORRECT_BY_OVERRIDE ) {
- if ( $suppressFeedback ) { return ANSWER_SUBMITTED }
+ if ( $suppressFeedback ) {
+ if ($dateStatus == PAST_DUE_ANSWER_LATER ||
+ $dateStatus == PAST_DUE_NO_ANSWER ) {
+ if ($dateStatus == PAST_DUE_ANSWER_LATER) {
+ return PAST_DUE_ATMPT_ANS;
+ } else {
+ return PAST_DUE_ATMPT_NOANS;
+ }
+ } else {
+ return ANSWER_SUBMITTED;
+ }
+ }
my $awarded=$self->awarded($part);
if ($awarded < 1 && $awarded > 0) {
return PARTIALLY_CORRECT;
@@ -5658,7 +5716,23 @@
if ($dateStatus == PAST_DUE_ANSWER_LATER ||
$dateStatus == PAST_DUE_NO_ANSWER ) {
- return $suppressFeedback ? ANSWER_SUBMITTED : $dateStatus;
+ if ($suppressFeedback) {
+ if ($completionStatus == NOT_ATTEMPTED) {
+ if ($dateStatus == PAST_DUE_ANSWER_LATER) {
+ return PAST_DUE_NO_ATMT_ANS;
+ } else {
+ return PAST_DUE_NO_ATMT_NOANS;
+ }
+ } else {
+ if ($dateStatus == PAST_DUE_ANSWER_LATER) {
+ return PAST_DUE_ATMPT_ANS;
+ } else {
+ return PAST_DUE_ATMPT_NOANS;
+ }
+ }
+ } else {
+ return $dateStatus;
+ }
}
if ($dateStatus == ANSWER_OPEN) {
@@ -5868,6 +5942,10 @@
EXCUSED() => CORRECT,
PAST_DUE_NO_ANSWER() => INCORRECT,
PAST_DUE_ANSWER_LATER() => INCORRECT,
+ PAST_DUE_ATMPT_ANS() => ATTEMPTED,
+ PAST_DUE_ATMPT_NOANS() => ATTEMPTED,
+ PAST_DUE_NO_ATMT_ANS() => CLOSED,
+ PAST_DUE_NO_ATMT_NOANS() => CLOSED,
ANSWER_OPEN() => INCORRECT,
OPEN_LATER() => CLOSED,
TRIES_LEFT() => OPEN,
More information about the LON-CAPA-cvs
mailing list