--- loncom/interface/lonnavmaps.pm 2022/10/04 20:39:59 1.562 +++ loncom/interface/lonnavmaps.pm 2025/02/03 00:08:31 1.569 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Navigate Maps Handler # -# $Id: lonnavmaps.pm,v 1.562 2022/10/04 20:39:59 raeburn Exp $ +# $Id: lonnavmaps.pm,v 1.569 2025/02/03 00:08:31 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -549,6 +549,10 @@ my %colormap = $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 => '', @@ -694,10 +698,10 @@ sub getDescription { 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 { @@ -1116,7 +1120,7 @@ sub render_resource { } # Decide what to display - $result .= "$newBranchText$linkopen$icon$linkclose"; + $result .= "$newBranchText$linkopen$icon"; my $curMarkerBegin = ''; my $curMarkerEnd = ''; @@ -1156,7 +1160,7 @@ sub render_resource { $linkopen = ""; } } - $result .= "$curMarkerBegin$linkopen$title$partLabel$linkclose$curMarkerEnd$editmapLink$nonLinkedText"; + $result .= "$curMarkerBegin$title$partLabel$curMarkerEnd$linkclose$editmapLink$nonLinkedText"; return $result; } @@ -1590,27 +1594,18 @@ sub render { my $printKey = $args->{'printKey'}; my $printCloseAll = $args->{'printCloseAll'}; if (!defined($printCloseAll)) { $printCloseAll = 1; } - + # Print key? if ($printKey) { - $result .= ''; - $result.=''; - my $location=&Apache::loncommon::lonhttpdurl("/adm/lonMisc"); - if ($navmap->{LAST_CHECK}) { - $result .= - ' '.&mt('New discussion since').' '. - strftime("%A, %b %e at %I:%M %P", localtime($navmap->{LAST_CHECK})). - ''; - } else { - $result .= ''; - } - - $result .= '
Key:    '. - ' '.&mt('New message (click to open)').'

'. - '

  '. - ' '.&mt('Discussions').''. - '   '.&mt('New message (click to open)'). - '
'; + my $location = &Apache::loncommon::lonhttpdurl("/adm/lonMisc"); + $result .= ''. + ''. + '
Key:    '. + ' '.&mt('Unread Discussion'). + ''. + '   '. + &mt('New message (click to open)'). + '
'."\n"; } if ($printCloseAll && !$args->{'resource_no_folder_link'}) { @@ -1637,17 +1632,19 @@ sub render { # Check for any unread discussions in all resources. if (($args->{'caller'} eq 'navmapsdisplay') && (!$args->{'notools'})) { + my $markread = 'Mark all posts read'; &add_linkitem($args->{'linkitems'},'clearbubbles', 'document.clearbubbles.submit()', - 'Mark all posts read'); + $markread); my $time=time; + my $submit = &mt($markread); my $querystr = &HTML::Entities::encode($ENV{'QUERY_STRING'},'<>&"'); $result .= (< +