Diff for /loncom/homework/structuretags.pm between versions 1.501 and 1.505

version 1.501, 2012/03/25 14:35:58 version 1.505, 2012/04/18 11:49:50
Line 990  sub firstaccess_msg { Line 990  sub firstaccess_msg {
  my $foldertitle=&Apache::lonnet::gettitle($map);   my $foldertitle=&Apache::lonnet::gettitle($map);
           
  &Apache::lonxml::debug("map is $map title is $foldertitle");   &Apache::lonxml::debug("map is $map title is $foldertitle");
  $result .= "<h2>".&mt('The resources in "[_1]" are open for a limited time.'   $result .= "<h2>".&mt('The resources in "[_1]" are open for a limited time.',$foldertitle)."</h2>"
                              .' Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'                               .'<p>'.&mt('Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'
                              ,$foldertitle,$time)."</h2>";                               ,$foldertitle,$time)."</p>";
     } elsif ($interval[1] eq 'course') {      } elsif ($interval[1] eq 'course') {
  my $course = $env{'course.'.$env{'request.course.id'}.'.description'};   my $course = $env{'course.'.$env{'request.course.id'}.'.description'};
         $result .= "<h2>".&mt('The resources in "[_1]" are open for a limited time.'          $result .= "<h2>".&mt('The resources in "[_1]" are open for a limited time.',$course)."</h2>"
                              .' Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'                               .'<p>'.&mt('Once you click the "Show Resource" button below you have [_2] to complete all resources "[_1]".'
                              ,$course,$time)."</h2>";                               ,$course,$time)."</p>";
     } else {      } else {
  my $title=&Apache::lonnet::gettitle($symb);   my $title=&Apache::lonnet::gettitle($symb);
         $result .= "<h2>".&mt('This resource "[_1]" is open for a limited time.'          $result .= "<h2>".&mt('This resource "[_1]" is open for a limited time.',$title)."</h2>"
                              .' Once you click the "Show Resource" button below you have [_2] to complete this resource "[_1]".'                               .'<p>'.&mt('Once you click the "Show Resource" button below you have [_2] to complete this resource "[_1]".'
                              ,$title,$time)."</h2>";                               ,$title,$time)."</p>";
     }      }
     my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});      my $uri = &Apache::lonenc::check_encrypt($env{'request.uri'});
     my $buttontext = &mt('Show Resource');      my $buttontext = &mt('Show Resource');
Line 1181  sub start_problem { Line 1181  sub start_problem {
  }   }
  my $resource_due =  &Apache::lonhomework::due_date(0, $env{'request.symb'});   my $resource_due =  &Apache::lonhomework::due_date(0, $env{'request.symb'});
  my $time_left = $resource_due - time();   my $time_left = $resource_due - time();
  if ($resource_due && ($time_left > 0)) {   if ($resource_due && ($time_left > 0) && ($target eq 'web')) {
     $result .= &Apache::lonhtmlcommon::set_due_date($resource_due);      $result .= &Apache::lonhtmlcommon::set_due_date($resource_due);
  }   }
   
Line 1247  sub start_problem { Line 1247  sub start_problem {
     if ( $target eq "web" ) {      if ( $target eq "web" ) {
  my $msg;   my $msg;
  if ($status eq 'UNAVAILABLE') {   if ($status eq 'UNAVAILABLE') {
     $msg.='<h1>'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'</h1>';      $msg.='<p class="LC_error">'.&mt('Unable to determine if this resource is open due to network problems. Please try again later.').'</p>';
                 } elsif ($status eq 'NOT_IN_A_SLOT') {                  } elsif ($status eq 'NOT_IN_A_SLOT') {
                     $msg.='<h1>'.&mt('You are not currently signed up to work at this time and/or place.').'</h1>';                      $msg.='<p class="LC_warning">'.&mt('You are not currently signed up to work at this time and/or place.').'</p>';
                 } elsif (($status eq 'RESERVABLE') || ($status eq 'RESERVABLE_LATER') ||                  } elsif (($status eq 'RESERVABLE') || ($status eq 'RESERVABLE_LATER') ||
                          ($status eq 'NOTRESERVABLE')) {                           ($status eq 'NOTRESERVABLE')) {
                     $msg.='<h1>'.&mt('Access requires reservation to work at specific time/place.').'</h1>';                      $msg.='<p class="LC_warning">'.&mt('Access requires reservation to work at specific time/place.').'</p>';
  } elsif ($status ne 'NOT_YET_VIEWED') {   } elsif ($status ne 'NOT_YET_VIEWED') {
     $msg.='<h1>'.&mt('Not open to be viewed').'</h1>';      $msg.='<p class="LC_warning">'.&mt('Not open to be viewed').'</p>';
                 }                  }
  if ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS') {   if ($status eq 'CLOSED' || $status eq 'INVALID_ACCESS') {
     $msg.=&mt('The problem ').$accessmsg;      $msg.=&mt('The problem ').$accessmsg;
Line 1541  sub end_problem { Line 1541  sub end_problem {
   
     &reset_problem_globals('problem');      &reset_problem_globals('problem');
   
       #
       # This shouild be just above the return so that the
       # time put in the javascript is as late as possible in the
       # computation:
       #
       if ($target eq 'web') {
           $result .= &Apache::lonhtmlcommon::set_compute_end_time();
       }
     return $result;      return $result;
 }  }
   

Removed from v.1.501  
changed lines
  Added in v.1.505


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