version 1.723, 2025/02/03 22:52:36
|
version 1.727, 2025/03/15 01:03:33
|
Line 1704 sub group_import {
|
Line 1704 sub group_import {
|
my $marker = $2; |
my $marker = $2; |
my $info = $3; |
my $info = $3; |
my ($toolid,$toolprefix,$tooltype,%toolhash,%toolsettings); |
my ($toolid,$toolprefix,$tooltype,%toolhash,%toolsettings); |
my @extras = ('linktext','explanation','crslabel','crstitle','crsappend'); |
my @extras = ('linktext','explanation','crslabel','crstitle','crsappend','returnurl','backtourl'); |
my @toolinfo = split(/:/,$info); |
my @toolinfo = split(/:/,$info); |
if ($residx) { |
if ($residx) { |
%toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum); |
%toolsettings=&Apache::lonnet::dump('exttool_'.$marker,$coursedom,$coursenum); |
Line 1721 sub group_import {
|
Line 1721 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{'crslabel'}, |
$toolhash{'linktext'},$toolhash{'explanation'},$toolhash{'crslabel'}, |
$toolhash{'crstitle'},$toolhash{'crsappend'},$toolhash{'gradable'}) = @toolinfo; |
$toolhash{'crstitle'},$toolhash{'crsappend'},$toolhash{'gradable'}, |
|
$toolhash{'returnurl'},$toolhash{'backtourl'}) = @toolinfo; |
foreach my $item (@extras) { |
foreach my $item (@extras) { |
$toolhash{$item} = &unescape($toolhash{$item}); |
$toolhash{$item} = &unescape($toolhash{$item}); |
} |
} |
Line 1808 sub group_import {
|
Line 1809 sub group_import {
|
} |
} |
} |
} |
} |
} |
|
if ($tools{'crsconf'}{'returnurl'}) { |
|
unless ($toolhash{'returnurl'} eq 'custom') { |
|
delete($toolhash{'backtourl'}); |
|
} |
|
} else { |
|
delete($toolhash{'returnurl'}); |
|
delete($toolhash{'backtourl'}); |
|
} |
} |
} |
if ($toolhash{'passback'}) { |
if ($toolhash{'passback'}) { |
my $gradesecret = UUID::Tiny::create_uuid_as_string(UUID_V4); |
my $gradesecret = UUID::Tiny::create_uuid_as_string(UUID_V4); |
Line 1836 sub group_import {
|
Line 1845 sub group_import {
|
} |
} |
} |
} |
} |
} |
|
if ($residx) { |
|
if (($toolsettings{'backtourl'} ne '') && (!exists($toolhash{'backtourl'}))) { |
|
push(@deleted,'backtourl'); |
|
} |
|
if (($toolsettings{'returnurl'} ne '') && (!exists($toolhash{'returnurl'}))) { |
|
push(@deleted,'returnurl'); |
|
} |
|
} |
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) { |
Line 4985 sub editor {
|
Line 5002 sub editor {
|
.&Apache::loncommon::help_open_menu('Navigation Screen', |
.&Apache::loncommon::help_open_menu('Navigation Screen', |
$helpitem,undef,'RAT') |
$helpitem,undef,'RAT') |
.'</div><div class="LC_navtools">'.&mt('Tools:').'</div>' |
.'</div><div class="LC_navtools">'.&mt('Tools:').'</div>' |
.'<div class="LC_navtools">'."\n".'<ul id="LC_toolbar">' |
.'<div class="LC_navtools">'."\n".'<ul id="LC_toolbar">' |
.'<li><a href="/adm/coursedocs?forcesupplement=1&command=editsupp" ' |
.'<li><a href="/adm/coursedocs?forcesupplement=1&command=editsupp" ' |
.'id="LC_content_toolbar_edittoplevel" ' |
.'id="LC_content_toolbar_edittoplevel" ' |
.'class="LC_toolbarItem" ' |
.'class="LC_toolbarItem" ' |
Line 5044 sub editor {
|
Line 5061 sub editor {
|
} else { |
} else { |
$to_show .= $toolslink |
$to_show .= $toolslink |
.&Apache::loncommon::start_data_table('LC_tableOfContent') |
.&Apache::loncommon::start_data_table('LC_tableOfContent') |
|
.&Apache::loncommon::start_data_table_header_row('LC_visually_hidden') |
|
.'<th>'.&mt('Resource Type (Icon)').'</th><th>'.&mt('Resource or Folder').'</th>' |
|
.&Apache::loncommon::end_data_table_header_row() |
.$output.' ' |
.$output.' ' |
.&Apache::loncommon::end_data_table(); |
.&Apache::loncommon::end_data_table(); |
} |
} |
Line 5908 $form_end;
|
Line 5928 $form_end;
|
} else { |
} else { |
$reinit = &mt('(re-initialize course to access)'); |
$reinit = &mt('(re-initialize course to access)'); |
} |
} |
$line.='<td class="LC_docs_entry_commands"'.$tdalign.'><span class="LC_nobreak">'.$editlink.$renamelink.'</span>'; |
if ($allowed) { |
if ($orig_url =~ /$LONCAPA::assess_re/) { |
$line.='<td class="LC_docs_entry_commands"'.$tdalign.'><span class="LC_nobreak">'.$editlink.$renamelink.'</span>'; |
$line.= '<br />'; |
if ($orig_url =~ /$LONCAPA::assess_re/) { |
if ($curralias ne '') { |
$line.= '<br />'; |
$line.='<span class="LC_nobreak"><a href="javascript:delalias('."'$esc_path','$orderidx'".');" class="LC_docs_alias">'. |
if ($curralias ne '') { |
$lt{'da'}.'</a></span>'; |
$line.='<span class="LC_nobreak"><a href="javascript:delalias('."'$esc_path','$orderidx'".');" class="LC_docs_alias">'. |
} else { |
$lt{'da'}.'</a></span>'; |
$line.='<span class="LC_nobreak"><a href="javascript:setalias('."'$esc_path','$orderidx'".');" class="LC_docs_alias">'. |
} else { |
$lt{'sa'}.'</a></span>'; |
$line.='<span class="LC_nobreak"><a href="javascript:setalias('."'$esc_path','$orderidx'".');" class="LC_docs_alias">'. |
|
$lt{'sa'}.'</a></span>'; |
|
} |
} |
} |
|
$line.='</td>'; |
} |
} |
$line.='</td><td><span class="LC_nobreak">'; |
$line .= '<td><span class="LC_nobreak">'; |
my ($link,$nolink); |
my ($link,$nolink); |
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { |
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { |
if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage) { |
if ($allowed && !$env{'request.role.adv'} && !$isfolder && !$ispage) { |
Line 6841 sub create_form_ul {
|
Line 6864 sub create_form_ul {
|
|
|
sub startContentScreen { |
sub startContentScreen { |
my ($mode) = @_; |
my ($mode) = @_; |
my $output = '<ul class="LC_TabContentBigger" id="mainnav">'; |
my $output = '<div class="LC_landmark" role="main">'. |
|
'<ul class="LC_TabContentBigger" id="mainnav">'; |
if (($mode eq 'navmaps') || ($mode eq 'supplemental')) { |
if (($mode eq 'navmaps') || ($mode eq 'supplemental')) { |
$output .= '<li'.(($mode eq 'navmaps')?' class="active"':'').'><a href="/adm/navmaps"><b> '.&mt('Content Overview').' </b></a></li>'."\n"; |
$output .= '<li'.(($mode eq 'navmaps')?' class="active"':'').'><a href="/adm/navmaps"><b> '.&mt('Content Overview').' </b></a></li>'."\n"; |
$output .= '<li'.(($mode eq 'coursesearch')?' class="active"':'').'><a href="/adm/searchcourse"><b> '.&mt('Content Search').' </b></a></li>'."\n"; |
$output .= '<li'.(($mode eq 'coursesearch')?' class="active"':'').'><a href="/adm/searchcourse"><b> '.&mt('Content Search').' </b></a></li>'."\n"; |
Line 6865 sub startContentScreen {
|
Line 6889 sub startContentScreen {
|
# |
# |
|
|
sub endContentScreen { |
sub endContentScreen { |
return '</div></div></div>'; |
return '</div></div></div></div>'; |
} |
} |
|
|
sub supplemental_base { |
sub supplemental_base { |
Line 7335 sub handler {
|
Line 7359 sub handler {
|
@tabids = ('002','dd2','ee2','ff2'); |
@tabids = ('002','dd2','ee2','ff2'); |
$tid = 2; |
$tid = 2; |
} else { |
} else { |
@tabids = ('aa1','bb1','cc1','ff1'); |
@tabids = ('aa1','bb1','cc1','dd1','ff1'); |
unless ($env{'form.folderpath'} =~ /\:1$/) { |
unless ($env{'form.folderpath'} =~ /\:1$/) { |
unshift(@tabids,'001'); |
unshift(@tabids,'001'); |
push(@tabids,('dd1','ee1')); |
push(@tabids,'ee1'); |
} |
} |
} |
} |
my $tabidstr = join("','",@tabids); |
my $tabidstr = join("','",@tabids); |