version 1.448, 2016/05/13 22:48:05
|
version 1.451, 2016/06/19 04:27:50
|
Line 812 sub innerregister {
|
Line 812 sub innerregister {
|
if ($currdir =~ m-/$-) { |
if ($currdir =~ m-/$-) { |
$is_const_dir = 1; |
$is_const_dir = 1; |
if ($thisdisfn eq '') { |
if ($thisdisfn eq '') { |
$is_const_dir = 2; |
unless (($env{'request.course.id'}) && |
|
($env{'course.'.$env{'request.course.id'}.'.num'} eq $uname) && |
|
($env{'course.'.$env{'request.course.id'}.'.domain'} eq $udom)) { |
|
$is_const_dir = 2; |
|
} |
} |
} |
} else { |
} else { |
$currdir =~ s|[^/]+$||; |
$currdir =~ s|[^/]+$||; |
Line 1650 sub done_button_js {
|
Line 1654 sub done_button_js {
|
nokey => 'A proctor key is required', |
nokey => 'A proctor key is required', |
); |
); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my $navmap = Apache::lonnavmaps::navmap->new(); |
my ($missing,$tried); |
my ($missing,$tried) = (0,0); |
if (ref($navmap)) { |
if (ref($navmap)) { |
$missing=0; |
|
$tried=0; |
|
my @resources=(); |
my @resources=(); |
if ($type eq 'map') { |
if ($type eq 'map') { |
my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($env{'request.symb'}); |
my ($mapurl,$rid,$resurl)=&Apache::lonnet::decode_symb($env{'request.symb'}); |
Line 1667 sub done_button_js {
|
Line 1669 sub done_button_js {
|
} |
} |
} |
} |
foreach my $res (@resources) { |
foreach my $res (@resources) { |
if ($res->singlepart()) { |
if (ref($res->parts()) eq 'ARRAY') { |
if (!$res->tries()) { |
|
$missing++; |
|
} else { |
|
$tried++; |
|
} |
|
} else { |
|
foreach my $part (@{$res->parts()}) { |
foreach my $part (@{$res->parts()}) { |
if (!$res->tries($part)) { |
if (!$res->tries($part)) { |
$missing++; |
$missing++; |
Line 1697 sub done_button_js {
|
Line 1693 sub done_button_js {
|
$lt{'miss'} .= ' '.&mt('If you confirm you are done you will be unable to submit an answer for it.').'</p>'; |
$lt{'miss'} .= ' '.&mt('If you confirm you are done you will be unable to submit an answer for it.').'</p>'; |
} |
} |
} |
} |
|
$donebuttontext = &HTML::Entities::encode($donebuttontext,'<>&"'); |
if ($proctor) { |
if ($proctor) { |
if ($height !~ /^\d+$/) { |
if ($height !~ /^\d+$/) { |
$height = 400; |
$height = 400; |
Line 1721 sub done_button_js {
|
Line 1718 sub done_button_js {
|
<p>$lt{'preamble'} $lt{$type}</p> |
<p>$lt{'preamble'} $lt{$type}</p> |
$lt{'miss'} |
$lt{'miss'} |
<p>$lt{'proctor'}</p> |
<p>$lt{'proctor'}</p> |
<form> |
<form name="LCdoneButtonProctor" action=""> |
<label>$lt{'key'}<input type="password" name="LC_interval_done_proctorkey" value="" /></label> |
<label>$lt{'key'}<input type="password" name="LC_interval_done_proctorkey" value="" /></label> |
<input type="submit" tabindex="-1" style="position:absolute; top:-1000px" /> |
<input type="submit" tabindex="-1" style="position:absolute; top:-1000px" /> |
</form> |
</form> |
Line 1795 END
|
Line 1792 END
|
|
|
<form method="post" name="LCdoneButton" action=""> |
<form method="post" name="LCdoneButton" action=""> |
<input type="hidden" name="LC_interval_done" value="" /> |
<input type="hidden" name="LC_interval_done" value="" /> |
<button id="LC_done-confirm-opener" type="button">$lt{'button'}</button> |
<button id="LC_done-confirm-opener" type="button">$donebuttontext</button> |
</form> |
</form> |
|
|
<div id="LC_done-confirm" title="$lt{'title'}"> |
<div id="LC_done-confirm" title="$lt{'title'}"> |