Diff for /loncom/interface/lonnavmaps.pm between versions 1.412 and 1.415.2.3

version 1.412, 2008/02/03 00:05:23 version 1.415.2.3, 2008/12/21 16:27:26
Line 198  sub getDescription { Line 198  sub getDescription {
         return &mt("Not currently assigned.");          return &mt("Not currently assigned.");
     }      }
     if ($status == $res->OPEN_LATER) {      if ($status == $res->OPEN_LATER) {
         return "Open " .timeToHumanString($open,'start');          return &mt("Open ") .timeToHumanString($open,'start');
     }      }
     if ($status == $res->OPEN) {      if ($status == $res->OPEN) {
         if ($due) {          if ($due) {
Line 236  sub getDescription { Line 236  sub getDescription {
         my $maxtries = $res->maxtries($part);          my $maxtries = $res->maxtries($part);
         my $triesString = "";          my $triesString = "";
         if ($tries && $maxtries) {          if ($tries && $maxtries) {
             $triesString = "<font size=\"-1\"><i>($tries of $maxtries tries used)</i></font>";              $triesString = '<font size="-1"><i>('.&mt('[_1] of [quant,_2,try,tries] used',$tries,$maxtries).')</i></font>';
             if ($maxtries > 1 && $maxtries - $tries == 1) {              if ($maxtries > 1 && $maxtries - $tries == 1) {
                 $triesString = "<b>$triesString</b>";                  $triesString = "<b>$triesString</b>";
             }              }
Line 854  sub render_resource { Line 854  sub render_resource {
     if (!$resource->condval()) {      if (!$resource->condval()) {
         $nonLinkedText .= ' <i>('.&mt('conditionally hidden').')</i> ';          $nonLinkedText .= ' <i>('.&mt('conditionally hidden').')</i> ';
     }      }
     if ($resource->is_practice()) {      if (($resource->is_practice()) && ($resource->is_raw_problem())) {
         $nonLinkedText .=' <font color="green"><b>'.&mt('not graded').'</b></font>';          $nonLinkedText .=' <font color="green"><b>'.&mt('not graded').'</b></font>';
     }      }
     
Line 1182  sub render { Line 1182  sub render {
         if (!defined($navmap)) {          if (!defined($navmap)) {
             $navmap = Apache::lonnavmaps::navmap->new();              $navmap = Apache::lonnavmaps::navmap->new();
     if (!defined($navmap)) {      if (!defined($navmap)) {
  # no londer in course   # no longer in course
  return '<span class="LC_error">'.&mt('No course selected').'</span><br />   return '<span class="LC_error">'.&mt('No course selected').'</span><br />
                         <a href="/adm/roles">'.&mt('Select a course').'</a><br />';                          <a href="/adm/roles">'.&mt('Select a course').'</a><br />';
     }      }
Line 1250  sub render { Line 1250  sub render {
         # Step 1: Check to see if we have a navmap          # Step 1: Check to see if we have a navmap
         if (!defined($navmap)) {          if (!defined($navmap)) {
             $navmap = Apache::lonnavmaps::navmap->new();              $navmap = Apache::lonnavmaps::navmap->new();
               if (!defined($navmap)) {
                   # no longer in course
                   return '<span class="LC_error">'.&mt('No course selected').'</span><br />
                           <a href="/adm/roles">'.&mt('Select a course').'</a><br />';
               }
         }          }
   
         # See if we're being passed a specific map          # See if we're being passed a specific map
Line 1741  ENDBLOCK Line 1746  ENDBLOCK
     $result.='}      $result.='}
               </script>                </script>
                    <form name="linkitems" method="post">                     <form name="linkitems" method="post">
                        <nobr><select name="toplink">'."\n";                         <span class="LC_nobreak"><select name="toplink">'."\n";
     foreach my $link (@linkorder) {      foreach my $link (@linkorder) {
  if (defined($linkitems->{$link})) {   if (defined($linkitems->{$link})) {
     if ($linkitems->{$link}{'text'} ne '') {      if ($linkitems->{$link}{'text'} ne '') {
Line 1752  ENDBLOCK Line 1757  ENDBLOCK
     }      }
     $result .= '</select>&nbsp;<input type="button" name="chgnav"      $result .= '</select>&nbsp;<input type="button" name="chgnav"
                    value="Go" onClick="javascript:changeNavDisplay()" />                     value="Go" onClick="javascript:changeNavDisplay()" />
                 </nobr></form></td>'."\n";                  </span></form></td>'."\n";
   
     return $result;      return $result;
 }  }
Line 3613  sub is_problem { Line 3618  sub is_problem {
     }      }
     return 0;      return 0;
 }  }
   sub is_raw_problem {
       my $self=shift;
       my $src = $self->src();
       if ($src =~ /\.(problem|exam|quiz|assess|survey|form|library|task)$/) {
           return 1;
       }
       return 0;
   }
   
 sub contains_problem {  sub contains_problem {
     my $self=shift;      my $self=shift;
     if ($self->is_page()) {      if ($self->is_page()) {

Removed from v.1.412  
changed lines
  Added in v.1.415.2.3


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