Diff for /loncom/interface/lonnavmaps.pm between versions 1.266 and 1.267.2.7

version 1.266, 2004/07/09 23:05:51 version 1.267.2.7, 2004/09/21 19:28:34
Line 513  sub timeToHumanString { Line 513  sub timeToHumanString {
         }          }
   
         # Not this year, so show the year          # Not this year, so show the year
         my $timeStr = strftime("on %A, %b %e %G at %I:%M %P", localtime($time));          my $timeStr = strftime("on %A, %b %e %Y at %I:%M %P", localtime($time));
         $timeStr =~ s/12:00 am/00:00/;          $timeStr =~ s/12:00 am/00:00/;
         $timeStr =~ s/12:00 pm/noon/;          $timeStr =~ s/12:00 pm/noon/;
         return $timeStr;          return $timeStr;
Line 1260  sub render { Line 1260  sub render {
         # We only need to do this if we need to open the maps to show the          # We only need to do this if we need to open the maps to show the
         # current position. This will change the counter so we can't count          # current position. This will change the counter so we can't count
         # for the jump marker with this loop.          # for the jump marker with this loop.
         while (($curRes = $mapIterator->next()) && !$found) {          while ($here && ($curRes = $mapIterator->next()) && !$found) {
             if (ref($curRes) && $curRes->symb() eq $here) {              if (ref($curRes) && $curRes->symb() eq $here) {
                 my $mapStack = $mapIterator->getStack();                  my $mapStack = $mapIterator->getStack();
                                   
Line 1373  sub render { Line 1373  sub render {
     }      }
   
     # Check for any unread discussions in all resources.      # Check for any unread discussions in all resources.
     my $totdisc = 0;      if (0 && !$args->{'resource_no_folder_link'}) {
     my $haveDisc = '';   my $totdisc = 0;
     my @allres=$navmap->retrieveResources();   my $haveDisc = '';
     foreach my $resource (@allres) {   my @allres=$navmap->retrieveResources();
         if ($resource->hasDiscussion()) {   foreach my $resource (@allres) {
             my $ressymb;      if ($resource->hasDiscussion()) {
             if ($resource->symb() =~ m-(___adm/\w+/\w+)/(\d+)/bulletinboard$-) {   my $ressymb;
                 $ressymb = 'bulletin___'.$2.$1.'/'.$2.'/bulletinboard';   if ($resource->symb() =~ m-(___adm/\w+/\w+)/(\d+)/bulletinboard$-) {
             } else {      $ressymb = 'bulletin___'.$2.$1.'/'.$2.'/bulletinboard';
                 $ressymb = $resource->symb();   } else {
             }      $ressymb = $resource->symb();
             $haveDisc .= $ressymb.':';   }
             $totdisc ++;   $haveDisc .= $ressymb.':';
         }   $totdisc ++;
     }      }
     if ($totdisc > 0) {   }
         $haveDisc =~ s/:$//;   if ($totdisc > 0) {
         my %lt = &Apache::lonlocal::texthash(      $haveDisc =~ s/:$//;
            'mapr' => 'Mark all posts read',      my %lt = &Apache::lonlocal::texthash(
            );   'mapr' => 'Mark all posts read',
         $result .= (<<END);   );
 &nbsp;&nbsp;&nbsp;<a href="javascript:document.clearbubbles.submit()">$lt{'mapr'}</a>&nbsp;<a href="javascript:void(open('/adm/help/NavMaps_MarkPosts_Read.hlp', 'Help_for_NavMaps_MarkPosts', 'menubar=0,toolbar=1,scrollbars=1,width=350,height=400,resizable=yes'))" title="Online Help"><image src="/adm/help/gif/smallHelp.gif" border="0" alt="(Help: NavMaps_MarkPostsLink)" /></a>      $result .= (<<END);
 <form name="clearbubbles" method="post" action="/adm/feedback">          &nbsp;&nbsp;&nbsp;<a href="javascript:document.clearbubbles.submit()">$lt{'mapr'}</a>&nbsp;<a href="javascript:void(open('/adm/help/NavMaps_MarkPosts_Read.hlp', 'Help_for_NavMaps_MarkPosts', 'menubar=0,toolbar=1,scrollbars=1,width=350,height=400,resizable=yes'))" title="Online Help"><image src="/adm/help/gif/smallHelp.gif" border="0" alt="(Help: NavMaps_MarkPostsLink)" /></a>
 <input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" />   <form name="clearbubbles" method="post" action="/adm/feedback">
 <input type="hidden" name="navmaps" value="$haveDisc" />   <input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" />
 </form>   <input type="hidden" name="navmaps" value="$haveDisc" />
    </form>
 END  END
     } else {          } else {
         $result .= '<br />';      $result .= '<br />';
    }
     }      }
     $result .= "<br />\n";      $result .= "<br />\n";
     if ($r) {      if ($r) {
Line 1877  sub generate_email_discuss_status { Line 1879  sub generate_email_discuss_status {
           
     foreach my $msgid (split(/\&/, $keys)) {      foreach my $msgid (split(/\&/, $keys)) {
  $msgid=&Apache::lonnet::unescape($msgid);   $msgid=&Apache::lonnet::unescape($msgid);
  my $plain=&Apache::lonnet::unescape(&Apache::lonnet::unescape($msgid));   if ((!$emailstatus{$msgid}) || ($emailstatus{$msgid} eq 'new')) {
  if ($plain=~/(Error|Feedback) \[([^\]]+)\]/) {      my $plain=
     my ($what,$url)=($1,$2);   &Apache::lonnet::unescape(&Apache::lonnet::unescape($msgid));
     my %status=      if ($plain=~/(Error|Feedback) \[([^\]]+)\]/) {
  &Apache::lonnet::get('email_status',[$msgid]);   my ($what,$url)=($1,$2);
     if ($status{$msgid}=~/^error\:/) {   
  $status{$msgid}='';   
     }  
       
     if (($status{$msgid} eq 'new') ||   
  (!$status{$msgid})) {   
  if ($what eq 'Error') {   if ($what eq 'Error') {
     $error{$url}.=','.$msgid;       $error{$url}.=','.$msgid; 
  } else {   } else {
Line 1897  sub generate_email_discuss_status { Line 1893  sub generate_email_discuss_status {
  }   }
     }      }
           
       #url's of resources that have feedbacks
     $self->{FEEDBACK} = \%feedback;      $self->{FEEDBACK} = \%feedback;
     $self->{ERROR_MSG} = \%error; # what is this? JB      #or errors
       $self->{ERROR_MSG} = \%error;
     $self->{DISCUSSION_TIME} = \%discussiontime;      $self->{DISCUSSION_TIME} = \%discussiontime;
     $self->{EMAIL_STATUS} = \%emailstatus;      $self->{EMAIL_STATUS} = \%emailstatus;
     $self->{LAST_READ} = \%lastreadtime;      $self->{LAST_READ} = \%lastreadtime;
Line 3980  sub getCompletionStatus { Line 3978  sub getCompletionStatus {
   
     # Left as separate if statements in case we ever do more with this      # Left as separate if statements in case we ever do more with this
     if ($status eq 'correct_by_student') {return $self->CORRECT;}      if ($status eq 'correct_by_student') {return $self->CORRECT;}
       if ($status eq 'correct_by_scantron') {return $self->CORRECT;}
     if ($status eq 'correct_by_override') {return $self->CORRECT_BY_OVERRIDE; }      if ($status eq 'correct_by_override') {return $self->CORRECT_BY_OVERRIDE; }
     if ($status eq 'incorrect_attempted') {return $self->INCORRECT; }      if ($status eq 'incorrect_attempted') {return $self->INCORRECT; }
     if ($status eq 'incorrect_by_override') {return $self->INCORRECT_BY_OVERRIDE; }      if ($status eq 'incorrect_by_override') {return $self->INCORRECT_BY_OVERRIDE; }
Line 4130  sub status { Line 4129  sub status {
   
     if ($dateStatus == PAST_DUE_ANSWER_LATER ||      if ($dateStatus == PAST_DUE_ANSWER_LATER ||
         $dateStatus == PAST_DUE_NO_ANSWER ) {          $dateStatus == PAST_DUE_NO_ANSWER ) {
         return $dateStatus;           return $suppressFeedback ? ANSWER_SUBMITTED : $dateStatus; 
     }      }
   
     if ($dateStatus == ANSWER_OPEN) {      if ($dateStatus == ANSWER_OPEN) {

Removed from v.1.266  
changed lines
  Added in v.1.267.2.7


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>