version 1.448, 2016/05/13 22:48:05
|
version 1.450, 2016/06/02 01:43:46
|
Line 1650 sub done_button_js {
|
Line 1650 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 1665 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 1689 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 1714 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 1788 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'}"> |