'.
@@ -3294,6 +3318,9 @@ sub ltitools_names {
'width' => 'Width',
'passback' => 'Tool can return grades:',
'roster' => 'Tool can retrieve roster:',
+ 'crstarget' => 'Display target',
+ 'crslabel' => 'Course label',
+ 'crstitle' => 'Course title',
);
return %lt;
}
@@ -8435,6 +8462,10 @@ sub modify_ltitools {
}
}
}
+ my @courseconfig = &Apache::loncommon::get_env_multiple('form.ltitools_courseconfig');
+ foreach my $item (@courseconfig) {
+ $confhash{$newid}{'crsconf'}{$item} = 1;
+ }
if ($env{'form.ltitools_add_custom'}) {
my $name = $env{'form.ltitools_add_custom_name'};
my $value = $env{'form.ltitools_add_custom_value'};
@@ -8522,6 +8553,19 @@ sub modify_ltitools {
$changes{$itemid} = 1;
}
}
+ my @courseconfig = &Apache::loncommon::get_env_multiple('form.ltitools_courseconfig_'.$i);
+ foreach my $item ('label','title','target') {
+ if (grep(/^\Q$item\E$/,@courseconfig)) {
+ $confhash{$itemid}{'crsconf'}{$item} = 1;
+ if (ref($domconfig{$action}{$itemid}{'crsconf'}) eq 'HASH') {
+ if ($domconfig{$action}{$itemid}{'crsconf'}{$item} ne $confhash{$itemid}{'crsconf'}{$item}) {
+ $changes{$itemid} = 1;
+ }
+ } else {
+ $changes{$itemid} = 1;
+ }
+ }
+ }
my @fields = &Apache::loncommon::get_env_multiple('form.ltitools_fields_'.$i);
foreach my $field (@fields) {
if ($possfield{$field}) {
@@ -8685,6 +8729,21 @@ sub modify_ltitools {
my $num = length($confhash{$itemid}{'secret'});
$resulttext .= ('*'x$num).'';
}
+ $resulttext .= ''.&mt('Configurable in course:');
+ my @possconfig = ('label','title','target');
+ my $numconfig = 0;
+ if (ref($confhash{$itemid}{'crsconf'}) eq 'HASH') {
+ foreach my $item (@possconfig) {
+ if ($confhash{$itemid}{'crsconf'}{$item}) {
+ $numconfig ++;
+ $resulttext .= ' '.$lt{'crs'.$item};
+ }
+ }
+ }
+ if (!$numconfig) {
+ $resulttext .= &mt('None');
+ }
+ $resulttext .= '';
foreach my $item ('passback','roster') {
$resulttext .= ''.$lt{$item}.' ';
if ($confhash{$itemid}{$item}) {
|