version 1.127, 2023/09/24 03:31:18
|
version 1.132, 2024/12/20 00:24:38
|
Line 372 sub handler {
|
Line 372 sub handler {
|
|
|
my %values=&Apache::lonnet::dump('environment',$cdom,$cnum); |
my %values=&Apache::lonnet::dump('environment',$cdom,$cnum); |
my %linkprot=&Apache::lonnet::dump('lti',$cdom,$cnum,undef,undef,undef,1); |
my %linkprot=&Apache::lonnet::dump('lti',$cdom,$cnum,undef,undef,undef,1); |
|
my %domdefs = &Apache::lonnet::get_domain_defaults($cdom); |
|
unless ($phase eq 'process') { |
|
if (ref($domdefs{'linkprotsuggested'}) eq 'HASH') { |
|
$values{'suggested'} = $domdefs{'linkprotsuggested'}; |
|
} |
|
} |
my %ltienc = &Apache::lonnet::dump('nohist_ltienc',$cdom,$cnum,undef,undef,undef,1); |
my %ltienc = &Apache::lonnet::dump('nohist_ltienc',$cdom,$cnum,undef,undef,undef,1); |
my %ltitools = &Apache::lonnet::dump('ltitools',$cdom,$cnum,undef,undef,undef,1); |
my %ltitools = &Apache::lonnet::dump('ltitools',$cdom,$cnum,undef,undef,undef,1); |
my %ltitoolsenc = &Apache::lonnet::dump('nohist_toolsenc',$cdom,$cnum,undef,undef,undef,1); |
my %ltitoolsenc = &Apache::lonnet::dump('nohist_toolsenc',$cdom,$cnum,undef,undef,undef,1); |
Line 793 sub print_config_box {
|
Line 799 sub print_config_box {
|
<tr> |
<tr> |
<td> |
<td> |
<table class="LC_nested">'; |
<table class="LC_nested">'; |
|
if ($action eq 'linkprot') { |
|
if ((ref($settings) eq 'HASH') && (ref($settings->{'suggested'}) eq 'HASH')) { |
|
my $hints; |
|
my $hintcount = 0; |
|
foreach my $key (sort { $a <=> $b } keys(%{$settings->{'suggested'}})) { |
|
if ((ref($settings->{'suggested'}->{$key}) eq 'HASH')) { |
|
if (($settings->{'suggested'}->{$key}-{'name'} ne '') && |
|
($settings->{'suggested'}->{$key}-{'info'} ne '')) { |
|
my $css_class = $hintcount%2?' class="LC_odd_row"':' class="LC_even_row"'; |
|
$hints .= '<tr '.$css_class.'><td class="LC_left_item">'. |
|
$settings->{'suggested'}->{$key}->{'name'}.'</td>'. |
|
'<td class="LC_right_item"><pre>'. |
|
$settings->{'suggested'}->{$key}->{'info'}. |
|
'</pre></td></tr>'; |
|
$hintcount ++; |
|
} |
|
} |
|
} |
|
if ($hintcount) { |
|
$output .= '<tr class="LC_info_row">'. |
|
'<td colspan="2" class="LC_left_item">'.&mt('Recommendation(s) for specific launcher application(s)').'</td>'. |
|
'</tr>'."\n". |
|
'<tr class="LC_info_row">'. |
|
'<td class="LC_left_item"><span class="LC_nobreak">'.&mt('Launcher Application').'</span></td>'. |
|
'<td class="LC_right_item">'.&mt('Recommendation(s)').'</td></tr>'."\n". |
|
$hints; |
|
} |
|
} |
|
} |
if (exists $item->{'header'}->[0]->{'col1'} || |
if (exists $item->{'header'}->[0]->{'col1'} || |
exists $item->{'header'}->[0]->{'col2'}) { |
exists $item->{'header'}->[0]->{'col2'}) { |
$output .= ' |
$output .= ' |
<tr class="LC_info_row"> |
<tr class="LC_info_row"> |
<td class="LC_left_item" valign="top">'.&mt($item->{'header'}->[0]->{'col1'}).'</td>'; |
<td class="LC_left_item" valign="top">'.&mt($item->{'header'}->[0]->{'col1'}).'</td>'; |
if (($action eq 'courseinfo') || ($action eq 'localization') || |
if (($action eq 'courseinfo') || ($action eq 'localization') || |
Line 3285 sub store_ltitools {
|
Line 3320 sub store_ltitools {
|
} |
} |
} |
} |
} |
} |
$output .= '<li>'.&mt('Configurable in course:'); |
$output .= '<li>'; |
|
if ($context eq 'domain') { |
|
$output .= &mt('Configurable in course'); |
|
} else { |
|
$output .= &mt('Configurable for each instance of tool in course'); |
|
} |
|
$output .= ':'; |
my @possconfig = ('label','title','target','linktext','explanation','append'); |
my @possconfig = ('label','title','target','linktext','explanation','append'); |
my $numconfig = 0; |
my $numconfig = 0; |
if (ref($changes->{$itemid}{'crsconf'}) eq 'HASH') { |
if (ref($changes->{$itemid}{'crsconf'}) eq 'HASH') { |
Line 5257 sub update_releasereq {
|
Line 5298 sub update_releasereq {
|
} |
} |
$modified_courses = []; |
$modified_courses = []; |
} |
} |
undef($registered_cleanup); |
return OK; |
return; |
|
} |
} |
|
|
sub show_autocoowners { |
sub show_autocoowners { |
Line 6709 sub print_ltitools {
|
Line 6749 sub print_ltitools {
|
%courseconfig = %{$settings->{$item}->{'crsconf'}}; |
%courseconfig = %{$settings->{$item}->{'crsconf'}}; |
} |
} |
} |
} |
$datatable .= '<fieldset><legend>'.&mt('Configurable in course').'</legend><span class="LC_nobreak">'; |
$datatable .= '<fieldset><legend>'; |
|
if ($context eq 'domain') { |
|
$datatable .= &mt('Configurable in course'); |
|
} else { |
|
$datatable .= &mt('Configurable for each instance of tool in course'); |
|
} |
|
$datatable .= '</legend><span class="LC_nobreak">'; |
foreach my $item ('label','title','target','linktext','explanation','append') { |
foreach my $item ('label','title','target','linktext','explanation','append') { |
my $checked; |
my $checked; |
if ($courseconfig{$item}) { |
if ($courseconfig{$item}) { |
Line 6867 sub print_ltitools {
|
Line 6913 sub print_ltitools {
|
$datatable .= '</select></td>'; |
$datatable .= '</select></td>'; |
} |
} |
$datatable .= '</tr></table></fieldset>'. |
$datatable .= '</tr></table></fieldset>'. |
'<fieldset><legend>'.&mt('Configurable in course').'</legend><span class="LC_nobreak">'; |
'<fieldset><legend>'; |
|
if ($context eq 'domain') { |
|
$datatable .= &mt('Configurable in course'); |
|
} else { |
|
$datatable .= &mt('Configurable for each instance of tool in course'); |
|
} |
|
$datatable .= '</legend><span class="LC_nobreak">'; |
foreach my $item ('label','title','target','linktext','explanation','append') { |
foreach my $item ('label','title','target','linktext','explanation','append') { |
$datatable .= '<label>'. |
$datatable .= '<label>'. |
'<input type="checkbox" name="ltitools_add_courseconfig" value="'.$item.'" checked="checked" />'. |
'<input type="checkbox" name="ltitools_add_courseconfig" value="'.$item.'" checked="checked" />'. |
Line 7201 sub menuitems_categories {
|
Line 7253 sub menuitems_categories {
|
shown => ['top','inline','foot','main'], |
shown => ['top','inline','foot','main'], |
text => ['name','role','crs','disc','fdbk'], |
text => ['name','role','crs','disc','fdbk'], |
links => ['pers','logo','menu','comm','roles','help','logout'], |
links => ['pers','logo','menu','comm','roles','help','logout'], |
list => ['about','prefs','port','wish','anno','rss'], |
list => ['about','prefs','port','wish','anno','rss','srch','brse'], |
inline => ['cont','grades','chat','people','groups','resv','syll','feeds'], |
inline => ['cont','grades','chat','people','groups','resv','syll','feeds'], |
); |
); |
return (\@order,\%categories); |
return (\@order,\%categories); |
Line 7241 sub menuitems_fields {
|
Line 7293 sub menuitems_fields {
|
wish => 'Stored Links', |
wish => 'Stored Links', |
anno => 'Calendar', |
anno => 'Calendar', |
rss => 'RSS Feeds', |
rss => 'RSS Feeds', |
|
srch => 'Search Library', |
|
brse => 'Browse Library', |
cont => 'Contents', |
cont => 'Contents', |
grades => 'Grades', |
grades => 'Grades', |
chat => 'Chat', |
chat => 'Chat', |
Line 7512 sub print_linkprotection {
|
Line 7566 sub print_linkprotection {
|
$onclickreturnurl.$checkedreturnurl{'no'}.$disabled.' />'.&mt('No').'</label> '. |
$onclickreturnurl.$checkedreturnurl{'no'}.$disabled.' />'.&mt('No').'</label> '. |
'<label><input type="radio" name="linkprot_returnurl_'.$i.'" value="1"'. |
'<label><input type="radio" name="linkprot_returnurl_'.$i.'" value="1"'. |
$onclickreturnurl.$checkedreturnurl{'yes'}.$disabled.' />'.&mt('Yes').'</label></span>'. |
$onclickreturnurl.$checkedreturnurl{'yes'}.$disabled.' />'.&mt('Yes').'</label></span>'. |
' </span><div id="linkprot_divurlparam_'.$i.'" style="display:none" />'. |
' <div id="linkprot_divurlparam_'.$i.'" style="display:none">'. |
'<span class="LC_nobreak">'.&mt('Parameter name').':'. |
'<span class="LC_nobreak">'.&mt('Parameter name').':'. |
'<input type="text" size="15" name="linkprot_urlparam_'.$i.'" value="'.$values{'returnurl'}.'" autocomplete="off"'.$disabled.' />'. |
'<input type="text" size="15" name="linkprot_urlparam_'.$i.'" value="'.$values{'returnurl'}.'" autocomplete="off"'.$disabled.' />'. |
'</span></div> '; |
'</span></div> '; |
Line 7584 sub print_linkprotection {
|
Line 7638 sub print_linkprotection {
|
$onclickpassback.$checkedpassback{'no'}.$disabled.' />'.&mt('No').'</label> '. |
$onclickpassback.$checkedpassback{'no'}.$disabled.' />'.&mt('No').'</label> '. |
'<label><input type="radio" name="linkprot_passback_add" value="1"'. |
'<label><input type="radio" name="linkprot_passback_add" value="1"'. |
$onclickpassback.$checkedpassback{'yes'}.$disabled.' />'.&mt('Yes').'</label></span>'. |
$onclickpassback.$checkedpassback{'yes'}.$disabled.' />'.&mt('Yes').'</label></span>'. |
'<br /><div id="linkprot_passbackparam_add" class="LC_floatleft" style="display:none" />'. |
'<br /><div id="linkprot_passbackparam_add" class="LC_floatleft" style="display:none">'. |
'<span class="LC_nobreak">'.&mt('Grade format'). |
'<span class="LC_nobreak">'.&mt('Grade format'). |
'<label><input type="radio" name="linkprot_passbackformat_add" value="1.1"'.$checkedpassbackfmt{'1p1'}.$disabled.' />'. |
'<label><input type="radio" name="linkprot_passbackformat_add" value="1.1"'.$checkedpassbackfmt{'1p1'}.$disabled.' />'. |
&mt('Outcomes Service (1.1)').'</label>'.(' 'x2). |
&mt('Outcomes Service (1.1)').'</label>'.(' 'x2). |
Line 7597 sub print_linkprotection {
|
Line 7651 sub print_linkprotection {
|
$onclickreturnurl.$checkedreturnurl{'no'}.$disabled.' />'.&mt('No').'</label> '. |
$onclickreturnurl.$checkedreturnurl{'no'}.$disabled.' />'.&mt('No').'</label> '. |
'<label><input type="radio" name="linkprot_returnurl_add" value="1"'. |
'<label><input type="radio" name="linkprot_returnurl_add" value="1"'. |
$onclickreturnurl.$checkedreturnurl{'yes'}.$disabled.' />'.&mt('Yes').'</label></span>'. |
$onclickreturnurl.$checkedreturnurl{'yes'}.$disabled.' />'.&mt('Yes').'</label></span>'. |
' </span><div id="linkprot_divurlparam_add" style="display:none" />'. |
' <div id="linkprot_divurlparam_add" style="display:none">'. |
'<span class="LC_nobreak">'.&mt('Parameter name').':'. |
'<span class="LC_nobreak">'.&mt('Parameter name').':'. |
'<input type="text" size="15" name="linkprot_urlparam_add" value="" autocomplete="off"'.$disabled.' />'. |
'<input type="text" size="15" name="linkprot_urlparam_add" value="" autocomplete="off"'.$disabled.' />'. |
'</span></div> '; |
'</span></div> '; |