version 1.118, 2023/03/19 16:05:48
|
version 1.125, 2023/07/20 12:47:10
|
Line 316 sub handler {
|
Line 316 sub handler {
|
idnu => 'Course ID or number', |
idnu => 'Course ID or number', |
unco => 'Unique code', |
unco => 'Unique code', |
desc => 'Course Description', |
desc => 'Course Description', |
cred => 'Student credits', |
cred => 'Student credits', |
ownr => 'Course Owner', |
ownr => 'Course Owner', |
cown => 'Course Co-owners', |
cown => 'Course Co-owners', |
catg => 'Categorize course', |
catg => 'Categorize course', |
Line 522 sub handler {
|
Line 522 sub handler {
|
uselcmath => 'Student formula entry uses inline preview, not DragMath pop-up', |
uselcmath => 'Student formula entry uses inline preview, not DragMath pop-up', |
usejsme => 'Molecule editor uses JSME (HTML5) in place of JME (Java)', |
usejsme => 'Molecule editor uses JSME (HTML5) in place of JME (Java)', |
inline_chem => 'Chemical reaction response uses inline preview, not pop-up', |
inline_chem => 'Chemical reaction response uses inline preview, not pop-up', |
extresource => 'Display of external resources', |
extresource => 'Display of external resources', |
}, |
}, |
}, |
}, |
'grading' => |
'grading' => |
Line 1337 sub process_changes {
|
Line 1337 sub process_changes {
|
my ($classorder,$classtitles) = &discussion_vote_classes(); |
my ($classorder,$classtitles) = &discussion_vote_classes(); |
my $fontchange = 0; |
my $fontchange = 0; |
foreach my $class (@{$classorder}) { |
foreach my $class (@{$classorder}) { |
my $ext_entry = $entry.'_'.$class; |
my $ext_entry = $entry.'_'.$class; |
my $size = $env{'form.'.$ext_entry.'_size'}; |
my $size = $env{'form.'.$ext_entry.'_size'}; |
my $unit = $env{'form.'.$ext_entry.'_unit'}; |
my $unit = $env{'form.'.$ext_entry.'_unit'}; |
my $weight = $env{'form.'.$ext_entry.'_weight'}; |
my $weight = $env{'form.'.$ext_entry.'_weight'}; |
my $style = $env{'form.'.$ext_entry.'_style'}; |
my $style = $env{'form.'.$ext_entry.'_style'}; |
my $other = $env{'form.'.$ext_entry.'_other'}; |
my $other = $env{'form.'.$ext_entry.'_other'}; |
$size =~ s/,//g; |
$size =~ s/,//g; |
$unit =~ s/,//g; |
$unit =~ s/,//g; |
$weight =~ s/,//g; |
$weight =~ s/,//g; |
$style =~ s/,//g; |
$style =~ s/,//g; |
$other =~ s/[^\w;:\s\-\%.]//g; |
$other =~ s/[^\w;:\s\-\%.]//g; |
Line 1352 sub process_changes {
|
Line 1352 sub process_changes {
|
$newvalues{$ext_entry} = join(',',($size.$unit,$weight,$style,$other)); |
$newvalues{$ext_entry} = join(',',($size.$unit,$weight,$style,$other)); |
my $current = $values->{$ext_entry}; |
my $current = $values->{$ext_entry}; |
if ($values->{$ext_entry} eq '') { |
if ($values->{$ext_entry} eq '') { |
$current = ',,,'; |
$current = ',,,'; |
} |
} |
if ($newvalues{$ext_entry} ne $current) { |
if ($newvalues{$ext_entry} ne $current) { |
$changes->{$ext_entry} = $newvalues{$ext_entry}; |
$changes->{$ext_entry} = $newvalues{$ext_entry}; |
Line 1361 sub process_changes {
|
Line 1361 sub process_changes {
|
} |
} |
if ($fontchange) { |
if ($fontchange) { |
$changes->{$entry} = 1; |
$changes->{$entry} = 1; |
} |
} |
} elsif ($entry eq 'nothideprivileged') { |
} elsif ($entry eq 'nothideprivileged') { |
my @curr_nothide; |
my @curr_nothide; |
my @new_nothide; |
my @new_nothide; |
Line 1436 sub process_changes {
|
Line 1436 sub process_changes {
|
my $newtext = $maxnum-1; |
my $newtext = $maxnum-1; |
$newhdr[$env{'form.printfmthdr_pos_'.$newtext}] = $env{'form.printfmthdr_text_'.$newtext}; |
$newhdr[$env{'form.printfmthdr_pos_'.$newtext}] = $env{'form.printfmthdr_text_'.$newtext}; |
$newvalues{$entry} = join('',@newhdr); |
$newvalues{$entry} = join('',@newhdr); |
} elsif (($entry eq 'languages') || |
} elsif (($entry eq 'languages') || |
($entry eq 'checkforpriv')) { |
($entry eq 'checkforpriv')) { |
my $settings; |
my $settings; |
my $total = $env{'form.'.$entry.'_total'}; |
my $total = $env{'form.'.$entry.'_total'}; |
Line 1452 sub process_changes {
|
Line 1452 sub process_changes {
|
} |
} |
if ($env{'form.'.$entry.'_'.$total} ne '') { |
if ($env{'form.'.$entry.'_'.$total} ne '') { |
my $new = $env{'form.'.$entry.'_'.$total}; |
my $new = $env{'form.'.$entry.'_'.$total}; |
if ($entry eq 'languages') { |
if ($entry eq 'languages') { |
my %langchoices = &get_lang_choices(); |
my %langchoices = &get_lang_choices(); |
if ($langchoices{$new}) { |
if ($langchoices{$new}) { |
$settings .= $new; |
$settings .= $new; |
Line 1551 sub process_changes {
|
Line 1551 sub process_changes {
|
} else { |
} else { |
$newvalues{$entry} = $env{'form.'.$entry}; |
$newvalues{$entry} = $env{'form.'.$entry}; |
} |
} |
unless (($entry eq 'co-owners') || ($entry eq 'discussion_post_fonts') || |
unless (($entry eq 'co-owners') || ($entry eq 'discussion_post_fonts') || |
($entry eq 'extresource') || ($entry eq 'timezone')) { |
($entry eq 'extresource') || ($entry eq 'timezone')) { |
if ($newvalues{$entry} ne $values->{$entry}) { |
if ($newvalues{$entry} ne $values->{$entry}) { |
$changes->{$entry} = $newvalues{$entry}; |
$changes->{$entry} = $newvalues{$entry}; |
Line 1661 sub process_linkprot {
|
Line 1661 sub process_linkprot {
|
} elsif (exists($env{$urlparamname})) { |
} elsif (exists($env{$urlparamname})) { |
$env{$urlparamname} = ''; |
$env{$urlparamname} = ''; |
} |
} |
|
my $passback = 'form.linkprot_passback_'.$idx; |
|
my $passbackparamname = 'form.linkprot_passbackformat_'.$idx; |
|
if ($env{$passback} == 1) { |
|
unless ($env{$passbackparamname} =~ /^1\.(0|1)$/) { |
|
$env{$passbackparamname} = ''; |
|
} |
|
} elsif (exists($env{$passbackparamname})) { |
|
$env{$passbackparamname} = ''; |
|
} |
unless ($idx eq 'add') { |
unless ($idx eq 'add') { |
if ((!$current{'returnurl'} && ($env{$urlparamname} ne '')) || |
if ((!$current{'returnurl'} && ($env{$urlparamname} ne '')) || |
($current{'returnurl'} && ($env{$urlparamname} eq ''))) { |
($current{'returnurl'} && ($env{$urlparamname} eq ''))) { |
$haschanges{$itemid} = 1; |
$haschanges{$itemid} = 1; |
} |
} |
|
if ((!$current{'passback'} && ($env{$passbackparamname} ne '')) || |
|
($current{'passback'} && ($env{$passbackparamname} eq ''))) { |
|
$haschanges{$itemid} = 1; |
|
} |
} |
} |
if ($env{$urlparamname} ne '') { |
if ($env{$urlparamname} ne '') { |
$linkprot{$itemid}{'returnurl'} = $env{$urlparamname}; |
$linkprot{$itemid}{'returnurl'} = $env{$urlparamname}; |
} |
} |
|
if ($env{$passbackparamname} ne '') { |
|
$linkprot{$itemid}{'passback'} = 1; |
|
$linkprot{$itemid}{'passbackformat'} = $env{$passbackparamname}; |
|
} |
if ($ltiauth) { |
if ($ltiauth) { |
my $reqitem = 'form.linkprot_requser_'.$idx; |
my $reqitem = 'form.linkprot_requser_'.$idx; |
$env{$reqitem} =~ s/(`)/'/g; |
$env{$reqitem} =~ s/(`)/'/g; |
Line 1780 sub get_linkprot_id {
|
Line 1797 sub get_linkprot_id {
|
$tries ++; |
$tries ++; |
sleep (0.1); |
sleep (0.1); |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
$gotlock = &Apache::lonnet::newput_dom('linkprot',$lockhash,$cdom); |
$gotlock = &Apache::lonnet::newput_dom('linkprot',$lockhash,$cdom); |
} else { |
} else { |
$gotlock = &Apache::lonnet::newput('lti',$lockhash,$cdom,$cnum); |
$gotlock = &Apache::lonnet::newput('lti',$lockhash,$cdom,$cnum); |
} |
} |
Line 1818 sub get_linkprot_id {
|
Line 1835 sub get_linkprot_id {
|
$error = 'nonumber'; |
$error = 'nonumber'; |
} |
} |
} |
} |
my $dellockoutcome; |
my $dellockoutcome; |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
$dellockoutcome = &Apache::lonnet::del_dom('linkprot',['lock'],$cdom); |
$dellockoutcome = &Apache::lonnet::del_dom('linkprot',['lock'],$cdom); |
} else { |
} else { |
Line 1883 sub process_ltitools {
|
Line 1900 sub process_ltitools {
|
my @allfields = ('fullname','firstname','lastname','email','user','roles'); |
my @allfields = ('fullname','firstname','lastname','email','user','roles'); |
map { $possfield{$_} = 1; } @allfields; |
map { $possfield{$_} = 1; } @allfields; |
|
|
my ($dest,$privnum,$cipher,$errors,%ltitools); |
my ($dest,$privnum,$cipher); |
|
|
($cipher,$privnum) = &get_credentials($cdom,$cnum,'ltitools',$context); |
($cipher,$privnum) = &get_credentials($cdom,$cnum,'ltitools',$context); |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
Line 1897 sub process_ltitools {
|
Line 1914 sub process_ltitools {
|
if ($env{'form.ltitools_add'}) { |
if ($env{'form.ltitools_add'}) { |
my $title = $env{'form.ltitools_add_title'}; |
my $title = $env{'form.ltitools_add_title'}; |
$title =~ s/(`)/'/g; |
$title =~ s/(`)/'/g; |
my ($newid,$error) = &get_ltitools_id($context,$cdom,$cnum,$title); |
my ($newid,$error) = &Apache::lonnet::get_ltitools_id($context,$cdom,$cnum,$title); |
if ($newid) { |
if ($newid) { |
my $position = $env{'form.ltitools_add_pos'}; |
my $position = $env{'form.ltitools_add_pos'}; |
$position =~ s/\D+//g; |
$position =~ s/\D+//g; |
Line 2011 sub process_ltitools {
|
Line 2028 sub process_ltitools {
|
if ($env{$keyitem} ne '') { |
if ($env{$keyitem} ne '') { |
$ltitools{$newid}{'key'} = $env{$keyitem}; |
$ltitools{$newid}{'key'} = $env{$keyitem}; |
} |
} |
my $secretitem = 'form.ltitools_add_secret'; |
my $secretitem = 'form.ltitools_secret_add'; |
$env{$secretitem} =~ s/(`)/'/g; |
$env{$secretitem} =~ s/(`)/'/g; |
if ($env{$secretitem} ne '') { |
if ($env{$secretitem} ne '') { |
if ($privnum && $cipher) { |
if ($privnum && $cipher) { |
Line 2351 sub process_ltitools {
|
Line 2368 sub process_ltitools {
|
return $errors; |
return $errors; |
} |
} |
|
|
sub get_ltitools_id { |
|
my ($context,$cdom,$cnum,$title) = @_; |
|
my ($lockhash,$tries,$gotlock,$id,$error); |
|
|
|
# get lock on ltitools db |
|
$lockhash = { |
|
lock => $env{'user.name'}. |
|
':'.$env{'user.domain'}, |
|
}; |
|
$tries = 0; |
|
if ($context eq 'domain') { |
|
$gotlock = &Apache::lonnet::newput_dom('ltitools',$lockhash,$cdom); |
|
} else { |
|
$gotlock = &Apache::lonnet::newput('ltitools',$lockhash,$cdom,$cnum); |
|
} |
|
while (($gotlock ne 'ok') && ($tries<10)) { |
|
$tries ++; |
|
sleep (0.1); |
|
if ($context eq 'domain') { |
|
$gotlock = &Apache::lonnet::newput_dom('ltitools',$lockhash,$cdom); |
|
} else { |
|
$gotlock = &Apache::lonnet::newput('ltitools',$lockhash,$cdom,$cnum); |
|
} |
|
} |
|
if ($gotlock eq 'ok') { |
|
my %currids; |
|
if ($context eq 'domain') { |
|
%currids = &Apache::lonnet::dump_dom('ltitools',$cdom); |
|
} else { |
|
%currids = &Apache::lonnet::dump('ltitools',$cdom,$cnum); |
|
} |
|
if ($currids{'lock'}) { |
|
delete($currids{'lock'}); |
|
if (keys(%currids)) { |
|
my @curr = sort { $a <=> $b } keys(%currids); |
|
if ($curr[-1] =~ /^\d+$/) { |
|
$id = 1 + $curr[-1]; |
|
} |
|
} else { |
|
$id = 1; |
|
} |
|
if ($id) { |
|
if ($context eq 'domain') { |
|
unless (&Apache::lonnet::newput_dom('ltitools',{ $id => $title },$cdom) eq 'ok') { |
|
$error = 'nostore'; |
|
} |
|
} else { |
|
unless (&Apache::lonnet::newput('ltitools',{ $id => $title },$cdom,$cnum) eq 'ok') { |
|
$error = 'nostore'; |
|
} |
|
} |
|
} else { |
|
$error = 'nonumber'; |
|
} |
|
} |
|
my $dellockoutcome; |
|
if ($context eq 'domain') { |
|
$dellockoutcome = &Apache::lonnet::del_dom('ltitools',['lock'],$cdom); |
|
} else { |
|
$dellockoutcome = &Apache::lonnet::del('ltitools',['lock'],$cdom,$cnum); |
|
} |
|
} else { |
|
$error = 'nolock'; |
|
} |
|
return ($id,$error); |
|
} |
|
|
|
sub process_ltitools_image { |
sub process_ltitools_image { |
my ($r,$context,$dom,$cnum,$confname,$caller,$itemid,$configuserok,$switch,$author_ok,$currimg) = @_; |
my ($r,$context,$dom,$cnum,$confname,$caller,$itemid,$configuserok,$switch,$author_ok,$currimg) = @_; |
my $filename = $env{'form.'.$caller.'.filename'}; |
my $filename = $env{'form.'.$caller.'.filename'}; |
Line 3088 sub store_linkprot {
|
Line 3038 sub store_linkprot {
|
my %values = %{$changes->{$id}}; |
my %values = %{$changes->{$id}}; |
my %desc = &linkprot_names(); |
my %desc = &linkprot_names(); |
my $display; |
my $display; |
foreach my $title ('name','lifetime','version','key','secret','returnurl') { |
foreach my $title ('name','lifetime','version','key','secret','returnurl','passbackformat') { |
if (($title eq 'key') || ($title eq 'secret')) { |
if (($title eq 'key') || ($title eq 'secret')) { |
if (ref($ltienc{$id}) eq 'HASH') { |
if (ref($ltienc{$id}) eq 'HASH') { |
if (exists($ltienc{$id}{$title})) { |
if (exists($ltienc{$id}{$title})) { |
Line 3106 sub store_linkprot {
|
Line 3056 sub store_linkprot {
|
} |
} |
} elsif ($title eq 'returnurl') { |
} elsif ($title eq 'returnurl') { |
if ($values{$title}) { |
if ($values{$title}) { |
$display .= &mt('Return URL parameter').': '.$values{$title}.', '; |
$display .= &mt('Return URL parameter').': '.$values{$title}.', '; |
|
} |
|
} elsif ($title eq 'passbackformat') { |
|
if ($values{$title} eq '1.0') { |
|
$display .= &mt('Can return grades to Launcher with Outcomes Service 1.0 format').', '; |
|
} elsif ($values{$title} eq '1.1') { |
|
$display .= &mt('Can return grades to Launcher with Outcomes Service 1.1 format').', '; |
} |
} |
} else { |
} else { |
$display .= $desc{$title}.': '.$values{$title}.', '; |
$display .= $desc{$title}.': '.$values{$title}.', '; |
Line 3223 sub store_ltitools {
|
Line 3179 sub store_ltitools {
|
&Apache::lonnet::devalidate_cache_new('courseltitools',$hashid); |
&Apache::lonnet::devalidate_cache_new('courseltitools',$hashid); |
unless (($home eq 'no_host') || ($home eq '')) { |
unless (($home eq 'no_host') || ($home eq '')) { |
if (grep(/^\Q$home\E$/,@ids)) { |
if (grep(/^\Q$home\E$/,@ids)) { |
&Apache::lonnet::devalidate_cache_new('courseltitoolsenc',$hashid); |
&Apache::lonnet::devalidate_cache_new('crsltitoolsenc',$hashid); |
} |
} |
} |
} |
} else { |
} else { |
Line 3532 sub get_jscript {
|
Line 3488 sub get_jscript {
|
$local_to_standard{$code_order[$i]} = $standardnames[$i]; |
$local_to_standard{$code_order[$i]} = $standardnames[$i]; |
} |
} |
foreach my $cloner (@cloners) { |
foreach my $cloner (@cloners) { |
if (($cloner !~ /^\Q*:\E$match_domain$/) && |
if (($cloner !~ /^\Q*:\E$match_domain$/) && |
($cloner !~ /^$match_username\:$match_domain$/)) { |
($cloner !~ /^$match_username\:$match_domain$/)) { |
foreach my $item (split(/\&/,$cloner)) { |
foreach my $item (split(/\&/,$cloner)) { |
my ($key,$val) = split(/\=/,$item); |
my ($key,$val) = split(/\=/,$item); |
Line 3759 function toggleTimeZone() {
|
Line 3715 function toggleTimeZone() {
|
} |
} |
ENDSCRIPT |
ENDSCRIPT |
$jscript = '<script type="text/javascript" language="Javascript">'."\n". |
$jscript = '<script type="text/javascript" language="Javascript">'."\n". |
'// <![CDATA['."\n". |
'// <![CDATA['."\n". |
$browse_js."\n".$categorize_js."\n".$loncaparev_js."\n". |
$browse_js."\n".$categorize_js."\n".$loncaparev_js."\n". |
$cloners_js."\n".$instcode_js."\n".$localization_js."\n". |
$cloners_js."\n".$instcode_js."\n".$localization_js."\n". |
$syllabus_js."\n".$menuitems_js."\n".$extresource_js."\n". |
$syllabus_js."\n".$menuitems_js."\n".$extresource_js."\n". |
Line 3973 sub print_courseinfo {
|
Line 3929 sub print_courseinfo {
|
&mt('Modification may make assessment data inaccessible!'). |
&mt('Modification may make assessment data inaccessible!'). |
'</span>'; |
'</span>'; |
$editsyllabus = &mt('[_1]Edit[_2]','<a href="/public/'.$cdom.'/'.$cnum.'/syllabus?forceedit=1">', |
$editsyllabus = &mt('[_1]Edit[_2]','<a href="/public/'.$cdom.'/'.$cnum.'/syllabus?forceedit=1">', |
'</a>'); |
'</a>'); |
} |
} |
my %items = ( |
my %items = ( |
'url' => { |
'url' => { |
Line 4054 sub print_courseinfo {
|
Line 4010 sub print_courseinfo {
|
next if (!$env{'course.'.$env{'request.course.id'}.'.internal.uniquecode'}); |
next if (!$env{'course.'.$env{'request.course.id'}.'.internal.uniquecode'}); |
} |
} |
unless (($item eq 'cloners') || ($item eq 'rolenames')) { |
unless (($item eq 'cloners') || ($item eq 'rolenames')) { |
$colspan = 2; |
$colspan = 2; |
} |
} |
$count ++; |
$count ++; |
if (exists $items{$item}{advanced} && $items{$item}{advanced} == 1) { |
if (exists $items{$item}{advanced} && $items{$item}{advanced} == 1) { |
Line 4237 sub print_courseinfo {
|
Line 4193 sub print_courseinfo {
|
if ($clonesrc =~ m{/$match_domain/$match_courseid}) { |
if ($clonesrc =~ m{/$match_domain/$match_courseid}) { |
my %clonesrcinfo = &Apache::lonnet::coursedescription($clonesrc); |
my %clonesrcinfo = &Apache::lonnet::coursedescription($clonesrc); |
if ($clonesrcinfo{'description'}) { |
if ($clonesrcinfo{'description'}) { |
$clonedfrom = $clonesrcinfo{'description'}.' '.($clonesrc); |
$clonedfrom = $clonesrcinfo{'description'}.' '.($clonesrc); |
} |
} |
} |
} |
$datatable .= $clonedfrom; |
$datatable .= $clonedfrom; |
} elsif ($item eq 'uniquecode') { |
} elsif ($item eq 'uniquecode') { |
my $code = $env{'course.'.$env{'request.course.id'}.'.internal.uniquecode'}; |
my $code = $env{'course.'.$env{'request.course.id'}.'.internal.uniquecode'}; |
if ($code) { |
if ($code) { |
$datatable .= $code; |
$datatable .= $code; |
} |
} |
Line 4289 sub print_courseinfo {
|
Line 4245 sub print_courseinfo {
|
} elsif ($uploaded) { |
} elsif ($uploaded) { |
$datatable .= &mt('Uploaded file'); |
$datatable .= &mt('Uploaded file'); |
} else { |
} else { |
$datatable .= &mt('Standard template'); |
$datatable .= &mt('Standard template'); |
} |
} |
$datatable .= (' ' x 2). |
$datatable .= (' ' x 2). |
&mt('[_1]View[_2]', |
&mt('[_1]View[_2]', |
'<a href="javascript:syllabusinfo();">', |
'<a href="javascript:syllabusinfo();">', |
'</a>'); |
'</a>'); |
} elsif ($item eq 'loncaparev') { |
} elsif ($item eq 'loncaparev') { |
my $loncaparev = $env{'course.'.$env{'request.course.id'}.'.internal.releaserequired'}; |
my $loncaparev = $env{'course.'.$env{'request.course.id'}.'.internal.releaserequired'}; |
my $showreqd; |
my $showreqd; |
Line 4319 sub new_cloners_dom_row {
|
Line 4275 sub new_cloners_dom_row {
|
my ($output,$checkedon,$checkedoff); |
my ($output,$checkedon,$checkedoff); |
if ($newdom ne '') { |
if ($newdom ne '') { |
if ($num eq $default) { |
if ($num eq $default) { |
$checkedon = 'checked="checked" '; |
$checkedon = 'checked="checked" '; |
} else { |
} else { |
$checkedoff = 'checked="checked" '; |
$checkedoff = 'checked="checked" '; |
} |
} |
Line 4470 ENDSCRIPT
|
Line 4426 ENDSCRIPT
|
|
|
sub display_loncaparev_constraints { |
sub display_loncaparev_constraints { |
my ($r,$navmap,$loncaparev,$crstype) = @_; |
my ($r,$navmap,$loncaparev,$crstype) = @_; |
my ($reqdmajor,$reqdminor); |
my ($reqdmajor,$reqdminor); |
my $cid = $env{'request.course.id'}; |
my $cid = $env{'request.course.id'}; |
my $cdom = $env{'course.'.$cid.'.domain'}; |
my $cdom = $env{'course.'.$cid.'.domain'}; |
my $cnum = $env{'course.'.$cid.'.num'}; |
my $cnum = $env{'course.'.$cid.'.num'}; |
Line 4740 sub display_loncaparev_constraints {
|
Line 4696 sub display_loncaparev_constraints {
|
if (ref($fromblocks{$type}) eq 'HASH') { |
if (ref($fromblocks{$type}) eq 'HASH') { |
foreach my $rev (keys(%{$fromblocks{$type}})) { |
foreach my $rev (keys(%{$fromblocks{$type}})) { |
my ($major,$minor) = split(/\./,$rev); |
my ($major,$minor) = split(/\./,$rev); |
($reqdmajor,$reqdminor) = |
($reqdmajor,$reqdminor) = |
&Apache::lonrelrequtils::update_reqd_loncaparev($major,$minor,$reqdmajor,$reqdminor); |
&Apache::lonrelrequtils::update_reqd_loncaparev($major,$minor,$reqdmajor,$reqdminor); |
$output .= &Apache::loncommon::start_data_table_row(). |
$output .= &Apache::loncommon::start_data_table_row(). |
'<td>'.$rev.'</td><td>'.$lt{$type}.'</td><td>'; |
'<td>'.$rev.'</td><td>'.$lt{$type}.'</td><td>'; |
Line 4827 sub display_loncaparev_constraints {
|
Line 4783 sub display_loncaparev_constraints {
|
&Apache::lonrelrequtils::update_reqd_loncaparev($major,$minor, |
&Apache::lonrelrequtils::update_reqd_loncaparev($major,$minor, |
$reqdmajor,$reqdminor); |
$reqdmajor,$reqdminor); |
$checkedrev{$key} = 1; |
$checkedrev{$key} = 1; |
} |
} |
push(@{$byresponsetype{$symb}{$rev}},$key); |
push(@{$byresponsetype{$symb}{$rev}},$key); |
$allmaps{$enclosing_map} = 1; |
$allmaps{$enclosing_map} = 1; |
} |
} |
Line 5079 sub show_contents_view {
|
Line 5035 sub show_contents_view {
|
sub releases_by_map { |
sub releases_by_map { |
my ($r,$bymap,$url,$scopeorder,$lt) = @_; |
my ($r,$bymap,$url,$scopeorder,$lt) = @_; |
return unless ((ref($bymap) eq 'HASH') && (ref($scopeorder) eq 'ARRAY')); |
return unless ((ref($bymap) eq 'HASH') && (ref($scopeorder) eq 'ARRAY')); |
my $newrow = 0; |
my $newrow = 0; |
if (ref($bymap->{$url}) eq 'HASH') { |
if (ref($bymap->{$url}) eq 'HASH') { |
foreach my $rev (sort(keys(%{$bymap->{$url}}))) { |
foreach my $rev (sort(keys(%{$bymap->{$url}}))) { |
if ($newrow) { |
if ($newrow) { |
Line 5400 sub print_localization {
|
Line 5356 sub print_localization {
|
undef,$includeempty,$disabled); |
undef,$includeempty,$disabled); |
} else { |
} else { |
if ($settings->{$item} eq '') { |
if ($settings->{$item} eq '') { |
unless ($noedit) { |
unless ($noedit) { |
$datatable .= '</td><td align="right">'. |
$datatable .= '</td><td align="right">'. |
&Apache::loncommon::select_language('languages_0','',1); |
&Apache::loncommon::select_language('languages_0','',1); |
} |
} |
Line 5437 sub print_localization {
|
Line 5393 sub print_localization {
|
&Apache::loncommon::select_language('languages_'.$num,'',1). |
&Apache::loncommon::select_language('languages_'.$num,'',1). |
'<input type="hidden" name="languages_total" value="'.$num.'" />'. |
'<input type="hidden" name="languages_total" value="'.$num.'" />'. |
'</td>'.&Apache::loncommon::end_data_table_row(); |
'</td>'.&Apache::loncommon::end_data_table_row(); |
} |
} |
$datatable .= &Apache::loncommon::end_data_table().'<br />'; |
$datatable .= &Apache::loncommon::end_data_table().'<br />'; |
} |
} |
} |
} |
$datatable .= &item_table_row_end(); |
$datatable .= &item_table_row_end(); |
Line 5724 sub print_discussion {
|
Line 5680 sub print_discussion {
|
my $colspan; |
my $colspan; |
if ($item eq 'allow_limited_html_in_feedback') { |
if ($item eq 'allow_limited_html_in_feedback') { |
$colspan = 2; |
$colspan = 2; |
} |
} |
$datatable .= &item_table_row_start($items{$item}{text},$count,undef,$colspan); |
$datatable .= &item_table_row_start($items{$item}{text},$count,undef,$colspan); |
if ($item eq 'plc.roles.denied') { |
if ($item eq 'plc.roles.denied') { |
$datatable .= '</td><td align="right">'. |
$datatable .= '</td><td align="right">'. |
Line 5769 sub print_discussion {
|
Line 5725 sub print_discussion {
|
'<th align="center">'.&mt('font-size').'</th>'. |
'<th align="center">'.&mt('font-size').'</th>'. |
'<th align="center">'.&mt('font-weight').'</th>'. |
'<th align="center">'.&mt('font-weight').'</th>'. |
'<th align="center">'.&mt('font-style').'</th>'. |
'<th align="center">'.&mt('font-style').'</th>'. |
'<th align="center">'.&mt('Other css').'</th>'. |
'<th align="center">'.&mt('Other css').'</th>'. |
&Apache::loncommon::end_data_table_row(). |
&Apache::loncommon::end_data_table_row(). |
&set_discussion_fonts($cdom,$cnum,$item,$settings,$noedit). |
&set_discussion_fonts($cdom,$cnum,$item,$settings,$noedit). |
&Apache::loncommon::end_data_table().'<br />'; |
&Apache::loncommon::end_data_table().'<br />'; |
Line 5821 sub role_checkboxes {
|
Line 5777 sub role_checkboxes {
|
my $count = 0; |
my $count = 0; |
my $disabled; |
my $disabled; |
if ($noedit) { |
if ($noedit) { |
$disabled = ' disabled="disabled"'; |
$disabled = ' disabled="disabled"'; |
} |
} |
foreach my $role (@roles) { |
foreach my $role (@roles) { |
my $checked = ''; |
my $checked = ''; |
Line 5949 sub set_discussion_fonts {
|
Line 5905 sub set_discussion_fonts {
|
|
|
sub discussion_vote_classes { |
sub discussion_vote_classes { |
my $classorder = ['twoplus','oneplus','zero','oneminus','twominus']; |
my $classorder = ['twoplus','oneplus','zero','oneminus','twominus']; |
my %classtitles = &Apache::lonlocal::texthash( |
my %classtitles = &Apache::lonlocal::texthash( |
'twoplus' => 'Two sigma above mean', |
'twoplus' => 'Two sigma above mean', |
'oneplus' => 'One sigma above mean', |
'oneplus' => 'One sigma above mean', |
'zero' => 'Within one sigma of mean', |
'zero' => 'Within one sigma of mean', |
Line 6015 sub print_classlists {
|
Line 5971 sub print_classlists {
|
'defaultcredits' => { |
'defaultcredits' => { |
text => '<b>'.&mt($itemtext->{'defaultcredits'}).'</b>', |
text => '<b>'.&mt($itemtext->{'defaultcredits'}).'</b>', |
}, |
}, |
|
|
'nothideprivileged' => { |
'nothideprivileged' => { |
text => '<b>'.&mt($itemtext->{'nothideprivileged'}).'</b>', |
text => '<b>'.&mt($itemtext->{'nothideprivileged'}).'</b>', |
input => 'checkbox', |
input => 'checkbox', |
Line 6310 sub print_bridgetasks {
|
Line 6266 sub print_bridgetasks {
|
sub print_ltitools { |
sub print_ltitools { |
my ($cdom,$cnum,$settings,$rowtotal,$crstype,$noedit,$context) = @_; |
my ($cdom,$cnum,$settings,$rowtotal,$crstype,$noedit,$context) = @_; |
my ($datatable,$disabled,$css_class,$dest); |
my ($datatable,$disabled,$css_class,$dest); |
my %lt = <itools_names(); |
if ($noedit) { |
|
$disabled = ' disabled="disabled"'; |
|
} |
my $itemcount = 1; |
my $itemcount = 1; |
|
unless ($context eq 'domain') { |
|
my %tooltypes = &Apache::loncommon::usable_exttools(); |
|
unless ($tooltypes{'crs'}) { |
|
my $showtype = 'course'; |
|
if ($crstype eq 'Community') { |
|
$showtype = lc($crstype); |
|
} |
|
$css_class = $itemcount%2?' class="LC_odd_row"':''; |
|
$datatable = '<tr '.$css_class.'><td colspan="2">'. |
|
&mt("Definition of external tools is not enabled for this $showtype.").'<br />'; |
|
if ($tooltypes{'dom'}) { |
|
$datatable .= &mt("Contact an administrator for the $showtype domain ([_1]) to request this feature be enabled.", |
|
'<i>'.$cdom.'</i>'). |
|
'<br /><br />'. |
|
&mt("Use of external tools defined at a domain level is enabled, so the $showtype editor can be used to add tool(s), if any have been defined."); |
|
} else { |
|
$datatable .= &mt("Use of external tools defined at a domain level is not enabled, either, for this $showtype."). |
|
'<br /><br />'. |
|
&mt("Contact an administrator for the $showtype domain ([_1]) to request changes.", |
|
'<i>'.$cdom.'</i>'); |
|
|
|
} |
|
$datatable .= '</tr>'; |
|
$itemcount ++; |
|
return $datatable; |
|
} |
|
} |
|
my %lt = <itools_names(); |
my $maxnum = 0; |
my $maxnum = 0; |
my %ordered; |
my %ordered; |
if (ref($settings) eq 'HASH') { |
if (ref($settings) eq 'HASH') { |
Line 6393 sub print_ltitools {
|
Line 6379 sub print_ltitools {
|
'<option value="HMAC-SHA1"'.$sigsel{'HMAC-SHA1'}.'>HMAC-SHA1</option>'. |
'<option value="HMAC-SHA1"'.$sigsel{'HMAC-SHA1'}.'>HMAC-SHA1</option>'. |
'<option value="HMAC-SHA256"'.$sigsel{'HMAC-SHA256'}.'>HMAC-SHA256</option></select></span>'. |
'<option value="HMAC-SHA256"'.$sigsel{'HMAC-SHA256'}.'>HMAC-SHA256</option></select></span>'. |
'<br /><br />'. |
'<br /><br />'. |
'<span class="LC_nobreak">'.$lt{'url'}.':<input type="text" size="40" name="ltitools_url_'.$i.'"'. |
'<span class="LC_nobreak">'.$lt{'url'}.':<input type="text" size="60" name="ltitools_url_'.$i.'"'. |
' value="'.$url.'" /></span>'. |
' value="'.$url.'" /></span>'. |
(' 'x2). |
(' 'x2). |
'<span class="LC_nobreak">'.$lt{'lifetime'}.':'. |
'<span class="LC_nobreak">'.$lt{'lifetime'}.':'. |
Line 6671 sub print_ltitools {
|
Line 6657 sub print_ltitools {
|
'<option value="HMAC-SHA1" selected="selected">HMAC-SHA1</option>'. |
'<option value="HMAC-SHA1" selected="selected">HMAC-SHA1</option>'. |
'<option value="HMAC-SHA256">HMAC-SHA256</option></select></span>'. |
'<option value="HMAC-SHA256">HMAC-SHA256</option></select></span>'. |
'<br />'. |
'<br />'. |
'<span class="LC_nobreak">'.$lt{'url'}.':<input type="text" size="40" name="ltitools_add_url" value="" /></span> '."\n". |
'<span class="LC_nobreak">'.$lt{'url'}.':<input type="text" size="60" name="ltitools_add_url" value="" /></span> '."\n". |
(' 'x2). |
(' 'x2). |
'<span class="LC_nobreak">'.$lt{'lifetime'}.':<input type="text" size="5" name="ltitools_add_lifetime" value="300" /></span><br />'; |
'<span class="LC_nobreak">'.$lt{'lifetime'}.':<input type="text" size="5" name="ltitools_add_lifetime" value="300" /></span><br />'; |
if ($switchserver) { |
if ($switchserver) { |
Line 6679 sub print_ltitools {
|
Line 6665 sub print_ltitools {
|
} else { |
} else { |
$datatable .= '<span class="LC_nobreak">'.$lt{'key'}.':<input type="text" size="25" name="ltitools_add_key" value="" autocomplete="off"'.$disabled.' /></span> '."\n". |
$datatable .= '<span class="LC_nobreak">'.$lt{'key'}.':<input type="text" size="25" name="ltitools_add_key" value="" autocomplete="off"'.$disabled.' /></span> '."\n". |
(' 'x2). |
(' 'x2). |
'<span class="LC_nobreak">'.$lt{'secret'}.':<input type="password" size="20" name="ltitools_add_secret" value="" autocomplete="new-password"'.$disabled.' />'. |
'<span class="LC_nobreak">'.$lt{'secret'}.':<input type="password" size="20" name="ltitools_secret_add" value="" autocomplete="new-password"'.$disabled.' />'. |
'<label><input type="checkbox" name="ltitools_add_visible" id="ltitools_add_visible" onclick="if (this.checked) { this.form.ltitools_add_secret.type='."'text'".' } else { this.form.ltitools_add_secret.type='."'password'".' }"'.$disabled.' />'.&mt('Visible input').'</label></span> '."\n"; |
'<label><input type="checkbox" name="ltitools_add_visible" id="ltitools_add_visible" onclick="if (this.checked) { this.form.ltitools_secret_add.type='."'text'".' } else { this.form.ltitools_secret_add.type='."'password'".' }"'.$disabled.' />'.&mt('Visible input').'</label></span> '."\n"; |
} |
} |
$datatable .= '<br /><br />'. |
$datatable .= '<br /><br />'. |
'</fieldset>'. |
'</fieldset>'. |
Line 7197 sub menucollections_display {
|
Line 7183 sub menucollections_display {
|
'<legend>'.$menutitles{$category}.'</legend>'."\n"; |
'<legend>'.$menutitles{$category}.'</legend>'."\n"; |
if ($category eq 'text') { |
if ($category eq 'text') { |
$output .= '<b>'.&mt('Header Text').'</b><br /><br />'; |
$output .= '<b>'.&mt('Header Text').'</b><br /><br />'; |
} |
} |
foreach my $field (@{$categories{$category}}) { |
foreach my $field (@{$categories{$category}}) { |
if ($field eq 'disc') { |
if ($field eq 'disc') { |
$output .= '<br /><b>'.&mt('Footer Text').'</b><br /><br />'; |
$output .= '<br /><b>'.&mt('Footer Text').'</b><br /><br />'; |
Line 7252 sub print_linkprotection {
|
Line 7238 sub print_linkprotection {
|
} else { |
} else { |
$dest = '/adm/courseprefs'; |
$dest = '/adm/courseprefs'; |
} |
} |
|
|
my ($switchserver,$switchmessage); |
my ($switchserver,$switchmessage); |
$switchserver = &check_switchserver($cdom,$cnum,$context,$dest); |
$switchserver = &check_switchserver($cdom,$cnum,$context,$dest); |
if ($switchserver) { |
if ($switchserver) { |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
$switchmessage = &mt("submit from domain's primary library server: [_1].",$switchserver); |
$switchmessage = &mt("submit from domain's primary library server: [_1].",$switchserver); |
} elsif ($crstype eq 'Community') { |
} elsif ($crstype eq 'Community') { |
$switchmessage = &mt("submit from community's home server: [_1].",$switchserver); |
$switchmessage = &mt("submit from community's home server: [_1].",$switchserver); |
} else { |
} else { |
Line 7286 sub print_linkprotection {
|
Line 7272 sub print_linkprotection {
|
'<tr '.$css_class.'><td><span class="LC_nobreak">'. |
'<tr '.$css_class.'><td><span class="LC_nobreak">'. |
'<label><input type="checkbox" name="linkprot_del" value="'.$i.'"'.$disabled.' />'. |
'<label><input type="checkbox" name="linkprot_del" value="'.$i.'"'.$disabled.' />'. |
&mt('Delete?').'</label></span></td><td>'; |
&mt('Delete?').'</label></span></td><td>'; |
my ($usersty,$onclickrequser,%checkedrequser,$onclickreturnurl,%checkedreturnurl); |
my ($usersty,$onclickrequser,%checkedrequser,$onclickreturnurl,%checkedreturnurl, |
|
$onclickpassback,%checkedpassback,$passbacksty,%checkedpassbackfmt); |
|
$passbacksty = 'none'; |
|
$onclickpassback = ' onclick="toggleLinkProtExtra(this.form,'."'passback','passbackparam','1','inline-block','$i'".');"'; |
|
%checkedpassback = ( |
|
'no' => ' checked="checked"', |
|
'yes' => '', |
|
); |
|
%checkedpassbackfmt = ( |
|
'1p1' => ' checked="checked"', |
|
'1p0' => '', |
|
); |
|
if ($values{'passback'} ne '') { |
|
$passbacksty = 'inline-block'; |
|
$checkedpassback{'yes'} = ' checked="checked"'; |
|
$checkedpassback{'no'} = ''; |
|
if ($values{'passbackformat'} eq '1.0') { |
|
$checkedpassbackfmt{'1p0'} = ' checked="checked"'; |
|
$checkedpassbackfmt{'1p1'} = ''; |
|
} |
|
} |
if ($ltiauth) { |
if ($ltiauth) { |
$usersty = 'display:none'; |
$usersty = 'display:none'; |
$onclickrequser = ' onclick="toggleLinkProtExtra(this.form,'."'requser','optional','1','block','$i'".');"'; |
$onclickrequser = ' onclick="toggleLinkProtExtra(this.form,'."'requser','optional','1','block','$i'".');"'; |
Line 7299 sub print_linkprotection {
|
Line 7305 sub print_linkprotection {
|
$checkedrequser{'no'} = ''; |
$checkedrequser{'no'} = ''; |
} |
} |
$datatable .= '<fieldset><legend>'.$lt{'requ'}.'</legend>'; |
$datatable .= '<fieldset><legend>'.$lt{'requ'}.'</legend>'; |
if ($values{'requser'}) { |
if ($values{'requser'}) { |
$usersty = 'display:inline-block'; |
$usersty = 'display:inline-block'; |
} |
} |
} |
} |
Line 7375 sub print_linkprotection {
|
Line 7381 sub print_linkprotection {
|
} |
} |
} |
} |
$datatable .= '<br /><br />'. |
$datatable .= '<br /><br />'. |
|
'<span class="LC_nobreak">'.$desc{'passback'}.'?'. |
|
'<label><input type="radio" name="linkprot_passback_'.$i.'" value="0"'. |
|
$onclickpassback.$checkedpassback{'no'}.$disabled.' />'.&mt('No').'</label> '. |
|
'<label><input type="radio" name="linkprot_passback_'.$i.'" value="1"'. |
|
$onclickpassback.$checkedpassback{'yes'}.$disabled.' />'.&mt('Yes').'</label></span><br />'. |
|
'<div id="linkprot_passbackparam_'.$i.'" class="LC_floatleft" style="display:'.$passbacksty.'" />'. |
|
'<span class="LC_nobreak">'.&mt('Grade format'). |
|
'<label><input type="radio" name="linkprot_passbackformat_'.$i.'" value="1.1"'.$checkedpassbackfmt{'1p1'}.' />'. |
|
&mt('Outcomes Service (1.1)').'</label>'.(' 'x2). |
|
'<label><input type="radio" name="linkprot_passbackformat_'.$i.'" value="1.0"'.$checkedpassbackfmt{'1p0'}.'/>'. |
|
&mt('Outcomes Extension (1.0)').'</label></span></div>'. |
|
'<div style="padding:0;clear:both;margin:0;border:0"></div>'. |
|
'<br />'. |
'<span class="LC_nobreak">'.$desc{'returnurl'}.'?'. |
'<span class="LC_nobreak">'.$desc{'returnurl'}.'?'. |
'<label><input type="radio" name="linkprot_returnurl_'.$i.'" value="0"'. |
'<label><input type="radio" name="linkprot_returnurl_'.$i.'" value="0"'. |
$onclickreturnurl.$checkedreturnurl{'no'}.$disabled.' />'.&mt('No').'</label> '. |
$onclickreturnurl.$checkedreturnurl{'no'}.$disabled.' />'.&mt('No').'</label> '. |
Line 7405 sub print_linkprotection {
|
Line 7424 sub print_linkprotection {
|
'<input type="hidden" name="linkprot_maxnum" value="'.$next.'" />'."\n". |
'<input type="hidden" name="linkprot_maxnum" value="'.$next.'" />'."\n". |
'<input type="checkbox" name="linkprot_add" value="1"'.$disabled.' />'.&mt('Add').'</span></td>'."\n". |
'<input type="checkbox" name="linkprot_add" value="1"'.$disabled.' />'.&mt('Add').'</span></td>'."\n". |
'<td width="100%">'; |
'<td width="100%">'; |
my ($usersty,$onclickrequser,%checkedrequser,$onclickreturnurl,%checkedreturnurl); |
my ($usersty,$onclickrequser,%checkedrequser,$onclickreturnurl,%checkedreturnurl, |
|
$onclickpassback,%checkedpassback,%checkedpassbackfmt); |
if ($ltiauth) { |
if ($ltiauth) { |
$usersty = 'display:none'; |
$usersty = 'display:none'; |
$onclickrequser = ' onclick="toggleLinkProtExtra(this.form,'."'requser','optional','1','block','add'".');"'; |
$onclickrequser = ' onclick="toggleLinkProtExtra(this.form,'."'requser','optional','1','block','add'".');"'; |
Line 7415 sub print_linkprotection {
|
Line 7435 sub print_linkprotection {
|
); |
); |
$datatable .= '<fieldset><legend>'.$lt{'requ'}.'</legend>'; |
$datatable .= '<fieldset><legend>'.$lt{'requ'}.'</legend>'; |
} |
} |
|
$onclickpassback = ' onclick="toggleLinkProtExtra(this.form,'."'passback','passbackparam','1','inline-block','add'".');"'; |
|
%checkedpassback = ( |
|
'no' => ' checked="checked"', |
|
'yes' => '', |
|
); |
|
%checkedpassbackfmt = ( |
|
'1p1' => ' checked="checked"', |
|
'1p0' => '', |
|
); |
$onclickreturnurl = ' onclick="toggleLinkProtExtra(this.form,'."'returnurl','divurlparam','1','inline-block','add'".');"'; |
$onclickreturnurl = ' onclick="toggleLinkProtExtra(this.form,'."'returnurl','divurlparam','1','inline-block','add'".');"'; |
%checkedreturnurl = ( |
%checkedreturnurl = ( |
no => ' checked="checked"', |
no => ' checked="checked"', |
Line 7437 sub print_linkprotection {
|
Line 7466 sub print_linkprotection {
|
'<label><input type="checkbox" name="linkprot_visible_add" id="linkprot_visible_add" onclick="if (this.checked) { this.form.linkprot_secret_add.type='."'text'".' } else { this.form.linkprot_secret_add.type='."'password'".' }"'.$disabled.' />'.&mt('Visible input').'</label></span> '."\n"; |
'<label><input type="checkbox" name="linkprot_visible_add" id="linkprot_visible_add" onclick="if (this.checked) { this.form.linkprot_secret_add.type='."'text'".' } else { this.form.linkprot_secret_add.type='."'password'".' }"'.$disabled.' />'.&mt('Visible input').'</label></span> '."\n"; |
} |
} |
$datatable .= '<br /><br />'. |
$datatable .= '<br /><br />'. |
|
'<span class="LC_nobreak">'.$desc{'passback'}.'?'. |
|
'<label><input type="radio" name="linkprot_passback_add" value="0"'. |
|
$onclickpassback.$checkedpassback{'no'}.$disabled.' />'.&mt('No').'</label> '. |
|
'<label><input type="radio" name="linkprot_passback_add" value="1"'. |
|
$onclickpassback.$checkedpassback{'yes'}.$disabled.' />'.&mt('Yes').'</label></span>'. |
|
'<br /><div id="linkprot_passbackparam_add" class="LC_floatleft" style="display:none" />'. |
|
'<span class="LC_nobreak">'.&mt('Grade format'). |
|
'<label><input type="radio" name="linkprot_passbackformat_add" value="1.1"'.$checkedpassbackfmt{'1p1'}.$disabled.' />'. |
|
&mt('Outcomes Service (1.1)').'</label>'.(' 'x2). |
|
'<label><input type="radio" name="linkprot_passbackformat_add" value="1.0"'.$checkedpassbackfmt{'1p0'}.$disabled.' />'. |
|
&mt('Outcomes Extension (1.0)').'</label></span></div>'. |
|
'<div style="padding:0;clear:both;margin:0;border:0"></div>'. |
|
'<br />'. |
'<span class="LC_nobreak">'.$desc{'returnurl'}.'?'. |
'<span class="LC_nobreak">'.$desc{'returnurl'}.'?'. |
'<label><input type="radio" name="linkprot_returnurl_add" value="0"'. |
'<label><input type="radio" name="linkprot_returnurl_add" value="0"'. |
$onclickreturnurl.$checkedreturnurl{'no'}.$disabled.' />'.&mt('No').'</label> '. |
$onclickreturnurl.$checkedreturnurl{'no'}.$disabled.' />'.&mt('No').'</label> '. |
Line 7469 sub linkprot_names {
|
Line 7511 sub linkprot_names {
|
'lifetime' => 'Nonce lifetime (s)', |
'lifetime' => 'Nonce lifetime (s)', |
'name' => 'Launcher Application', |
'name' => 'Launcher Application', |
'secret' => 'Secret', |
'secret' => 'Secret', |
|
'passback' => 'Can return grades to Launcher', |
'returnurl' => 'Launcher return URL', |
'returnurl' => 'Launcher return URL', |
'requser' => 'Use identity', |
'requser' => 'Use identity', |
'email' => 'Email address', |
'email' => 'Email address', |
Line 7561 sub print_extresource_row {
|
Line 7604 sub print_extresource_row {
|
$config->{'options'},$selected, |
$config->{'options'},$selected, |
$config->{'nullval'}, |
$config->{'nullval'}, |
undef,undef,$onchange,$noedit,$id); |
undef,undef,$onchange,$noedit,$id); |
my ($checked,$reusesty,$sizesty); |
my ($checked,$reusesty,$sizesty); |
if ($reuse) { |
if ($reuse) { |
$checked = ' checked="checked"'; |
$checked = ' checked="checked"'; |
} |
} |
Line 7855 sub nothidepriv_row {
|
Line 7898 sub nothidepriv_row {
|
} |
} |
} |
} |
if ($settings->{'checkforpriv'}) { |
if ($settings->{'checkforpriv'}) { |
@checkdoms = split(/,/,$settings->{'checkforpriv'}); |
@checkdoms = split(/,/,$settings->{'checkforpriv'}); |
} |
} |
} |
} |
push(@checkdoms,$cdom); |
push(@checkdoms,$cdom); |
Line 7869 sub nothidepriv_row {
|
Line 7912 sub nothidepriv_row {
|
if ($end == -1 || $start == -1) { |
if ($end == -1 || $start == -1) { |
next; |
next; |
} |
} |
foreach my $dom (@checkdoms) { |
foreach my $dom (@checkdoms) { |
if (&Apache::lonnet::privileged($uname,$udom,\@checkdoms,['dc','su'])) { |
if (&Apache::lonnet::privileged($uname,$udom,\@checkdoms,['dc','su'])) { |
unless (grep(/^\Q$user\E$/,@privusers)) { |
unless (grep(/^\Q$user\E$/,@privusers)) { |
push(@privusers,$user); |
push(@privusers,$user); |
Line 7945 sub checkforpriv_row {
|
Line 7988 sub checkforpriv_row {
|
my $domdesc = &Apache::lonnet::domain($currdom,'description'); |
my $domdesc = &Apache::lonnet::domain($currdom,'description'); |
if ($domdesc eq '') { |
if ($domdesc eq '') { |
$domdesc = $currdom; |
$domdesc = $currdom; |
} |
} |
$datatable .= |
$datatable .= |
&Apache::loncommon::start_data_table_row(). |
&Apache::loncommon::start_data_table_row(). |
'<td align="left"><span class="LC_nobreak">'. |
'<td align="left"><span class="LC_nobreak">'. |
Line 7957 sub checkforpriv_row {
|
Line 8000 sub checkforpriv_row {
|
&mt('Delete').'</label></span></td>'. |
&mt('Delete').'</label></span></td>'. |
&Apache::loncommon::end_data_table_row(); |
&Apache::loncommon::end_data_table_row(); |
$num ++; |
$num ++; |
unless (grep(/^\Q$currdom\E$/,@excdoms)) { |
unless (grep(/^\Q$currdom\E$/,@excdoms)) { |
push(@excdoms,$currdom); |
push(@excdoms,$currdom); |
} |
} |
} |
} |
} |
} |
if ((scalar(keys(%domains)) - scalar(@excdoms)) > 0) { |
if ((scalar(keys(%domains)) - scalar(@excdoms)) > 0) { |
$datatable .= |
$datatable .= |
&Apache::loncommon::start_data_table_row(). |
&Apache::loncommon::start_data_table_row(). |
'<td align="left"><span class="LC_nobreak">'. |
'<td align="left"><span class="LC_nobreak">'. |
&mt('Additional domain:'). '</span><br />'. |
&mt('Additional domain:'). '</span><br />'. |
Line 8077 ENDJS
|
Line 8120 ENDJS
|
} |
} |
} |
} |
my $pos = $currnum+1; |
my $pos = $currnum+1; |
unless ($noedit) { |
unless ($noedit) { |
$output .= |
$output .= |
'<tr>'. |
'<tr>'. |
'<td align="left"><span class="LC_nobreak">'. |
'<td align="left"><span class="LC_nobreak">'. |
Line 8224 sub devalidate_remote_courseprefs {
|
Line 8267 sub devalidate_remote_courseprefs {
|
my %servers = &Apache::lonnet::internet_dom_servers($cdom); |
my %servers = &Apache::lonnet::internet_dom_servers($cdom); |
my %thismachine; |
my %thismachine; |
map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids(); |
map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids(); |
my @posscached = ('courselti'); |
my @posscached = ('courselti','courseltitools'); |
if (keys(%servers)) { |
if (keys(%servers)) { |
foreach my $server (keys(%servers)) { |
foreach my $server (keys(%servers)) { |
next if ($thismachine{$server}); |
next if ($thismachine{$server}); |