Diff for /loncom/interface/lonnavmaps.pm between versions 1.267.2.4 and 1.267.2.8

version 1.267.2.4, 2004/09/13 20:09:33 version 1.267.2.8, 2004/10/07 19:55:52
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 1374  sub render { Line 1374  sub render {
   
     # Check for any unread discussions in all resources.      # Check for any unread discussions in all resources.
     if (!$args->{'resource_no_folder_link'}) {      if (!$args->{'resource_no_folder_link'}) {
  my $totdisc = 0;   my $time=time;
  my $haveDisc = '';   my $mapr = &mt('Mark all posts read');
  my @allres=$navmap->retrieveResources();   $result .= (<<END);
  foreach my $resource (@allres) {          &nbsp;&nbsp;&nbsp;<a href="javascript:document.clearbubbles.submit()">$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>
     if ($resource->hasDiscussion()) {  
  my $ressymb;  
  if ($resource->symb() =~ m-(___adm/\w+/\w+)/(\d+)/bulletinboard$-) {  
     $ressymb = 'bulletin___'.$2.$1.'/'.$2.'/bulletinboard';  
  } else {  
     $ressymb = $resource->symb();  
  }  
  $haveDisc .= $ressymb.':';  
  $totdisc ++;  
     }  
  }  
  if ($totdisc > 0) {  
     $haveDisc =~ s/:$//;  
     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>  
  <form name="clearbubbles" method="post" action="/adm/feedback">   <form name="clearbubbles" method="post" action="/adm/feedback">
  <input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" />   <input type="hidden" name="navurl" value="$ENV{'QUERY_STRING'}" />
  <input type="hidden" name="navmaps" value="$haveDisc" />   <input type="hidden" name="navtime" value="$time" />
  </form>   </form>
 END  END
         } else {  
     $result .= '<br />';  
  }  
     }      }
     $result .= "<br />\n";      $result .= "<br />\n";
     if ($r) {      if ($r) {
Line 1879  sub generate_email_discuss_status { Line 1858  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 1899  sub generate_email_discuss_status { Line 1872  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;

Removed from v.1.267.2.4  
changed lines
  Added in v.1.267.2.8


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