version 1.512.2.13.4.4, 2020/10/01 18:54:21
|
version 1.512.2.14, 2017/09/15 15:10:11
|
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 652 sub setup_rndseed {
|
Line 651 sub setup_rndseed {
|
$questiontype = $Apache::lonhomework::type; |
$questiontype = $Apache::lonhomework::type; |
} |
} |
if (($env{'request.state'} eq "construct") |
if (($env{'request.state'} eq "construct") |
|| ($symb eq '') |
|| ($symb eq '') |
|| ($Apache::lonhomework::type eq 'practice') |
|| ($Apache::lonhomework::type eq 'practice') |
|| ($Apache::lonhomework::history{'resource.CODE'}) |
|| ($Apache::lonhomework::history{'resource.CODE'}) |
|| (($env{'form.code_for_randomlist'}) && ($target eq 'analyze'))) { |
|| (($env{'form.code_for_randomlist'}) && ($target eq 'analyze'))) { |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['rndseed']); |
['rndseed']); |
Line 1367 sub firstaccess_msg {
|
Line 1366 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 1535 sub start_problem {
|
Line 1532 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 ($timelimit) = ($interval[0] =~ /^(\d+)/); |
&Apache::lonnet::set_first_access($interval[1],$interval[0]); |
&Apache::lonnet::set_first_access($interval[1],$timelimit); |
|
} |
} |
|
|
($status,$accessmsg,$slot_name,$slot) = |
($status,$accessmsg,$slot_name,$slot) = |
Line 2020 sub end_library {
|
Line 2016 sub end_library {
|
&& ($#$tagstack eq 0 && $$tagstack[0] eq 'library') |
&& ($#$tagstack eq 0 && $$tagstack[0] eq 'library') |
&& $env{'request.state'} eq "construct") { |
&& $env{'request.state'} eq "construct") { |
$result.='</form>'.&Apache::loncommon::end_page({'discussion' => 1}); |
$result.='</form>'.&Apache::loncommon::end_page({'discussion' => 1}); |
} elsif ($target eq 'meta') { |
|
$result.=&Apache::response::meta_response_order(); |
|
} |
} |
if ( $#$tagstack eq 0 && $$tagstack[0] eq 'library') { |
if ( $#$tagstack eq 0 && $$tagstack[0] eq 'library') { |
&reset_problem_globals('library'); |
&reset_problem_globals('library'); |