version 1.644, 2017/11/30 14:41:20
|
version 1.645, 2017/12/18 22:56:45
|
Line 45 use Apache::lontemplate();
|
Line 45 use Apache::lontemplate();
|
use Apache::lonsimplepage(); |
use Apache::lonsimplepage(); |
use Apache::lonhomework(); |
use Apache::lonhomework(); |
use Apache::lonpublisher(); |
use Apache::lonpublisher(); |
|
use Apache::lonparmset(); |
use HTML::Entities; |
use HTML::Entities; |
use HTML::TokeParser; |
use HTML::TokeParser; |
use GDBM_File; |
use GDBM_File; |
Line 670 sub group_import {
|
Line 671 sub group_import {
|
} |
} |
$toolid =~ s/\D//g; |
$toolid =~ s/\D//g; |
($toolhash{'target'},$toolhash{'width'},$toolhash{'height'}, |
($toolhash{'target'},$toolhash{'width'},$toolhash{'height'}, |
$toolhash{'linktext'},$toolhash{'explanation'}, |
$toolhash{'linktext'},$toolhash{'explanation'},$toolhash{'crslabel'}, |
$toolhash{'crslabel'},$toolhash{'crstitle'},$toolhash{'crsappend'}) = @toolinfo; |
$toolhash{'crstitle'},$toolhash{'crsappend'},$toolhash{'gradable'}) = @toolinfo; |
foreach my $item (@extras) { |
foreach my $item (@extras) { |
$toolhash{$item} = &unescape($toolhash{$item}); |
$toolhash{$item} = &unescape($toolhash{$item}); |
} |
} |
|
if ($folder =~ /^supplemental/) { |
|
delete($toolhash{'gradable'}); |
|
} |
if (ref($ltitoolsref) eq 'HASH') { |
if (ref($ltitoolsref) eq 'HASH') { |
if (ref($ltitoolsref->{$toolid}) eq 'HASH') { |
if (ref($ltitoolsref->{$toolid}) eq 'HASH') { |
my @deleted; |
my @deleted; |
Line 762 sub group_import {
|
Line 766 sub group_import {
|
$toolhash{'rostersecret'} = $rostersecret; |
$toolhash{'rostersecret'} = $rostersecret; |
$toolhash{'rostersecretdate'} = time; |
$toolhash{'rostersecretdate'} = time; |
} |
} |
|
my $changegradable; |
|
if (($residx) && ($folder =~ /^default/)) { |
|
if (exists($toolsettings{'gradable'})) { |
|
if (!exists($toolhash{'gradable'})) { |
|
push(@deleted,'gradable'); |
|
$changegradable = 1; |
|
} |
|
} elsif (exists($toolhash{'gradable'})) { |
|
$changegradable = 1; |
|
} |
|
} |
my $putres = &Apache::lonnet::put('exttool_'.$marker,\%toolhash,$coursedom,$coursenum); |
my $putres = &Apache::lonnet::put('exttool_'.$marker,\%toolhash,$coursedom,$coursenum); |
if ($putres eq 'ok') { |
if ($putres eq 'ok') { |
if (@deleted) { |
if (@deleted) { |
&Apache::lonnet::del('exttool_'.$marker,\@deleted,$coursedom,$coursenum); |
&Apache::lonnet::del('exttool_'.$marker,\@deleted,$coursedom,$coursenum); |
} |
} |
|
if (($changegradable) && ($folder =~ /^default/)) { |
|
my $val; |
|
if ($toolhash{'gradable'}) { |
|
$val = 'yes'; |
|
} else { |
|
$val = 'no'; |
|
} |
|
&LONCAPA::map::storeparameter($residx,'parameter_0_gradable',$val, |
|
'string_yesno'); |
|
&remember_parms($residx,'gradable','set',$val); |
|
} |
|
} else { |
|
return (&mt('Failed to save update to external tool.'),1); |
} |
} |
} |
} |
} |
} |
Line 1004 sub docs_change_log {
|
Line 1032 sub docs_change_log {
|
'encrypturl' => 'URL hidden', |
'encrypturl' => 'URL hidden', |
'randompick' => 'Randomly pick', |
'randompick' => 'Randomly pick', |
'randomorder' => 'Randomly ordered', |
'randomorder' => 'Randomly ordered', |
|
'gradable' => 'Grade can be assigned to External Tool', |
'set' => 'set to', |
'set' => 'set to', |
'del' => 'deleted'); |
'del' => 'deleted'); |
my $filter = &Apache::loncommon::display_filter('docslog')."\n". |
my $filter = &Apache::loncommon::display_filter('docslog')."\n". |
Line 1111 sub docs_change_log {
|
Line 1140 sub docs_change_log {
|
$r->print('</ul>'); |
$r->print('</ul>'); |
if ($docslog{$id}{'logentry'}{'parameter_res'}) { |
if ($docslog{$id}{'logentry'}{'parameter_res'}) { |
$r->print(&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'}))[0]).':<ul>'); |
$r->print(&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'}))[0]).':<ul>'); |
foreach my $parameter ('randompick','hiddenresource','encrypturl','randomorder') { |
foreach my $parameter ('randompick','hiddenresource','encrypturl','randomorder','gradable') { |
if ($docslog{$id}{'logentry'}{'parameter_action_'.$parameter}) { |
if ($docslog{$id}{'logentry'}{'parameter_action_'.$parameter}) { |
# FIXME: internationalization seems wrong here |
# FIXME: internationalization seems wrong here |
$r->print('<li>'. |
$r->print('<li>'. |