Diff for /loncom/homework/structuretags.pm between versions 1.512.2.22 and 1.512.2.23.2.2

version 1.512.2.22, 2019/11/05 18:14:39 version 1.512.2.23.2.2, 2020/09/29 18:03:03
Line 63  use Apache::londefdef; Line 63  use Apache::londefdef;
 use Apache::lonenc();  use Apache::lonenc();
 use Apache::loncommon();  use Apache::loncommon();
 use Time::HiRes qw( gettimeofday tv_interval );  use Time::HiRes qw( gettimeofday tv_interval );
   use HTML::Entities();
 use lib '/home/httpd/lib/perl/';  use lib '/home/httpd/lib/perl/';
 use LONCAPA;  use LONCAPA;
     
Line 1388  sub firstaccess_msg { Line 1389  sub firstaccess_msg {
     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');
     my $timertext = &mt('Start Timer?');      my $timertext = &mt('Start Timer?');
       my $shownsymb = &HTML::Entities::encode(&Apache::lonenc::check_encrypt($symb),'\'"<>&');
     $result .= (<<ENDCHECKOUT);      $result .= (<<ENDCHECKOUT);
 <form name="markaccess" method="post" action="$uri">  <form name="markaccess" method="post" action="$uri">
 <input type="hidden" name="markaccess" value="yes" />  <input type="hidden" name="markaccess" value="yes" />
   <input type="hidden" name="symb" value="$shownsymb" />
 <input type="button" name="accessbutton" value="$buttontext" onclick="javascript:if (confirm('$timertext')) { document.markaccess.submit(); }" />  <input type="button" name="accessbutton" value="$buttontext" onclick="javascript:if (confirm('$timertext')) { document.markaccess.submit(); }" />
 </form>  </form>
 ENDCHECKOUT  ENDCHECKOUT
Line 1556  sub start_problem { Line 1559  sub start_problem {
         $target eq 'tex') {          $target eq 'tex') {
         if ($env{'form.markaccess'}) {          if ($env{'form.markaccess'}) {
             my @interval=&Apache::lonnet::EXT("resource.0.interval");              my @interval=&Apache::lonnet::EXT("resource.0.interval");
             my $is_set = &Apache::lonnet::set_first_access($interval[1],$interval[0]);              my ($timelimit) = ($interval[0] =~ /^(\d+)/);
               my $is_set = &Apache::lonnet::set_first_access($interval[1],$timelimit);
             unless (($is_set eq 'ok') || ($is_set eq 'already_set')) {              unless (($is_set eq 'ok') || ($is_set eq 'already_set')) {
                 $firstaccres = $is_set;                  $firstaccres = $is_set;
             }              }
Line 3153  sub randomizetry_part_header { Line 3157  sub randomizetry_part_header {
     my ($header,$text);      my ($header,$text);
     if ($reqtries eq 'none') {      if ($reqtries eq 'none') {
         $header = &mt('No Question Variation');          $header = &mt('No Question Variation');
         $text = &mt('For this question there will no new variation after a try.');          $text = &mt('For this question there will be no new variation after a try.');
     } elsif ($reqtries > 1) {      } elsif ($reqtries > 1) {
         $header = &mt('New Question Variation After Every [quant,_1,Try,Tries]',$reqtries);          $header = &mt('New Question Variation After Every [quant,_1,Try,Tries]',$reqtries);
         if (($problemstatus eq 'no') ||          if (($problemstatus eq 'no') ||

Removed from v.1.512.2.22  
changed lines
  Added in v.1.512.2.23.2.2


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