Diff for /rat/lonpage.pm between versions 1.114 and 1.118

version 1.114, 2016/05/30 03:02:37 version 1.118, 2016/08/09 23:43:51
Line 355  ENDEXT Line 355  ENDEXT
                               my $output=Apache::lonnet::ssi($src,%posthash);                                my $output=Apache::lonnet::ssi($src,%posthash);
       $output=~s|//(\s*<!--)? BEGIN LON-CAPA Internal.+?// END LON-CAPA Internal\s*(-->)?\s||gs;        $output=~s|//(\s*<!--)? BEGIN LON-CAPA Internal.+?// END LON-CAPA Internal\s*(-->)?\s||gs;
                               if (($target eq 'tex') || ($target eq 'tex_answer')) {                                if (($target eq 'tex') || ($target eq 'tex_answer')) {
   $output =~ s/^([^&]+)\\begin{document}//;    $output =~ s/^([^&]+)\\begin\{document}//;
   $output =~ s/\\end{document}//;    $output =~ s/\\end\{document}//;
 #  $output = '\parbox{\minipagewidth}{ '.$output.' }';  #  $output = '\parbox{\minipagewidth}{ '.$output.' }';
                                   #some additional cleanup necessary for LateX (due to limitations of table environment                                     #some additional cleanup necessary for LateX (due to limitations of table environment 
   $output =~ s/(\\vskip\s*\d+mm)\s*(\\\\)+/$1/g;    $output =~ s/(\\vskip\s*\d+mm)\s*(\\\\)+/$1/g;
Line 479  ENDEXT Line 479  ENDEXT
                                               $type = 'Task';                                                $type = 'Task';
                                           }                                            }
                                           my ($status,$accessmsg,$slot_name,$slot) =                                            my ($status,$accessmsg,$slot_name,$slot) =
                                               &Apache::lonhomework::check_slot_access('0',$type,$symb,$pagesymb);                                                &Apache::lonhomework::check_slot_access('0',$type,$symb);
                                           undef(%Apache::lonhomework::history);                                            undef(%Apache::lonhomework::history);
                                           my $probstatus = &Apache::lonnet::EXT("resource.0.problemstatus",$symb);                                            my $probstatus = &Apache::lonnet::EXT("resource.0.problemstatus",$symb);
                                           if (($status eq 'CAN_ANSWER') || (($status eq 'CANNOT_ANSWER') &&                                             if (($status eq 'CAN_ANSWER') || (($status eq 'CANNOT_ANSWER') && 
Line 498  ENDEXT Line 498  ENDEXT
                                               my @interval=&Apache::lonnet::EXT("resource.0.interval",$symb);                                                my @interval=&Apache::lonnet::EXT("resource.0.interval",$symb);
                                               if (@interval > 1) {                                                if (@interval > 1) {
                                                   my $first_access;                                                    my $first_access;
                                                   if ($first_access > 0) {                                                    if ($interval[1] eq 'map') {
                                                       if ($interval[1] eq 'map') {                                                        my $ignorecache;
                                                           my $ignorecache;                                                        if ($env{'form.'.$prefix.'markaccess'} eq 'yes') {
                                                           if ($env{'form.'.$prefix.'markaccess'} eq 'yes') {                                                            $ignorecache = 1;
                                                               $ignorecache = 1;  
                                                           }  
                                                           $first_access=&Apache::lonnet::get_first_access($interval[1],undef,$pagesymb,$ignorecache);  
                                                           if (($first_access) && (!$pagefirstaccess)) {  
                                                               $pagefirstaccess = $first_access;  
                                                           }  
                                                       } else {  
                                                           $first_access=&Apache::lonnet::get_first_access($interval[1],$symb);  
                                                       }                                                        }
                                                       if ($first_access > 0) {                                                        $first_access=&Apache::lonnet::get_first_access($interval[1],undef,$pagesymb,$ignorecache);
                                                           my ($timelimit) = ($interval[0] =~ /^(\d+)/);                                                        if (($first_access) && (!$pagefirstaccess)) {
                                                           if ($timelimit) {                                                            $pagefirstaccess = $first_access;
                                                               my $timeremains = $timelimit + $first_access - $now;  
                                                               if ($timeremains > 0) {  
                                                                   $timerhastime = $timeremains;  
                                                               }  
                                                           }  
                                                       }                                                        }
                                                     } else {
                                                         $first_access=&Apache::lonnet::get_first_access($interval[1],$symb);
                                                     }
                                                     if ($first_access > 0) {
                                                       my ($timelimit) = ($interval[0] =~ /^(\d+)/);                                                        my ($timelimit) = ($interval[0] =~ /^(\d+)/);
                                                       my $timeremains = $first_access+$timelimit - $now;                                                        if ($timelimit) {
                                                       if ($timeremains > 0) {                                                            my $timeremains = $timelimit + $first_access - $now;
                                                           $timerhastime = $timeremains;                                                            if ($timeremains > 0) {
                                                                 $timerhastime = $timeremains;
                                                             }
                                                       }                                                        }
                                                   }                                                    }
                                               }                                                }
Line 969  sub add_countdown_timer { Line 962  sub add_countdown_timer {
             $type = $donebuttonextras->{'type'};              $type = $donebuttonextras->{'type'};
         } else {          } else {
             $donebuttontext = &mt('Done');              $donebuttontext = &mt('Done');
               $type = 'map';
         }          }
         $donebutton =           $donebutton = 
             &Apache::lonmenu::done_button_js($type,'','',$proctor,$donebuttontext);              &Apache::lonmenu::done_button_js($type,'','',$proctor,$donebuttontext);

Removed from v.1.114  
changed lines
  Added in v.1.118


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