version 1.484.2.66, 2016/10/31 20:48:30
|
version 1.484.2.67, 2016/11/30 00:41:24
|
Line 139 sub clean {
|
Line 139 sub clean {
|
return $title; |
return $title; |
} |
} |
|
|
|
sub default_folderpath { |
|
my ($coursenum,$coursedom,$navmapref) = @_; |
|
return unless ($coursenum && $coursedom && ref($navmapref)); |
|
# Check if entire course is hidden and/or encrypted |
|
my ($hiddenmap,$encryptmap,$folderpath,$hiddentop); |
|
my $toplevel = "uploaded/$coursedom/$coursenum/default.sequence"; |
|
unless (ref($$navmapref)) { |
|
$$navmapref = Apache::lonnavmaps::navmap->new(); |
|
} |
|
if (ref($$navmapref)) { |
|
if (lc($$navmapref->get_mapparam(undef,$toplevel,"0.hiddenresource")) eq 'yes') { |
|
my $filterFunc = sub { my $res = shift; return (!$res->randomout() && !$res->is_map()) }; |
|
my @resources = $$navmapref->retrieveResources($toplevel,$filterFunc,1,1); |
|
unless (@resources) { |
|
$hiddenmap = 1; |
|
unless ($env{'request.role.adv'}) { |
|
$hiddentop = 1; |
|
if ($env{'form.folder'}) { |
|
undef($env{'form.folder'}); |
|
} |
|
} |
|
} |
|
} |
|
if (lc($$navmapref->get_mapparam(undef,$toplevel,"0.encrypturl")) eq 'yes') { |
|
$encryptmap = 1; |
|
} |
|
} |
|
unless ($hiddentop) { |
|
$folderpath='default&'.&escape(&mt('Main Content')). |
|
'::'.$hiddenmap.':'.$encryptmap.'::'; |
|
} |
|
if (wantarray) { |
|
return ($folderpath,$hiddentop); |
|
} else { |
|
return $folderpath; |
|
} |
|
} |
|
|
sub dumpcourse { |
sub dumpcourse { |
my ($r) = @_; |
my ($r) = @_; |
Line 791 sub log_docs {
|
Line 827 sub log_docs {
|
} |
} |
|
|
sub docs_change_log { |
sub docs_change_log { |
my ($r,$coursenum,$coursedom,$folder,$allowed,$crstype,$iconpath)=@_; |
my ($r,$coursenum,$coursedom,$folder,$allowed,$crstype,$iconpath,$canedit)=@_; |
my $supplementalflag=($env{'form.folderpath'}=~/^supplemental/); |
my $supplementalflag=($env{'form.folderpath'}=~/^supplemental/); |
|
my $navmap; |
my $js = '<script type="text/javascript">'."\n". |
my $js = '<script type="text/javascript">'."\n". |
'// <![CDATA['."\n". |
'// <![CDATA['."\n". |
&Apache::loncommon::display_filter_js('docslog')."\n". |
&Apache::loncommon::display_filter_js('docslog')."\n". |
&editing_js($env{'user.domain'},$env{'user.name'},$supplementalflag)."\n". |
&editing_js($env{'user.domain'},$env{'user.name'},$supplementalflag, |
|
$coursedom,$coursenum,$canedit,\$navmap)."\n". |
&history_tab_js()."\n". |
&history_tab_js()."\n". |
&Apache::lonratedt::editscript('simple')."\n". |
&Apache::lonratedt::editscript('simple')."\n". |
'// ]]>'."\n". |
'// ]]>'."\n". |
Line 812 sub docs_change_log {
|
Line 850 sub docs_change_log {
|
} |
} |
my $folderpath=$env{'form.folderpath'}; |
my $folderpath=$env{'form.folderpath'}; |
if ($folderpath eq '') { |
if ($folderpath eq '') { |
$folderpath = 'default&'.&escape(&mt('Main Content').':::::'); |
$folderpath = &default_folderpath($coursenum,$coursedom,\$navmap); |
} |
} |
|
undef($navmap); |
$pathitem = '<input type="hidden" name="folderpath" value="'. |
$pathitem = '<input type="hidden" name="folderpath" value="'. |
&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
my $readfile="/uploaded/$coursedom/$coursenum/$folder.$container"; |
my $readfile="/uploaded/$coursedom/$coursenum/$folder.$container"; |
Line 2706 sub handle_edit_cmd {
|
Line 2745 sub handle_edit_cmd {
|
|
|
sub editor { |
sub editor { |
my ($r,$coursenum,$coursedom,$folder,$allowed,$upload_output,$crstype, |
my ($r,$coursenum,$coursedom,$folder,$allowed,$upload_output,$crstype, |
$supplementalflag,$orderhash,$iconpath,$pathitem)=@_; |
$supplementalflag,$orderhash,$iconpath,$pathitem,$canedit,$navmapref, |
|
$hiddentop)=@_; |
my ($randompick,$ishidden,$isencrypted,$plain,$is_random_order,$container); |
my ($randompick,$ishidden,$isencrypted,$plain,$is_random_order,$container); |
if ($allowed) { |
if ($allowed) { |
(my $breadcrumbtrail,$randompick,$ishidden,$isencrypted,$plain, |
(my $breadcrumbtrail,$randompick,$ishidden,$isencrypted,$plain, |
Line 2729 sub editor {
|
Line 2769 sub editor {
|
$randompick = -1; |
$randompick = -1; |
} |
} |
|
|
my ($errtext,$fatal) = &mapread($coursenum,$coursedom, |
my ($errtext,$fatal); |
$folder.'.'.$container); |
if (($folder eq '') && (!$supplementalflag)) { |
return $errtext if ($fatal); |
if (@LONCAPA::map::order) { |
|
undef(@LONCAPA::map::order); |
|
undef(@LONCAPA::map::resources); |
|
undef(@LONCAPA::map::resparms); |
|
undef(@LONCAPA::map::zombies); |
|
} |
|
$folder = 'default'; |
|
$container = 'sequence'; |
|
} else { |
|
($errtext,$fatal) = &mapread($coursenum,$coursedom, |
|
$folder.'.'.$container); |
|
return $errtext if ($fatal); |
|
} |
|
|
if ($#LONCAPA::map::order<1) { |
if ($#LONCAPA::map::order<1) { |
my $idx=&LONCAPA::map::getresidx(); |
my $idx=&LONCAPA::map::getresidx(); |
Line 2743 sub editor {
|
Line 2795 sub editor {
|
# ------------------------------------------------------------ Process commands |
# ------------------------------------------------------------ Process commands |
|
|
# ---------------- if they are for this folder and user allowed to make changes |
# ---------------- if they are for this folder and user allowed to make changes |
if (($allowed) && ($env{'form.folder'} eq $folder)) { |
if (($allowed && $canedit) && ($env{'form.folder'} eq $folder)) { |
# set parameters and change order |
# set parameters and change order |
&snapshotbefore(); |
&snapshotbefore(); |
|
|
Line 3009 sub editor {
|
Line 3061 sub editor {
|
if ($url =~ m{/uploaded/.+\.(page|sequence)$}) { |
if ($url =~ m{/uploaded/.+\.(page|sequence)$}) { |
push(@allmapidx,$res); |
push(@allmapidx,$res); |
} |
} |
|
|
$output .= &entryline($idx,$name,$url,$folder,$allowed,$res, |
$output .= &entryline($idx,$name,$url,$folder,$allowed,$res, |
$coursenum,$coursedom,$crstype, |
$coursenum,$coursedom,$crstype, |
$pathitem,$supplementalflag,$container, |
$pathitem,$supplementalflag,$container, |
\%filters,\%curr_groups); |
\%filters,\%curr_groups,$canedit,$isencrypted,$navmapref); |
$idx++; |
$idx++; |
$shown++; |
$shown++; |
} |
} |
&Apache::loncommon::end_data_table_count(); |
&Apache::loncommon::end_data_table_count(); |
|
|
my $need_save; |
my $need_save; |
if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) { |
if ($allowed || ($supplementalflag && $folder eq 'supplemental')) { |
my $toolslink; |
my $toolslink; |
if ($allowed || &Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
if ($allowed) { |
$toolslink = '<table><tr><td>' |
$toolslink = '<table><tr><td>' |
.&Apache::loncommon::help_open_menu('Navigation Screen', |
.&Apache::loncommon::help_open_menu('Navigation Screen', |
'Navigation_Screen',undef,'RAT') |
'Navigation_Screen',undef,'RAT') |
Line 3068 sub editor {
|
Line 3121 sub editor {
|
&Apache::loncommon::continue_data_table_row(). |
&Apache::loncommon::continue_data_table_row(). |
'<td colspan="2"> </td>'. |
'<td colspan="2"> </td>'. |
'<td>'. |
'<td>'. |
&multiple_check_form('actions',\%lists). |
&multiple_check_form('actions',\%lists,$canedit). |
'</td>'. |
'</td>'. |
'<td> </td>'. |
'<td> </td>'. |
'<td> </td>'. |
'<td> </td>'. |
'<td colspan="4">'. |
'<td colspan="4">'. |
&multiple_check_form('settings',\%lists). |
&multiple_check_form('settings',\%lists,$canedit). |
'</td>'. |
'</td>'. |
&Apache::loncommon::end_data_table_row(); |
&Apache::loncommon::end_data_table_row(); |
$need_save = 1; |
$need_save = 1; |
Line 3094 sub editor {
|
Line 3147 sub editor {
|
if (!$allowed) { |
if (!$allowed) { |
$to_show .= $toolslink; |
$to_show .= $toolslink; |
} |
} |
|
my $noresmsg; |
|
if ($allowed && $hiddentop && !$supplementalflag) { |
|
$noresmsg = &mt('Main Content Hidden'); |
|
} else { |
|
$noresmsg = &mt('Currently empty'); |
|
} |
$to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll') |
$to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll') |
.'<div class="LC_info" id="contentlist">' |
.'<div class="LC_info" id="contentlist">' |
.&mt('Currently empty') |
.$noresmsg |
.'</div>' |
.'</div>' |
.&Apache::loncommon::end_scrollbox(); |
.&Apache::loncommon::end_scrollbox(); |
} |
} |
Line 3120 sub editor {
|
Line 3179 sub editor {
|
if ($allowed) { |
if ($allowed) { |
my $readfile="/uploaded/$coursedom/$coursenum/$folder.$container"; |
my $readfile="/uploaded/$coursedom/$coursenum/$folder.$container"; |
$r->print(&generate_edit_table($tid,$orderhash,$to_show,$iconpath, |
$r->print(&generate_edit_table($tid,$orderhash,$to_show,$iconpath, |
$jumpto,$readfile,$need_save,"$folder.$container")); |
$jumpto,$readfile,$need_save,"$folder.$container",$canedit)); |
&print_paste_buffer($r,$container,$folder,$coursedom,$coursenum); |
if ($canedit) |
|
&print_paste_buffer($r,$container,$folder,$coursedom,$coursenum); |
|
} |
} else { |
} else { |
$r->print($to_show); |
$r->print($to_show); |
} |
} |
Line 3129 sub editor {
|
Line 3190 sub editor {
|
} |
} |
|
|
sub multiple_check_form { |
sub multiple_check_form { |
my ($caller,$listsref) = @_; |
my ($caller,$listsref,$canedit) = @_; |
return unless (ref($listsref) eq 'HASH'); |
return unless (ref($listsref) eq 'HASH'); |
|
my $disabled; |
|
unless ($canedit) { |
|
$disabled = 'disabled="disabled"'; |
|
} |
my $output = |
my $output = |
'<form action="/adm/coursedocs" method="post" name="togglemult'.$caller.'">'. |
'<form action="/adm/coursedocs" method="post" name="togglemult'.$caller.'">'. |
'<span class="LC_nobreak" style="font-size:x-small;font-weight:bold;">'. |
'<span class="LC_nobreak" style="font-size:x-small;font-weight:bold;">'. |
Line 3143 sub multiple_check_form {
|
Line 3208 sub multiple_check_form {
|
'<table><tr>'. |
'<table><tr>'. |
'<td class="LC_docs_entry_parameter">'. |
'<td class="LC_docs_entry_parameter">'. |
'<span class="LC_nobreak"><label>'. |
'<span class="LC_nobreak"><label>'. |
'<input type="checkbox" name="hiddenresourceall" id="hiddenresourceall" onclick="propagateState(this.form,'."'hiddenresource'".')" />'.&mt('Hidden'). |
'<input type="checkbox" name="hiddenresourceall" id="hiddenresourceall" onclick="propagateState(this.form,'."'hiddenresource'".')"'.$disabled.' />'.&mt('Hidden'). |
'</label></span></td>'. |
'</label></span></td>'. |
'<td class="LC_docs_entry_parameter">'. |
'<td class="LC_docs_entry_parameter">'. |
'<span class="LC_nobreak"><label><input type="checkbox" name="randompickall" id="randompickall" onclick="updatePick(this.form,'."'all','check'".');propagateState(this.form,'."'randompick'".');propagateState(this.form,'."'rpicknum'".');" />'.&mt('Randomly Pick').'</label><span id="rpicktextall"></span><input type="hidden" name="rpicknumall" id="rpicknumall" value="" />'. |
'<span class="LC_nobreak"><label><input type="checkbox" name="randompickall" id="randompickall" onclick="updatePick(this.form,'."'all','check'".');propagateState(this.form,'."'randompick'".');propagateState(this.form,'."'rpicknum'".');"'.$disabled.' />'.&mt('Randomly Pick').'</label><span id="rpicktextall"></span><input type="hidden" name="rpicknumall" id="rpicknumall" value="" />'. |
'</span></td>'. |
'</span></td>'. |
'</tr>'."\n". |
'</tr>'."\n". |
'<tr>'. |
'<tr>'. |
'<td class="LC_docs_entry_parameter">'. |
'<td class="LC_docs_entry_parameter">'. |
'<span class="LC_nobreak"><label><input type="checkbox" name="encrypturlall" id="encrypturlall" onclick="propagateState(this.form,'."'encrypturl'".')" />'.&mt('URL hidden').'</label></span></td><td class="LC_docs_entry_parameter"><span class="LC_nobreak"><label><input type="checkbox" name="randomorderall" id="randomorderall" onclick="propagateState(this.form,'."'randomorder'".')" />'.&mt('Random Order'). |
'<span class="LC_nobreak"><label><input type="checkbox" name="encrypturlall" id="encrypturlall" onclick="propagateState(this.form,'."'encrypturl'".')"'.$disabled.' />'.&mt('URL hidden').'</label></span></td><td class="LC_docs_entry_parameter"><span class="LC_nobreak"><label><input type="checkbox" name="randomorderall" id="randomorderall" onclick="propagateState(this.form,'."'randomorder'".')"'.$disabled.' />'.&mt('Random Order'). |
'</label></span>'. |
'</label></span>'. |
'</td></tr></table>'."\n"; |
'</td></tr></table>'."\n"; |
} else { |
} else { |
Line 3159 sub multiple_check_form {
|
Line 3224 sub multiple_check_form {
|
'<table><tr>'. |
'<table><tr>'. |
'<td class="LC_docs_entry_parameter">'. |
'<td class="LC_docs_entry_parameter">'. |
'<span class="LC_nobreak LC_docs_remove">'. |
'<span class="LC_nobreak LC_docs_remove">'. |
'<label><input type="checkbox" name="removeall" id="removeall" onclick="propagateState(this.form,'."'remove'".')" />'.&mt('Remove'). |
'<label><input type="checkbox" name="removeall" id="removeall" onclick="propagateState(this.form,'."'remove'".')"'.$disabled.' />'.&mt('Remove'). |
'</label></span></td>'. |
'</label></span></td>'. |
'<td class="LC_docs_entry_parameter">'. |
'<td class="LC_docs_entry_parameter">'. |
'<span class="LC_nobreak LC_docs_cut">'. |
'<span class="LC_nobreak LC_docs_cut">'. |
'<label><input type="checkbox" name="cut" id="cutall" onclick="propagateState(this.form,'."'cut'".');" />'.&mt('Cut'). |
'<label><input type="checkbox" name="cut" id="cutall" onclick="propagateState(this.form,'."'cut'".');"'.$disabled.' />'.&mt('Cut'). |
'</label></span></td>'."\n". |
'</label></span></td>'."\n". |
'<td class="LC_docs_entry_parameter">'. |
'<td class="LC_docs_entry_parameter">'. |
'<span class="LC_nobreak LC_docs_copy">'. |
'<span class="LC_nobreak LC_docs_copy">'. |
'<label><input type="checkbox" name="copyall" id="copyall" onclick="propagateState(this.form,'."'copy'".')" />'.&mt('Copy'). |
'<label><input type="checkbox" name="copyall" id="copyall" onclick="propagateState(this.form,'."'copy'".')"'.$disabled.' />'.&mt('Copy'). |
'</label></span></td>'. |
'</label></span></td>'. |
'</tr></table>'."\n"; |
'</tr></table>'."\n"; |
} |
} |
Line 3378 sub is_supplemental_title {
|
Line 3443 sub is_supplemental_title {
|
|
|
sub entryline { |
sub entryline { |
my ($index,$title,$url,$folder,$allowed,$residx,$coursenum,$coursedom, |
my ($index,$title,$url,$folder,$allowed,$residx,$coursenum,$coursedom, |
$crstype,$pathitem,$supplementalflag,$container,$filtersref,$currgroups)=@_; |
$crstype,$pathitem,$supplementalflag,$container,$filtersref,$currgroups, |
|
$canedit,$isencrypted,$navmapref)=@_; |
my ($foldertitle,$renametitle,$oldtitle); |
my ($foldertitle,$renametitle,$oldtitle); |
if (&is_supplemental_title($title)) { |
if (&is_supplemental_title($title)) { |
($title,$foldertitle,$renametitle) = &Apache::loncommon::parse_supplemental_title($title); |
($title,$foldertitle,$renametitle) = &Apache::loncommon::parse_supplemental_title($title); |
Line 3388 sub entryline {
|
Line 3454 sub entryline {
|
$foldertitle=$title; |
$foldertitle=$title; |
} |
} |
|
|
|
my ($disabled,$readonly,$js_lt); |
|
unless ($canedit) { |
|
$disabled = 'disabled="disabled"'; |
|
$readonly = 1; |
|
} |
|
|
my $orderidx=$LONCAPA::map::order[$index]; |
my $orderidx=$LONCAPA::map::order[$index]; |
|
|
$renametitle=~s/\\/\\\\/g; |
$renametitle=~s/\\/\\\\/g; |
Line 3451 END
|
Line 3523 END
|
ne '')) { |
ne '')) { |
$selectbox= |
$selectbox= |
'<input type="hidden" name="currentpos" value="'.$incindex.'" />'. |
'<input type="hidden" name="currentpos" value="'.$incindex.'" />'. |
'<select name="newpos" onchange="this.form.submit()">'; |
'<select name="newpos" onchange="this.form.submit()"'.$disabled.'>'; |
for (my $i=1;$i<=$#LONCAPA::map::order+1;$i++) { |
for (my $i=1;$i<=$#LONCAPA::map::order+1;$i++) { |
if ($i==$incindex) { |
if ($i==$incindex) { |
$selectbox.='<option value="" selected="selected">('.$i.')</option>'; |
$selectbox.='<option value="" selected="selected">('.$i.')</option>'; |
Line 3473 END
|
Line 3545 END
|
'pr' => 'Preview', |
'pr' => 'Preview', |
'sv' => 'Save', |
'sv' => 'Save', |
'ul' => 'URL', |
'ul' => 'URL', |
'ti' => 'Title', |
'ti' => 'Title', |
|
'er' => 'Editing rights unavailable for your current role.', |
); |
); |
my %denied = &action_restrictions($coursenum,$coursedom,$url, |
my %denied = &action_restrictions($coursenum,$coursedom,$url, |
$env{'form.folderpath'}, |
$env{'form.folderpath'}, |
Line 3506 ENDCOPY
|
Line 3579 ENDCOPY
|
$copylink=(<<ENDCOPY); |
$copylink=(<<ENDCOPY); |
<form name="$formname" method="post" action="/adm/coursedocs"> |
<form name="$formname" method="post" action="/adm/coursedocs"> |
$form_common |
$form_common |
<input type="checkbox" name="copy" id="copy_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','copy');" class="LC_hidden" /><a href="$js" class="LC_docs_copy">$lt{'cp'}</a> |
<input type="checkbox" name="copy" id="copy_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','copy');" class="LC_hidden" $disabled /><a href="$js" class="LC_docs_copy">$lt{'cp'}</a> |
$form_end |
$form_end |
ENDCOPY |
ENDCOPY |
if (($ishash) && (ref($filtersref->{'cancopy'}) eq 'ARRAY')) { |
if (($ishash) && (ref($filtersref->{'cancopy'}) eq 'ARRAY')) { |
Line 3524 ENDCUT
|
Line 3597 ENDCUT
|
<form name="$formname" method="post" action="/adm/coursedocs"> |
<form name="$formname" method="post" action="/adm/coursedocs"> |
$form_common |
$form_common |
<input type="hidden" name="skip_$orderidx" id="skip_cut_$orderidx" value="$skip_confirm" /> |
<input type="hidden" name="skip_$orderidx" id="skip_cut_$orderidx" value="$skip_confirm" /> |
<input type="checkbox" name="cut" id="cut_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','cut');" class="LC_hidden" /><a href="$js" class="LC_docs_cut">$lt{'ct'}</a> |
<input type="checkbox" name="cut" id="cut_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','cut');" class="LC_hidden" $disabled /><a href="$js" class="LC_docs_cut">$lt{'ct'}</a> |
$form_end |
$form_end |
ENDCUT |
ENDCUT |
if (($ishash) && (ref($filtersref->{'cancut'}) eq 'ARRAY')) { |
if (($ishash) && (ref($filtersref->{'cancut'}) eq 'ARRAY')) { |
Line 3543 ENDREM
|
Line 3616 ENDREM
|
$form_common |
$form_common |
<input type="hidden" name="skip_$orderidx" id="skip_remove_$orderidx" value="$skip_confirm" /> |
<input type="hidden" name="skip_$orderidx" id="skip_remove_$orderidx" value="$skip_confirm" /> |
<input type="hidden" name="confirm_rem_$orderidx" id="confirm_removal_$orderidx" value="$confirm_removal" /> |
<input type="hidden" name="confirm_rem_$orderidx" id="confirm_removal_$orderidx" value="$confirm_removal" /> |
<input type="checkbox" name="remove" id="remove_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','remove');" class="LC_hidden" /><a href="$js" class="LC_docs_remove">$lt{'rm'}</a> |
<input type="checkbox" name="remove" id="remove_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','remove');" class="LC_hidden" $disabled /><a href="$js" class="LC_docs_remove">$lt{'rm'}</a> |
$form_end |
$form_end |
ENDREM |
ENDREM |
if (($ishash) && (ref($filtersref->{'canremove'}) eq 'ARRAY')) { |
if (($ishash) && (ref($filtersref->{'canremove'}) eq 'ARRAY')) { |
Line 3553 ENDREM
|
Line 3626 ENDREM
|
$renamelink=(<<ENDREN); |
$renamelink=(<<ENDREN); |
<a href='javascript:changename("$esc_path","$index","$oldtitle");' class="LC_docs_rename">$lt{'rn'}</a> |
<a href='javascript:changename("$esc_path","$index","$oldtitle");' class="LC_docs_rename">$lt{'rn'}</a> |
ENDREN |
ENDREN |
|
my ($uplink,$downlink); |
|
if ($canedit) { |
|
$uplink = "/adm/coursedocs?cmd=up_$index&folderpath=$esc_path&symb=$symb"; |
|
$downlink = "/adm/coursedocs?cmd=down_$index&folderpath=$esc_path&symb=$symb"; |
|
} else { |
|
$uplink = "javascript:alert('".&js_escape($lt{'er'})."');"; |
|
$downlink = $uplink; |
|
} |
$line.=(<<END); |
$line.=(<<END); |
<td> |
<td> |
<div class="LC_docs_entry_move"> |
<div class="LC_docs_entry_move"> |
<a href='/adm/coursedocs?cmd=up_$index&folderpath=$esc_path&symb=$symb'> |
<a href="$uplink"> |
<img src="${iconpath}move_up.gif" alt="$lt{'up'}" class="LC_icon" /> |
<img src="${iconpath}move_up.gif" alt="$lt{'up'}" class="LC_icon" /> |
</a> |
</a> |
</div> |
</div> |
<div class="LC_docs_entry_move"> |
<div class="LC_docs_entry_move"> |
<a href='/adm/coursedocs?cmd=down_$index&folderpath=$esc_path&symb=$symb'> |
<a href="$downlink"> |
<img src="${iconpath}move_down.gif" alt="$lt{'dw'}" class="LC_icon" /> |
<img src="${iconpath}move_down.gif" alt="$lt{'dw'}" class="LC_icon" /> |
</a> |
</a> |
</div> |
</div> |
Line 3587 END
|
Line 3668 END
|
my $isfolder; |
my $isfolder; |
my $ispage; |
my $ispage; |
my $containerarg; |
my $containerarg; |
|
my $folderurl; |
if ($uploaded) { |
if ($uploaded) { |
if (($extension eq 'sequence') || ($extension eq 'page')) { |
if (($extension eq 'sequence') || ($extension eq 'page')) { |
$url=~/\Q$coursenum\E\/([\/\w]+)\.\Q$extension\E$/; |
$url=~/\Q$coursenum\E\/([\/\w]+)\.\Q$extension\E$/; |
Line 3598 END
|
Line 3680 END
|
$icon=$iconpath.'page.gif'; |
$icon=$iconpath.'page.gif'; |
$ispage=1; |
$ispage=1; |
} |
} |
|
$folderurl = &Apache::lonnet::declutter($url); |
if ($allowed) { |
if ($allowed) { |
$url='/adm/coursedocs?'; |
$url='/adm/coursedocs?'; |
} else { |
} else { |
Line 3608 END
|
Line 3691 END
|
} |
} |
} |
} |
|
|
my ($editlink,$extresform,$anchor); |
my ($editlink,$extresform,$anchor,$hiddenres); |
my $orig_url = $url; |
my $orig_url = $url; |
$orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; |
$orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; |
$url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}; |
$url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}; |
Line 3640 END
|
Line 3723 END
|
} |
} |
} |
} |
} |
} |
$url.=(($url=~/\?/)?'&':'?').'symb='.&HTML::Entities::encode($shownsymb,'"<>&'); |
unless ($env{'request.role.adv'}) { |
|
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) { |
|
$url = ''; |
|
} |
|
if (&Apache::lonnet::EXT('resource.0.hiddenresource',$symb) =~ /^yes$/i) { |
|
$url = ''; |
|
$hiddenres = 1; |
|
} |
|
} |
|
if ($url ne '') { |
|
$url.=(($url=~/\?/)?'&':'?').'symb='.&HTML::Entities::encode($shownsymb,'"<>&'); |
|
} |
|
} elsif (!$env{'request.role.adv'}) { |
|
my $checkencrypt; |
|
if (((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i) || |
|
$isencrypted || (&Apache::lonnet::EXT('resource.0.encrypturl',$symb) =~ /^yes$/i)) { |
|
$checkencrypt = 1; |
|
} else { |
|
unless (ref($$navmapref)) { |
|
$$navmapref = Apache::lonnavmaps::navmap->new(); |
|
} |
|
if (ref($$navmapref)) { |
|
if (lc($$navmapref->get_mapparam($symb,undef,"0.encrypturl")) eq 'yes') { |
|
$checkencrypt = 1; |
|
} |
|
} |
|
} |
|
if ($checkencrypt) { |
|
my $shownsymb = &Apache::lonenc::encrypted($symb); |
|
my $shownurl = &Apache::lonenc::encrypted($url); |
|
if (&Apache::lonnet::symbverify($shownsymb,$shownurl)) { |
|
$url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&HTML::Entities::encode($shownsymb,'"<>&'); |
|
if ($env{'request.enc'} ne '') { |
|
delete($env{'request.enc'}); |
|
} |
|
} else { |
|
$url=''; |
|
} |
|
} else { |
|
$url=''; |
|
} |
} else { |
} else { |
$url=''; |
$url=''; |
} |
} |
Line 3653 END
|
Line 3776 END
|
} |
} |
} |
} |
} |
} |
my ($rand_pick_text,$rand_order_text); |
my ($rand_pick_text,$rand_order_text,$hiddenfolder); |
|
my $filterFunc = sub { my $res = shift; return (!$res->randomout() && !$res->is_map()) }; |
if ($isfolder || $ispage || $extension eq 'sequence' || $extension eq 'page') { |
if ($isfolder || $ispage || $extension eq 'sequence' || $extension eq 'page') { |
my $foldername=&escape($foldertitle); |
my $foldername=&escape($foldertitle); |
my $folderpath=$env{'form.folderpath'}; |
my $folderpath=$env{'form.folderpath'}; |
Line 3662 END
|
Line 3786 END
|
$folderpath.=$containerarg.'&'.$foldername; |
$folderpath.=$containerarg.'&'.$foldername; |
$url.='folderpath='.&escape($folderpath); |
$url.='folderpath='.&escape($folderpath); |
} else { |
} else { |
# Append randompick number, hidden, and encrypted with ":" to foldername, |
|
# so it gets transferred between levels |
|
$folderpath.=$containerarg.'&'.$foldername. |
|
':'.(&LONCAPA::map::getparameter($orderidx, |
|
'parameter_randompick'))[0] |
|
.':'.((&LONCAPA::map::getparameter($orderidx, |
|
'parameter_hiddenresource'))[0]=~/^yes$/i) |
|
.':'.((&LONCAPA::map::getparameter($orderidx, |
|
'parameter_encrypturl'))[0]=~/^yes$/i) |
|
.':'.((&LONCAPA::map::getparameter($orderidx, |
|
'parameter_randomorder'))[0]=~/^yes$/i) |
|
.':'.$ispage; |
|
$url.='folderpath='.&escape($folderpath); |
|
my $rpicknum = (&LONCAPA::map::getparameter($orderidx, |
my $rpicknum = (&LONCAPA::map::getparameter($orderidx, |
'parameter_randompick'))[0]; |
'parameter_randompick'))[0]; |
|
my $randorder = ((&LONCAPA::map::getparameter($orderidx, |
|
'parameter_randomorder'))[0]=~/^yes$/i); |
|
my $hiddenmap = ((&LONCAPA::map::getparameter($orderidx, |
|
'parameter_hiddenresource'))[0]=~/^yes$/i); |
|
my $encryptmap = ((&LONCAPA::map::getparameter($orderidx, |
|
'parameter_encrypturl'))[0]=~/^yes$/i); |
|
unless ($hiddenmap) { |
|
unless (ref($$navmapref)) { |
|
$$navmapref = Apache::lonnavmaps::navmap->new(); |
|
} |
|
if (ref($$navmapref)) { |
|
if (lc($$navmapref->get_mapparam(undef,$folderurl,"0.hiddenresource")) eq 'yes') { |
|
my @resources = $$navmapref->retrieveResources($folderurl,$filterFunc,1,1); |
|
unless (@resources) { |
|
$hiddenmap = 1; |
|
unless ($env{'request.role.adv'}) { |
|
$url = ''; |
|
$hiddenfolder = 1; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
unless ($encryptmap) { |
|
if (lc($$navmapref->get_mapparam(undef,$folderurl,"0.encrypturl")) eq 'yes') { |
|
$encryptmap = 1; |
|
} |
|
} |
|
|
|
# Append randompick number, hidden, and encrypted with ":" to foldername, |
|
# so it gets transferred between levels |
|
$folderpath.=$containerarg.'&'.$foldername. |
|
':'.$rpicknum.':'.$hiddenmap.':'.$encryptmap.':'.$randorder.':'.$ispage; |
|
unless ($url eq '') { |
|
$url.='folderpath='.&escape($folderpath); |
|
} |
my $rpckchk; |
my $rpckchk; |
if ($rpicknum) { |
if ($rpicknum) { |
$rpckchk = ' checked="checked"'; |
$rpckchk = ' checked="checked"'; |
Line 3689 END
|
Line 3836 END
|
'<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n". |
'<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n". |
$form_param."\n". |
$form_param."\n". |
$form_common."\n". |
$form_common."\n". |
'<span class="LC_nobreak"><label><input type="checkbox" name="randompick_'.$orderidx.'" id="randompick_'.$orderidx.'" onclick="'."updatePick(this.form,'$orderidx','check');".'"'.$rpckchk.' /> '.&mt('Randomly Pick').'</label><input type="hidden" name="rpicknum_'.$orderidx.'" id="rpicknum_'.$orderidx.'" value="'.$rpicknum.'" /><span id="randompicknum_'.$orderidx.'">'; |
'<span class="LC_nobreak"><label><input type="checkbox" name="randompick_'.$orderidx.'" id="randompick_'.$orderidx.'" onclick="'."updatePick(this.form,'$orderidx','check');".'"'.$rpckchk.$disabled.' /> '.&mt('Randomly Pick').'</label><input type="hidden" name="rpicknum_'.$orderidx.'" id="rpicknum_'.$orderidx.'" value="'.$rpicknum.'" /><span id="randompicknum_'.$orderidx.'">'; |
if ($rpicknum ne '') { |
if ($rpicknum ne '') { |
$rand_pick_text .= ': <a href="javascript:updatePick('."document.$formname,'$orderidx','link'".')">'.$rpicknum.'</a>'; |
$rand_pick_text .= ': <a href="javascript:updatePick('."document.$formname,'$orderidx','link'".')">'.$rpicknum.'</a>'; |
} |
} |
$rand_pick_text .= '</span></span>'. |
$rand_pick_text .= '</span></span>'. |
$form_end; |
$form_end; |
my $ro_set; |
my $ro_set; |
if ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i) { |
if ($randorder) { |
$ro_set = 'checked="checked"'; |
$ro_set = 'checked="checked"'; |
if (($ishash) && (ref($filtersref->{'randomorder'}) eq 'ARRAY')) { |
if (($ishash) && (ref($filtersref->{'randomorder'}) eq 'ARRAY')) { |
push(@{$filtersref->{'randomorder'}},$orderidx); |
push(@{$filtersref->{'randomorder'}},$orderidx); |
Line 3707 $form_common."\n".
|
Line 3854 $form_common."\n".
|
'<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n". |
'<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n". |
$form_param."\n". |
$form_param."\n". |
$form_common."\n". |
$form_common."\n". |
'<span class="LC_nobreak"><label><input type="checkbox" name="randomorder_'.$orderidx.'" id="randomorder_'.$orderidx.'" onclick="checkForSubmit(this.form,'."'randomorder','settings'".');" '.$ro_set.' /> '.&mt('Random Order').' </label></span>'. |
'<span class="LC_nobreak"><label><input type="checkbox" name="randomorder_'.$orderidx.'" id="randomorder_'.$orderidx.'" onclick="checkForSubmit(this.form,'."'randomorder','settings'".');" '.$ro_set.$disabled.' /> '.&mt('Random Order').' </label></span>'. |
$form_end; |
$form_end; |
} |
} |
} elsif ($supplementalflag && !$allowed) { |
} elsif ($supplementalflag && !$allowed) { |
Line 3729 $form_end;
|
Line 3876 $form_end;
|
&Apache::lonnet::declutter(&Apache::lonnet::filelocation('',$orig_url)); |
&Apache::lonnet::declutter(&Apache::lonnet::filelocation('',$orig_url)); |
if ($isexternal) { |
if ($isexternal) { |
($editlink,$extresform) = |
($editlink,$extresform) = |
&Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem); |
&Apache::lonextresedit::extedit_form(0,$residx,$orig_url,$title,$pathitem, |
|
undef,undef,undef,$disabled); |
} elsif (!$isfolder && !$ispage) { |
} elsif (!$isfolder && !$ispage) { |
my ($cfile,$home,$switchserver,$forceedit,$forceview) = |
my ($cfile,$home,$switchserver,$forceedit,$forceview) = |
&Apache::lonnet::can_edit_resource($fileloc,$coursenum,$coursedom,$orig_url); |
&Apache::lonnet::can_edit_resource($fileloc,$coursenum,$coursedom,$orig_url); |
Line 3771 $form_end;
|
Line 3919 $form_end;
|
$anchor = '#'.&HTML::Entities::encode($anchor,'"<>&'); |
$anchor = '#'.&HTML::Entities::encode($anchor,'"<>&'); |
} |
} |
} |
} |
$line.=&Apache::loncommon::modal_link($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
$line.=&Apache::loncommon::modal_link(&js_escape($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
(($anchor ne '')?$anchor:''), |
(($anchor ne '')?$anchor:'')), |
'<img src="'.$icon.'" alt="" class="LC_icon" />',600,500); |
'<img src="'.$icon.'" alt="" class="LC_icon" />',600,500); |
} else { |
} else { |
$line.='<img src="'.$icon.'" alt="" class="LC_icon" />'; |
$line.='<img src="'.$icon.'" alt="" class="LC_icon" />'; |
Line 3781 $form_end;
|
Line 3929 $form_end;
|
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { |
if (($url=~m{/adm/(coursedocs|supplemental)}) || (!$allowed && $url)) { |
$line.='<a href="'.$url.'">'.$title.'</a>'; |
$line.='<a href="'.$url.'">'.$title.'</a>'; |
} elsif ($url) { |
} elsif ($url) { |
$line.=&Apache::loncommon::modal_link($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
$line.=&Apache::loncommon::modal_link(&js_escape($url.(($url=~/\?/)?'&':'?').'inhibitmenu=yes'. |
(($anchor ne '')?$anchor:''), |
(($anchor ne '')?$anchor:'')), |
$title,600,500); |
$title,600,500); |
|
} elsif (($hiddenfolder) || ($hiddenres)) { |
|
$line.=$title.' <span class="LC_warning LC_docs_reinit_warn">'.&mt('(Hidden)').'</span>'; |
} else { |
} else { |
$line.=$title.' <span class="LC_docs_reinit_warn">'.$reinit.'</span>'; |
$line.=$title.' <span class="LC_docs_reinit_warn">'.$reinit.'</span>'; |
} |
} |
Line 3814 $form_end;
|
Line 3964 $form_end;
|
<form action="/adm/coursedocs" method="post" name="$formhidden"> |
<form action="/adm/coursedocs" method="post" name="$formhidden"> |
$form_param |
$form_param |
$form_common |
$form_common |
<label><input type="checkbox" name="hiddenresource_$orderidx" id="hiddenresource_$orderidx" onclick="checkForSubmit(this.form,'hiddenresource','settings');" $hidtext /> $lt{'hd'}</label> |
<label><input type="checkbox" name="hiddenresource_$orderidx" id="hiddenresource_$orderidx" onclick="checkForSubmit(this.form,'hiddenresource','settings');" $hidtext $disabled /> $lt{'hd'}</label> |
$form_end |
$form_end |
<br /> |
<br /> |
<form action="/adm/coursedocs" method="post" name="$formurlhidden"> |
<form action="/adm/coursedocs" method="post" name="$formurlhidden"> |
$form_param |
$form_param |
$form_common |
$form_common |
<label><input type="checkbox" name="encrypturl_$orderidx" id="encrypturl_$orderidx" onclick="checkForSubmit(this.form,'encrypturl','settings');" $enctext /> $lt{'ec'}</label> |
<label><input type="checkbox" name="encrypturl_$orderidx" id="encrypturl_$orderidx" onclick="checkForSubmit(this.form,'encrypturl','settings');" $enctext $disabled /> $lt{'ec'}</label> |
$form_end |
$form_end |
</td> |
</td> |
<td class="LC_docs_entry_parameter">$rand_pick_text<br /> |
<td class="LC_docs_entry_parameter">$rand_pick_text<br /> |
Line 4155 sub devalidateversioncache {
|
Line 4305 sub devalidateversioncache {
|
} |
} |
|
|
sub checkversions { |
sub checkversions { |
my ($r) = @_; |
my ($r,$canedit) = @_; |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
$r->print(&Apache::loncommon::start_page("Check $crstype Resource Versions")); |
$r->print(&Apache::loncommon::start_page("Check $crstype Resource Versions")); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Resource Versions")); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs("Check $crstype Resource Versions")); |
Line 4176 sub checkversions {
|
Line 4326 sub checkversions {
|
|
|
$hashtied=0; |
$hashtied=0; |
&tiehash(); |
&tiehash(); |
my %newsetversions=(); |
if ($canedit) { |
if ($env{'form.setmostrecent'}) { |
my %newsetversions=(); |
$haschanged=1; |
if ($env{'form.setmostrecent'}) { |
foreach my $key (keys(%hash)) { |
$haschanged=1; |
if ($key=~/^ids\_(\/res\/.+)$/) { |
foreach my $key (keys(%hash)) { |
$newsetversions{$1}='mostrecent'; |
if ($key=~/^ids\_(\/res\/.+)$/) { |
&devalidateversioncache($1); |
$newsetversions{$1}='mostrecent'; |
|
&devalidateversioncache($1); |
|
} |
} |
} |
} |
} elsif ($env{'form.setcurrent'}) { |
} elsif ($env{'form.setcurrent'}) { |
$haschanged=1; |
$haschanged=1; |
foreach my $key (keys(%hash)) { |
foreach my $key (keys(%hash)) { |
if ($key=~/^ids\_(\/res\/.+)$/) { |
if ($key=~/^ids\_(\/res\/.+)$/) { |
my $getvers=&Apache::lonnet::getversion($1); |
my $getvers=&Apache::lonnet::getversion($1); |
if ($getvers>0) { |
if ($getvers>0) { |
$newsetversions{$1}=$getvers; |
$newsetversions{$1}=$getvers; |
&devalidateversioncache($1); |
&devalidateversioncache($1); |
} |
} |
} |
} |
} |
} |
} elsif ($env{'form.setversions'}) { |
} elsif ($env{'form.setversions'}) { |
$haschanged=1; |
$haschanged=1; |
foreach my $key (keys(%env)) { |
foreach my $key (keys(%env)) { |
if ($key=~/^form\.set_version_(.+)$/) { |
if ($key=~/^form\.set_version_(.+)$/) { |
my $src=$1; |
my $src=$1; |
if (($env{$key}) && ($env{$key} ne $setversions{$src})) { |
if (($env{$key}) && ($env{$key} ne $setversions{$src})) { |
$newsetversions{$src}=$env{$key}; |
$newsetversions{$src}=$env{$key}; |
&devalidateversioncache($src); |
&devalidateversioncache($src); |
} |
} |
} |
} |
} |
} |
} |
} |
if ($haschanged) { |
if ($haschanged) { |
if (&Apache::lonnet::put('resourceversions',\%newsetversions, |
if (&Apache::lonnet::put('resourceversions',\%newsetversions, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.domain'}, |
$env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') { |
$env{'course.'.$env{'request.course.id'}.'.num'}) eq 'ok') { |
$r->print(&Apache::loncommon::confirmwrapper( |
$r->print(&Apache::loncommon::confirmwrapper( |
&Apache::lonhtmlcommon::confirm_success(&mt('Your Version Settings have been Saved')))); |
&Apache::lonhtmlcommon::confirm_success(&mt('Your Version Settings have been Saved')))); |
} else { |
} else { |
$r->print(&Apache::loncommon::confirmwrapper( |
$r->print(&Apache::loncommon::confirmwrapper( |
&Apache::lonhtmlcommon::confirm_success(&mt('An Error Occured while Attempting to Save your Version Settings'),1))); |
&Apache::lonhtmlcommon::confirm_success(&mt('An Error Occured while Attempting to Save your Version Settings'),1))); |
} |
} |
&mark_hash_old(); |
&mark_hash_old(); |
} |
|
&changewarning($r,''); |
} |
} |
&changewarning($r,''); |
|
if ($env{'form.timerange'} eq 'all') { |
if ($env{'form.timerange'} eq 'all') { |
# show all documents |
# show all documents |
$header=&mt('All content in '.$crstype); |
$header=&mt('All content in '.$crstype); |
Line 4287 sub checkversions {
|
Line 4439 sub checkversions {
|
'save' => 'Save changes', |
'save' => 'Save changes', |
'vers' => 'Version choice(s) for specific resources', |
'vers' => 'Version choice(s) for specific resources', |
'act' => 'Actions'); |
'act' => 'Actions'); |
|
my ($disabled,$readonly); |
|
unless ($canedit) { |
|
$disabled = 'disabled="disabled"'; |
|
$readonly = 1; |
|
} |
$r->print(<<ENDHEADERS); |
$r->print(<<ENDHEADERS); |
<h4 class="LC_info">$header</h4> |
<h4 class="LC_info">$header</h4> |
<form action="/adm/coursedocs" method="post"> |
<form action="/adm/coursedocs" method="post"> |
Line 4307 sub checkversions {
|
Line 4464 sub checkversions {
|
<div class="LC_left_float"> |
<div class="LC_left_float"> |
<fieldset> |
<fieldset> |
<legend>$lt{'act'}</legend> |
<legend>$lt{'act'}</legend> |
$lt{'sm'}: <input type="submit" name="setmostrecent" value="Go" /><br /> |
$lt{'sm'}: <input type="submit" name="setmostrecent" value="Go" $disabled /><br /> |
$lt{'sc'}: <input type="submit" name="setcurrent" value="Go" /> |
$lt{'sc'}: <input type="submit" name="setcurrent" value="Go" $disabled /> |
</fieldset> |
</fieldset> |
</div> |
</div> |
<br clear="all" /> |
<br clear="all" /> |
Line 4337 ENDHEADERS
|
Line 4494 ENDHEADERS
|
return; |
return; |
} |
} |
$r->print( |
$r->print( |
'<input type="submit" name="setversions" value="'.$lt{'save'}.'" />'. |
'<input type="submit" name="setversions" value="'.$lt{'save'}.'"'.$disabled.' />'. |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table(). |
&Apache::loncommon::start_data_table_header_row(). |
&Apache::loncommon::start_data_table_header_row(). |
'<th>'.&mt('Resources').'</th>'. |
'<th>'.&mt('Resources').'</th>'. |
Line 4382 ENDHEADERS
|
Line 4539 ENDHEADERS
|
{'select_form_order' => ['',1..$currentversion,'mostrecent'], |
{'select_form_order' => ['',1..$currentversion,'mostrecent'], |
'' => '', |
'' => '', |
'mostrecent' => &mt('most recent'), |
'mostrecent' => &mt('most recent'), |
map {$_,$_} (1..$currentversion)})); |
map {$_,$_} (1..$currentversion)},'',$readonly)); |
my $lastold=1; |
my $lastold=1; |
for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) { |
for (my $prevvers=1;$prevvers<$currentversion;$prevvers++) { |
my $url=$root.'.'.$prevvers.'.'.$extension; |
my $url=$root.'.'.$prevvers.'.'.$extension; |
Line 4416 ENDHEADERS
|
Line 4573 ENDHEADERS
|
} |
} |
$r->print( |
$r->print( |
&Apache::loncommon::end_data_table(). |
&Apache::loncommon::end_data_table(). |
'<input type="submit" name="setversions" value="'.$lt{'save'}.'" />'. |
'<input type="submit" name="setversions" value="'.$lt{'save'}.'"'.$disabled.' />'. |
'</form>' |
'</form>' |
); |
); |
|
|
Line 4582 sub handler {
|
Line 4739 sub handler {
|
$help{'Group Portfolio'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files'); |
$help{'Group Portfolio'} = &Apache::loncommon::help_open_topic('Docs_About_Group_Files'); |
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching'); |
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching'); |
|
|
my $allowed; |
my ($allowed,$canedit,$canview,$disabled); |
# URI is /adm/supplemental when viewing supplemental docs in non-edit mode. |
# URI is /adm/supplemental when viewing supplemental docs in non-edit mode. |
unless ($r->uri eq '/adm/supplemental') { |
unless ($r->uri eq '/adm/supplemental') { |
# does this user have privileges to modify content. |
# does this user have privileges to modify content. |
$allowed = &Apache::lonnet::allowed('mdc',$env{'request.course.id'}); |
if (&Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
|
$allowed = 1; |
|
$canedit = 1; |
|
$canview = 1; |
|
} elsif (&Apache::lonnet::allowed('cev',$env{'request.course.id'})) { |
|
$allowed = 1; |
|
$canview = 1; |
|
} |
|
} |
|
unless ($canedit) { |
|
$disabled = ' disabled="disabled"'; |
} |
} |
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); |
if ($allowed && $env{'form.verify'}) { |
if ($allowed && $env{'form.verify'}) { |
&init_breadcrumbs('verify','Verify Content','Docs_Verify_Content'); |
&init_breadcrumbs('verify','Verify Content','Docs_Verify_Content'); |
Line 4602 sub handler {
|
Line 4768 sub handler {
|
if ($folder eq '') { |
if ($folder eq '') { |
$folder='default'; |
$folder='default'; |
} |
} |
&docs_change_log($r,$coursenum,$coursedom,$folder,$allowed,$crstype,$iconpath); |
&docs_change_log($r,$coursenum,$coursedom,$folder,$allowed,$crstype,$iconpath,$canedit); |
} elsif ($allowed && $env{'form.versions'}) { |
} elsif ($allowed && $env{'form.versions'}) { |
&init_breadcrumbs('versions','Check/Set Resource Versions','Docs_Check_Resource_Versions'); |
&init_breadcrumbs('versions','Check/Set Resource Versions','Docs_Check_Resource_Versions'); |
&checkversions($r); |
&checkversions($r,$canedit); |
} elsif ($allowed && $env{'form.dumpcourse'}) { |
} elsif ($canedit && $env{'form.dumpcourse'}) { |
&init_breadcrumbs('dumpcourse','Copy '.&Apache::loncommon::course_type().' Content to Authoring Space'); |
&init_breadcrumbs('dumpcourse','Copy '.&Apache::loncommon::course_type().' Content to Authoring Space'); |
&dumpcourse($r); |
&dumpcourse($r); |
} elsif ($allowed && $env{'form.exportcourse'}) { |
} elsif ($allowed && $env{'form.exportcourse'}) { |
Line 4651 sub handler {
|
Line 4817 sub handler {
|
my $container; |
my $container; |
my $containertag; |
my $containertag; |
my $pathitem; |
my $pathitem; |
|
my $hiddentop; |
|
my $navmap; |
|
my $filterFunc = sub { my $res = shift; return (!$res->randomout() && !$res->is_map()) }; |
|
|
# Do we directly jump somewhere? |
# Do we directly jump somewhere? |
|
|
if (($env{'form.command'} eq 'direct') || ($env{'form.command'} eq 'directnav')) { |
if (($env{'form.command'} eq 'direct') || ($env{'form.command'} eq 'directnav')) { |
if ($env{'form.symb'} ne '') { |
if ($env{'form.symb'} ne '') { |
$env{'form.folderpath'}= |
$env{'form.folderpath'}= |
&Apache::loncommon::symb_to_docspath($env{'form.symb'}); |
&Apache::loncommon::symb_to_docspath($env{'form.symb'},\$navmap); |
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => |
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => |
$env{'form.command'}.'_'.$env{'form.symb'}}); |
$env{'form.command'}.'_'.$env{'form.symb'}}); |
} elsif ($env{'form.supppath'} ne '') { |
} elsif ($env{'form.supppath'} ne '') { |
Line 4666 sub handler {
|
Line 4834 sub handler {
|
$env{'form.command'}.'_'.$env{'form.supppath'}}); |
$env{'form.command'}.'_'.$env{'form.supppath'}}); |
} |
} |
} elsif ($env{'form.command'} eq 'editdocs') { |
} elsif ($env{'form.command'} eq 'editdocs') { |
$env{'form.folderpath'} = 'default&'. |
$env{'form.folderpath'} = &default_folderpath($coursenum,$coursedom,\$navmap); |
&escape(&mt('Main Content').':::::'); |
|
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}}); |
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}}); |
} elsif ($env{'form.command'} eq 'editsupp') { |
} elsif ($env{'form.command'} eq 'editsupp') { |
$env{'form.folderpath'} = 'supplemental&'. |
$env{'form.folderpath'} = &supplemental_base(); |
&escape('Supplemental Content'); |
|
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => '/adm/supplemental'}); |
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => '/adm/supplemental'}); |
} elsif ($env{'form.command'} eq 'contents') { |
} elsif ($env{'form.command'} eq 'contents') { |
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => '/adm/navmaps'}); |
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => '/adm/navmaps'}); |
Line 4690 sub handler {
|
Line 4856 sub handler {
|
if ((!$env{'form.folderpath'}) && $allowed) { |
if ((!$env{'form.folderpath'}) && $allowed) { |
&Apache::loncommon::restore_course_settings($stored_folderpath, |
&Apache::loncommon::restore_course_settings($stored_folderpath, |
{'folderpath' => 'scalar'}); |
{'folderpath' => 'scalar'}); |
unless (&unescape($env{'form.folderpath'}) =~ m{^(default|supplemental)&}) { |
|
|
if (&unescape($env{'form.folderpath'}) =~ m{^(default|supplemental)&}) { |
|
if ($supplementalflag) { |
|
undef($env{'form.folderpath'}) if ($1 eq 'default'); |
|
} else { |
|
undef($env{'form.folderpath'}) if ($1 eq 'supplemental'); |
|
} |
|
} else { |
undef($env{'form.folderpath'}); |
undef($env{'form.folderpath'}); |
} |
} |
} |
} |
Line 4707 sub handler {
|
Line 4880 sub handler {
|
.'&'. |
.'&'. |
$env{'form.folderpath'}; |
$env{'form.folderpath'}; |
} |
} |
|
# If allowed and user's role is not advanced check folderpath is not hidden |
|
if (($allowed) && (!$env{'request.role.adv'}) && |
|
($env{'form.folderpath'} ne '') && (!$supplementalflag)) { |
|
my $folderurl; |
|
my @pathitems = split(/\&/,$env{'form.folderpath'}); |
|
my $folder = $pathitems[-2]; |
|
if ($folder eq '') { |
|
undef($env{'form.folderpath'}); |
|
} else { |
|
$folderurl = "uploaded/$coursedom/$coursenum/$folder"; |
|
if ((split(/\:/,$pathitems[-1]))[4]) { |
|
$folderurl .= '.page'; |
|
} else { |
|
$folderurl .= '.sequence'; |
|
} |
|
unless (ref($navmap)) { |
|
$navmap = Apache::lonnavmaps::navmap->new(); |
|
} |
|
if (ref($navmap)) { |
|
if (lc($navmap->get_mapparam(undef,$folderurl,"0.hiddenresource")) eq 'yes') { |
|
my @resources = $navmap->retrieveResources($folderurl,$filterFunc,1,1); |
|
unless (@resources) { |
|
undef($env{'form.folderpath'}); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
|
# If after all of this, we still don't have any paths, make them |
# If after all of this, we still don't have any paths, make them |
unless ($env{'form.folderpath'}) { |
unless ($env{'form.folderpath'}) { |
if ($supplementalflag) { |
if ($supplementalflag) { |
$env{'form.folderpath'}=&supplemental_base(); |
$env{'form.folderpath'}=&supplemental_base(); |
} else { |
} elsif ($allowed) { |
$env{'form.folderpath'}='default&'.&escape(&mt('Main Content'). |
($env{'form.folderpath'},$hiddentop) = &default_folderpath($coursenum,$coursedom,\$navmap); |
':::::'); |
|
} |
} |
} |
} |
|
|
# Store this |
# Store this |
unless ($toolsflag) { |
unless ($toolsflag) { |
if ($allowed) { |
if (($allowed) && ($env{'form.folderpath'} ne '')) { |
&Apache::loncommon::store_course_settings($stored_folderpath, |
&Apache::loncommon::store_course_settings($stored_folderpath, |
{'folderpath' => 'scalar'}); |
{'folderpath' => 'scalar'}); |
} |
} |
Line 4737 sub handler {
|
Line 4939 sub handler {
|
} else { |
} else { |
if ($env{'form.folder'} eq '' || |
if ($env{'form.folder'} eq '' || |
$env{'form.folder'} eq 'supplemental') { |
$env{'form.folder'} eq 'supplemental') { |
$folderpath='default&'. |
if ($env{'form.folder'} eq 'supplemental') { |
&escape(&mt('Main Content').':::::'); |
$folderpath=&supplemental_base(); |
|
} elsif (!$hiddentop) { |
|
$folderpath='default&'. |
|
&escape(&mt('Main Content').':::::'); |
|
} |
} |
} |
} |
} |
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
Line 4749 sub handler {
|
Line 4955 sub handler {
|
if ($showdoc) { # got called in sequence from course |
if ($showdoc) { # got called in sequence from course |
$allowed=0; |
$allowed=0; |
} else { |
} else { |
if ($allowed) { |
if ($canedit) { |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['cmd']); |
$script=&Apache::lonratedt::editscript('simple'); |
$script=&Apache::lonratedt::editscript('simple'); |
} |
} |
Line 4788 sub handler {
|
Line 4994 sub handler {
|
} |
} |
} |
} |
my $tabidstr = join("','",@tabids); |
my $tabidstr = join("','",@tabids); |
$script .= &editing_js($udom,$uname,$supplementalflag). |
$script .= &editing_js($udom,$uname,$supplementalflag,$coursedom,$coursenum |
|
$canedit,\$navmap). |
&history_tab_js(). |
&history_tab_js(). |
&inject_data_js(). |
&inject_data_js(). |
&Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr,$tid). |
&Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr,$tid). |
Line 4817 sub handler {
|
Line 5024 sub handler {
|
$r->print(&Apache::loncommon::start_page("$crstype documents",undef, |
$r->print(&Apache::loncommon::start_page("$crstype documents",undef, |
{'force_register' => $showdoc,})); |
{'force_register' => $showdoc,})); |
} elsif ($toolsflag) { |
} elsif ($toolsflag) { |
|
my ($breadtext,$breadtitle); |
|
$breadtext = "$crstype Editor"; |
|
if ($canedit) { |
|
$breadtitle = 'Editing '.$crstype.' Contents'; |
|
} else { |
|
$breadtext .= ' (View-only mode)'; |
|
$breadtitle = 'Viewing '.$crstype.' Contents'; |
|
} |
&Apache::lonhtmlcommon::add_breadcrumb({ |
&Apache::lonhtmlcommon::add_breadcrumb({ |
href=>"/adm/coursedocs",text=>"$crstype Contents"}); |
href=>"/adm/coursedocs",text=>$breadtext}); |
$r->print(&Apache::loncommon::start_page("$crstype Contents", $script) |
$r->print(&Apache::loncommon::start_page("$crstype Contents", $script) |
.&Apache::loncommon::help_open_menu('','',273,'RAT') |
.&Apache::loncommon::help_open_menu('','',273,'RAT') |
.&Apache::lonhtmlcommon::breadcrumbs( |
.&Apache::lonhtmlcommon::breadcrumbs( |
'Editing Course Contents') |
$breadtitle) |
); |
); |
} elsif ($r->uri eq '/adm/supplemental') { |
} elsif ($r->uri eq '/adm/supplemental') { |
my $brcrum = &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype); |
my $brcrum = &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype); |
$r->print(&Apache::loncommon::start_page("Supplemental $crstype Content",undef, |
$r->print(&Apache::loncommon::start_page("Supplemental $crstype Content",undef, |
{'bread_crumbs' => $brcrum,})); |
{'bread_crumbs' => $brcrum,})); |
} else { |
} else { |
|
my ($breadtext,$breadtitle,$helpitem); |
|
$breadtext = "$crstype Editor"; |
|
if ($canedit) { |
|
$breadtitle = 'Editing '.$crstype.' Contents'; |
|
$helpitem = 'Docs_Adding_Course_Doc'; |
|
} else { |
|
$breadtext .= ' (View-only mode)'; |
|
$breadtitle = 'Viewing '.$crstype.' Contents'; |
|
$helpitem = 'Docs_Viewing_Course_Doc'; |
|
} |
&Apache::lonhtmlcommon::add_breadcrumb({ |
&Apache::lonhtmlcommon::add_breadcrumb({ |
href=>"/adm/coursedocs",text=>"$crstype Contents"}); |
href=>"/adm/coursedocs",text=>$breadtext}); |
$r->print(&Apache::loncommon::start_page("$crstype Contents", $script, |
$r->print(&Apache::loncommon::start_page("$crstype Contents", $script, |
{'add_entries' => $addentries} |
{'add_entries' => $addentries} |
) |
) |
.&Apache::loncommon::help_open_menu('','',273,'RAT') |
.&Apache::loncommon::help_open_menu('','',273,'RAT') |
.&Apache::lonhtmlcommon::breadcrumbs( |
.&Apache::lonhtmlcommon::breadcrumbs( |
'Editing '.$crstype.' Contents', |
$breadtitle, |
'Docs_Adding_Course_Doc') |
$helpitem) |
); |
); |
} |
} |
|
|
my %allfiles = (); |
my %allfiles = (); |
my %codebase = (); |
my %codebase = (); |
my ($upload_result,$upload_output,$uploadphase); |
my ($upload_result,$upload_output,$uploadphase); |
if ($allowed) { |
if ($canedit) { |
if (($env{'form.uploaddoc.filename'}) && |
if (($env{'form.uploaddoc.filename'}) && |
($env{'form.cmd'}=~/^upload_(\w+)/)) { |
($env{'form.cmd'}=~/^upload_(\w+)/)) { |
my $context = $1; |
my $context = $1; |
Line 4896 sub handler {
|
Line 5121 sub handler {
|
|
|
if ($allowed && $toolsflag) { |
if ($allowed && $toolsflag) { |
$r->print(&startContentScreen('tools')); |
$r->print(&startContentScreen('tools')); |
$r->print(&generate_admin_menu($crstype)); |
$r->print(&generate_admin_menu($crstype,$canedit)); |
$r->print(&endContentScreen()); |
$r->print(&endContentScreen()); |
} elsif ((!$showdoc) && (!$uploadphase)) { |
} elsif ((!$showdoc) && (!$uploadphase)) { |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
Line 4936 sub handler {
|
Line 5161 sub handler {
|
'bb6' => 'Blackboard 6', |
'bb6' => 'Blackboard 6', |
'angel5' => 'ANGEL 5.5', |
'angel5' => 'ANGEL 5.5', |
'webctce4' => 'WebCT 4 Campus Edition', |
'webctce4' => 'WebCT 4 Campus Edition', |
|
'er' => 'Editing rights unavailable for your current role.', |
); |
); |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
# Calculate free quota space for a user or course. |
# Calculate free quota space for a user or course. |
Line 4972 sub handler {
|
Line 5198 sub handler {
|
my $fileupload=(<<FIUP); |
my $fileupload=(<<FIUP); |
$quotainfo |
$quotainfo |
$lt{'file'}:<br /> |
$lt{'file'}:<br /> |
<input type="file" name="uploaddoc" size="40" /> |
<input type="file" name="uploaddoc" size="40" $disabled /> |
FIUP |
FIUP |
|
|
my $checkbox=(<<CHBO); |
my $checkbox=(<<CHBO); |
Line 4980 FIUP
|
Line 5206 FIUP
|
<input type="checkbox" name="parserflag" /> |
<input type="checkbox" name="parserflag" /> |
</label> --> |
</label> --> |
<label> |
<label> |
<input type="checkbox" name="parserflag" checked="checked" /> $lt{'parse'} |
<input type="checkbox" name="parserflag" checked="checked" $disabled /> $lt{'parse'} |
</label> |
</label> |
CHBO |
CHBO |
my $imsfolder = $env{'form.folder'}; |
my $imsfolder = $env{'form.folder'}; |
Line 4997 CHBO
|
Line 5223 CHBO
|
<br /> |
<br /> |
<p> |
<p> |
$lt{'cms'}: |
$lt{'cms'}: |
<select name="source"> |
<select name="source" $disabled> |
<option value="-1" selected="selected">$lt{'se'}</option> |
<option value="-1" selected="selected">$lt{'se'}</option> |
<option value="bb5">$lt{'bb5'}</option> |
<option value="bb5">$lt{'bb5'}</option> |
<option value="bb6">$lt{'bb6'}</option> |
<option value="bb6">$lt{'bb6'}</option> |
Line 5007 CHBO
|
Line 5233 CHBO
|
<input type="hidden" name="folder" value="$imsfolder" /> |
<input type="hidden" name="folder" value="$imsfolder" /> |
</p> |
</p> |
<input type="hidden" name="phase" value="one" /> |
<input type="hidden" name="phase" value="one" /> |
<input type="button" value="$lt{'imsl'}" onclick="makeims(this.form);" /> |
<input type="button" value="$lt{'imsl'}" onclick="makeims(this.form);" $disabled /> |
</fieldset> |
</fieldset> |
</form> |
</form> |
IMSFORM |
IMSFORM |
Line 5022 IMSFORM
|
Line 5248 IMSFORM
|
$fileupload |
$fileupload |
<br /> |
<br /> |
$lt{'title'}:<br /> |
$lt{'title'}:<br /> |
<input type="text" size="60" name="comment" /> |
<input type="text" size="60" name="comment" $disabled /> |
$pathitem |
$pathitem |
<input type="hidden" name="cmd" value="upload_default" /> |
<input type="hidden" name="cmd" value="upload_default" /> |
<br /> |
<br /> |
Line 5030 IMSFORM
|
Line 5256 IMSFORM
|
$checkbox |
$checkbox |
</span> |
</span> |
<br clear="all" /> |
<br clear="all" /> |
<input type="submit" value="$lt{'upld'}" /> |
<input type="submit" value="$lt{'upld'}" $disabled /> |
</fieldset> |
</fieldset> |
</form> |
</form> |
FUFORM |
FUFORM |
|
|
|
my $mapimportjs; |
|
if ($canedit) { |
|
$mapimportjs = "javascript:openbrowser('mapimportform','importmap','sequence,page','');"; |
|
} else { |
|
$mapimportjs = "javascript:alert('".&js_escape($lt{'er'})."');"; |
|
} |
my $importpubform=(<<SEDFFORM); |
my $importpubform=(<<SEDFFORM); |
<a class="LC_menubuttons_link" href="javascript:toggleMap('map');"> |
<a class="LC_menubuttons_link" href="javascript:toggleMap('map');"> |
$lt{'impm'}</a>$help{'Load_Map'} |
$lt{'impm'}</a>$help{'Load_Map'} |
Line 5045 FUFORM
|
Line 5277 FUFORM
|
$lt{'copm'}<br /> |
$lt{'copm'}<br /> |
<span class="LC_nobreak"> |
<span class="LC_nobreak"> |
<input type="text" name="importmap" size="40" value="" |
<input type="text" name="importmap" size="40" value="" |
onfocus="this.blur();openbrowser('mapimportform','importmap','sequence,page','');" /> |
onfocus="this.blur();$mapimportjs" $disabled /> |
<a href="javascript:openbrowser('mapimportform','importmap','sequence,page','');">$lt{'selm'}</a></span><br /> |
<a href="$mapimportjs">$lt{'selm'}</a></span><br /> |
<input type="submit" name="loadmap" value="$lt{'load'}" /> |
<input type="submit" name="loadmap" value="$lt{'load'}" $disabled /> |
</fieldset> |
</fieldset> |
</form> |
</form> |
|
|
SEDFFORM |
SEDFFORM |
|
|
|
my $fromstoredjs; |
|
if ($canedit) { |
|
$fromstoredjs = 'open_StoredLinks_Import()'; |
|
} else { |
|
$fromstoredjs = "alert('".&js_escape($lt{'er'})."')"; |
|
} |
|
|
my @importpubforma = ( |
my @importpubforma = ( |
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/src.png" alt="'.$lt{srch}.'" onclick="javascript:groupsearch()" />' => $pathitem."<a class='LC_menubuttons_link' href='javascript:groupsearch()'>$lt{'srch'}</a>" }, |
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/src.png" alt="'.$lt{srch}.'" onclick="javascript:groupsearch()" />' => $pathitem."<a class='LC_menubuttons_link' href='javascript:groupsearch()'>$lt{'srch'}</a>" }, |
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/res.png" alt="'.$lt{impo}.'" onclick="javascript:groupimport();"/>' => "<a class='LC_menubuttons_link' href='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" }, |
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/res.png" alt="'.$lt{impo}.'" onclick="javascript:groupimport();"/>' => "<a class='LC_menubuttons_link' href='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" }, |
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/wishlist.png" alt="'.$lt{lnks}.'" onclick="javascript:open_StoredLinks_Import();" />' => "<a class='LC_menubuttons_link' href='javascript:open_StoredLinks_Import();'>$lt{'lnks'}</a>" }, |
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/wishlist.png" alt="'.$lt{lnks}.'" onclick="javascript:'.$fromstoredjs.';" />' => '<a class="LC_menubuttons_link" href="javascript:'.$fromstoredjs.';">'.$lt{'lnks'}.'</a>' }, |
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/sequence.png" alt="'.$lt{impm}.'" onclick="javascript:toggleMap(\'map\');" />' => $importpubform } |
{ '<img class="LC_noBorder LC_middle" src="/res/adm/pages/sequence.png" alt="'.$lt{impm}.'" onclick="javascript:toggleMap(\'map\');" />' => $importpubform } |
); |
); |
$importpubform = &create_form_ul(&create_list_elements(@importpubforma)); |
$importpubform = &create_form_ul(&create_list_elements(@importpubforma)); |
my $extresourcesform = |
my $extresourcesform = |
&Apache::lonextresedit::extedit_form(0,0,undef,undef,$pathitem, |
&Apache::lonextresedit::extedit_form(0,0,undef,undef,$pathitem, |
$help{'Adding_External_Resource'}); |
$help{'Adding_External_Resource'}, |
|
undef,undef,$disabled); |
if ($allowed) { |
if ($allowed) { |
my $folder = $env{'form.folder'}; |
my $folder = $env{'form.folder'}; |
if ($folder eq '') { |
if ($folder eq '') { |
$folder='default'; |
$folder='default'; |
} |
} |
my $output = &update_paste_buffer($coursenum,$coursedom,$folder); |
if ($canedit) { |
if ($output) { |
my $output = &update_paste_buffer($coursenum,$coursedom,$folder); |
$r->print($output); |
if ($output) { |
|
$r->print($output); |
|
} |
} |
} |
$r->print(<<HIDDENFORM); |
$r->print(<<HIDDENFORM); |
<form name="renameform" method="post" action="/adm/coursedocs"> |
<form name="renameform" method="post" action="/adm/coursedocs"> |
Line 5106 HIDDENFORM
|
Line 5349 HIDDENFORM
|
|
|
if ($allowed) { |
if ($allowed) { |
my $folder=$env{'form.folder'}; |
my $folder=$env{'form.folder'}; |
if ($folder eq '' || $supplementalflag) { |
if ((($folder eq '') && (!$hiddentop)) || ($supplementalflag)) { |
$folder='default'; |
$folder='default'; |
$savefolderpath = $env{'form.folderpath'}; |
$savefolderpath = $env{'form.folderpath'}; |
$env{'form.folderpath'}='default&'.&escape(&mt('Main Content')); |
$env{'form.folderpath'}='default&'.&escape(&mt('Main Content')); |
Line 5134 HIDDENFORM
|
Line 5377 HIDDENFORM
|
$pathitem |
$pathitem |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$lt{'navc'}=/adm/navmaps" /> |
value="$lt{'navc'}=/adm/navmaps" /> |
<a class="LC_menubuttons_link" href="javascript:document.newnav.submit()">$lt{'navc'}</a> |
<a class="LC_menubuttons_link" href="javascript:makenew(document.newnav);">$lt{'navc'}</a> |
$help{'Navigate_Content'} |
$help{'Navigate_Content'} |
</form> |
</form> |
NNFORM |
NNFORM |
Line 5195 NBFORM
|
Line 5438 NBFORM
|
$pathitem |
$pathitem |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
<a class="LC_menubuttons_link" href="javascript:document.newaboutme.submit()">$lt{'mypi'}</a> |
<a class="LC_menubuttons_link" href="javascript:makenew(document.newaboutme);">$lt{'mypi'}</a> |
$help{'My Personal Information Page'} |
$help{'My Personal Information Page'} |
</form> |
</form> |
NAMFORM |
NAMFORM |
Line 5215 NASOFORM
|
Line 5458 NASOFORM
|
$pathitem |
$pathitem |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$lt{'rost'}=/adm/viewclasslist" /> |
value="$lt{'rost'}=/adm/viewclasslist" /> |
<a class="LC_menubuttons_link" href="javascript:document.newroster.submit()">$lt{'rost'}</a> |
<a class="LC_menubuttons_link" href="javascript:makenew(document.newroster);">$lt{'rost'}</a> |
$help{'Course_Roster'} |
$help{'Course_Roster'} |
</form> |
</form> |
NROSTFORM |
NROSTFORM |
Line 5278 NFFORM
|
Line 5521 NFFORM
|
$pathitem |
$pathitem |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" /> |
value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" /> |
<a class="LC_menubuttons_link" href="javascript:document.newsyl.submit()">$lt{'syll'}</a> |
<a class="LC_menubuttons_link" href="javascript:makenew(document.newsyl);">$lt{'syll'}</a> |
$help{'Syllabus'} |
$help{'Syllabus'} |
|
|
</form> |
</form> |
Line 5290 NSYLFORM
|
Line 5533 NSYLFORM
|
$pathitem |
$pathitem |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" /> |
value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" /> |
<a class="LC_menubuttons_link" href="javascript:document.newgroupfiles.submit()">$lt{'grpo'}</a> |
<a class="LC_menubuttons_link" href="javascript:makenew(document.newgroupfiles);">$lt{'grpo'}</a> |
$help{'Group Portfolio'} |
$help{'Group Portfolio'} |
</form> |
</form> |
NGFFORM |
NGFFORM |
@specialdocumentsforma=( |
@specialdocumentsforma=( |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/page.png" alt="'.$lt{newp}.'" onclick="javascript:makenewpage(document.newpage,\''.$pageseq.'\');" />'=>$newpageform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/page.png" alt="'.$lt{newp}.'" onclick="javascript:makenewpage(document.newpage,\''.$pageseq.'\');" />'=>$newpageform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" onclick="document.newsyl.submit()" />'=>$newsylform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" onclick="javascript:makenew(document.newsyl);" />'=>$newsylform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/navigation.png" alt="'.$lt{navc}.'" onclick="document.newnav.submit()" />'=>$newnavform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/navigation.png" alt="'.$lt{navc}.'" onclick="javascript:makenew(document.newnav);" />'=>$newnavform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simple.png" alt="'.$lt{sipa}.'" onclick="javascript:makesmppage();" />'=>$newsmppageform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/simple.png" alt="'.$lt{sipa}.'" onclick="javascript:makesmppage();" />'=>$newsmppageform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/webpage.png" alt="'.$lt{webp}.'" onclick="javascript:makewebpage();" />'=>$newwebpageform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/webpage.png" alt="'.$lt{webp}.'" onclick="javascript:makewebpage();" />'=>$newwebpageform}, |
); |
); |
Line 5329 NGFFORM
|
Line 5572 NGFFORM
|
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/bchat.png" alt="'.$lt{bull}.'" onclick="javascript:makebulboard();" />'=>$newbulform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/bchat.png" alt="'.$lt{bull}.'" onclick="javascript:makebulboard();" />'=>$newbulform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" onclick="javascript:makebulboard();" />'=>$newaboutmeform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" onclick="javascript:makebulboard();" />'=>$newaboutmeform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/aboutme.png" alt="'.$lt{abou}.'" onclick="javascript:makeabout();" />'=>$newaboutsomeoneform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/aboutme.png" alt="'.$lt{abou}.'" onclick="javascript:makeabout();" />'=>$newaboutsomeoneform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/clst.png" alt="'.$lt{rost}.'" onclick="document.newroster.submit()" />'=>$newrosterform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/clst.png" alt="'.$lt{rost}.'" onclick="javascript:makenew(document.newroster);" />'=>$newrosterform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/groupportfolio.png" alt="'.$lt{grpo}.'" onclick="document.newgroupfiles.submit()" />'=>$newgroupfileform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/groupportfolio.png" alt="'.$lt{grpo}.'" onclick="javascript:makenew(document.newgroupfiles);" />'=>$newgroupfileform}, |
); |
); |
$communityform = &create_form_ul(&create_list_elements(@communityforma)); |
$communityform = &create_form_ul(&create_list_elements(@communityforma)); |
|
|
Line 5348 unless ($container eq 'page') {
|
Line 5591 unless ($container eq 'page') {
|
$hadchanges=0; |
$hadchanges=0; |
unless (($supplementalflag || $toolsflag)) { |
unless (($supplementalflag || $toolsflag)) { |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype, |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype, |
$supplementalflag,\%orderhash,$iconpath,$pathitem); |
$supplementalflag,\%orderhash,$iconpath,$pathitem, |
|
$canedit,\$navmap,$hiddentop)); |
|
undef($navmap); |
if ($error) { |
if ($error) { |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
} |
} |
Line 5413 SNFFORM
|
Line 5658 SNFFORM
|
|
|
my $supextform = |
my $supextform = |
&Apache::lonextresedit::extedit_form(1,0,undef,undef,$pathitem, |
&Apache::lonextresedit::extedit_form(1,0,undef,undef,$pathitem, |
$help{'Adding_External_Resource'}); |
$help{'Adding_External_Resource'}, |
|
undef,undef,$disabled); |
|
|
my $supnewsylform=(<<SNSFORM); |
my $supnewsylform=(<<SNSFORM); |
<form action="/adm/coursedocs" method="post" name="supnewsyl"> |
<form action="/adm/coursedocs" method="post" name="supnewsyl"> |
Line 5421 SNFFORM
|
Line 5667 SNFFORM
|
$pathitem |
$pathitem |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="Syllabus=/public/$coursedom/$coursenum/syllabus" /> |
value="Syllabus=/public/$coursedom/$coursenum/syllabus" /> |
<a class="LC_menubuttons_link" href="javascript:document.supnewsyl.submit()">$lt{'syll'}</a> |
<a class="LC_menubuttons_link" href="javascript:makenew(document.supnewsyl);">$lt{'syll'}</a> |
$help{'Syllabus'} |
$help{'Syllabus'} |
</form> |
</form> |
SNSFORM |
SNSFORM |
Line 5432 SNSFORM
|
Line 5678 SNSFORM
|
$pathitem |
$pathitem |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
<a class="LC_menubuttons_link" href="javascript:document.supnewaboutme.submit()">$lt{'mypi'}</a> |
<a class="LC_menubuttons_link" href="javascript:makenew(document.supnewaboutme);">$lt{'mypi'}</a> |
$help{'My Personal Information Page'} |
$help{'My Personal Information Page'} |
</form> |
</form> |
SNAMFORM |
SNAMFORM |
Line 5459 SWEBFORM
|
Line 5705 SWEBFORM
|
|
|
|
|
my @specialdocs = ( |
my @specialdocs = ( |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" onclick="document.supnewsyl.submit()" />' |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/syllabus.png" alt="'.$lt{syll}.'" onclick="javascript:makenew(document.supnewsyl);" />' |
=>$supnewsylform}, |
=>$supnewsylform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" onclick="document.supnewaboutme.submit()" />' |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/myaboutme.png" alt="'.$lt{mypi}.'" onclick="javascript:makenew(document.supnewaboutme);" />' |
=>$supnewaboutmeform}, |
=>$supnewaboutmeform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/webpage.png" alt="'.$lt{webp}.'" onclick="javascript:makewebpage('."'supp'".');" />'=>$supwebpageform}, |
{'<img class="LC_noBorder LC_middle" src="/res/adm/pages/webpage.png" alt="'.$lt{webp}.'" onclick="javascript:makewebpage('."'supp'".');" />'=>$supwebpageform}, |
|
|
Line 5481 my %suporderhash = (
|
Line 5727 my %suporderhash = (
|
); |
); |
if ($supplementalflag) { |
if ($supplementalflag) { |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype, |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$crstype, |
$supplementalflag,\%suporderhash,$iconpath,$pathitem); |
$supplementalflag,\%suporderhash,$iconpath,$pathitem, |
|
$canedit); |
if ($error) { |
if ($error) { |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
} else { |
} else { |
Line 5686 sub remove_archive {
|
Line 5933 sub remove_archive {
|
} |
} |
|
|
sub generate_admin_menu { |
sub generate_admin_menu { |
my ($crstype) = @_; |
my ($crstype,$canedit) = @_; |
my $lc_crstype = lc($crstype); |
my $lc_crstype = lc($crstype); |
my ($home,$other,%outhash)=&authorhosts(); |
my ($home,$other,%outhash)=&authorhosts(); |
my %lt= ( # do not translate here |
my %lt= ( # do not translate here |
Line 5744 sub generate_admin_menu {
|
Line 5991 sub generate_admin_menu {
|
linktitle => "List the unique identifier used for each resource instance in your $lc_crstype" |
linktitle => "List the unique identifier used for each resource instance in your $lc_crstype" |
}, |
}, |
] |
] |
}, |
}); |
|
if ($canedit) { |
|
push(@menu, |
{ categorytitle=>'Export', |
{ categorytitle=>'Export', |
items =>[ |
items =>[ |
{ linktext => $lt{'imse'}, |
{ linktext => $lt{'imse'}, |
Line 5763 sub generate_admin_menu {
|
Line 6012 sub generate_admin_menu {
|
}, |
}, |
] |
] |
}); |
}); |
|
} |
return '<form action="/adm/coursedocs" method="post" name="courseverify">'."\n". |
return '<form action="/adm/coursedocs" method="post" name="courseverify">'."\n". |
'<input type="hidden" id="dummy" />'."\n". |
'<input type="hidden" id="dummy" />'."\n". |
&Apache::lonhtmlcommon::generate_menu(@menu)."\n". |
&Apache::lonhtmlcommon::generate_menu(@menu)."\n". |
Line 5771 sub generate_admin_menu {
|
Line 6021 sub generate_admin_menu {
|
|
|
sub generate_edit_table { |
sub generate_edit_table { |
my ($tid,$orderhash_ref,$to_show,$iconpath,$jumpto,$readfile, |
my ($tid,$orderhash_ref,$to_show,$iconpath,$jumpto,$readfile, |
$need_save,$copyfolder) = @_; |
$need_save,$copyfolder,$canedit) = @_; |
return unless(ref($orderhash_ref) eq 'HASH'); |
return unless(ref($orderhash_ref) eq 'HASH'); |
my %orderhash = %{$orderhash_ref}; |
my %orderhash = %{$orderhash_ref}; |
my $form; |
my ($form, $activetab, $active, $disabled); |
my $activetab; |
|
my $active; |
|
if (($env{'form.active'} ne '') && ($env{'form.active'} ne '00')) { |
if (($env{'form.active'} ne '') && ($env{'form.active'} ne '00')) { |
$activetab = $env{'form.active'}; |
$activetab = $env{'form.active'}; |
} |
} |
|
unless ($canedit) { |
|
$disabled = ' disabled="disabled"'; |
|
} |
my $backicon = $iconpath.'clickhere.gif'; |
my $backicon = $iconpath.'clickhere.gif'; |
my $backtext = &mt('Exit Editor'); |
my $backtext = &mt('Exit Editor'); |
$form = '<div class="LC_Box" style="margin:0;">'. |
$form = '<div class="LC_Box" style="margin:0;">'. |
Line 5843 sub generate_edit_table {
|
Line 6094 sub generate_edit_table {
|
<input type="hidden" name="multicopy" value="" /> |
<input type="hidden" name="multicopy" value="" /> |
<input type="hidden" name="multichange" value="" /> |
<input type="hidden" name="multichange" value="" /> |
<input type="hidden" name="copyfolder" value="$copyfolder" /> |
<input type="hidden" name="copyfolder" value="$copyfolder" /> |
<input type="submit" name="savemultiples" value="$button" /> |
<input type="submit" name="savemultiples" value="$button" $disabled /> |
</form> |
</form> |
</div> |
</div> |
END |
END |
Line 5869 END
|
Line 6120 END
|
} |
} |
|
|
sub editing_js { |
sub editing_js { |
my ($udom,$uname,$supplementalflag) = @_; |
my ($udom,$uname,$supplementalflag,$coursedom,$coursenum,$canedit,$navmapref) = @_; |
my %js_lt = &Apache::lonlocal::texthash( |
my %js_lt = &Apache::lonlocal::texthash( |
p_mnf => 'Name of New Folder', |
p_mnf => 'Name of New Folder', |
t_mnf => 'New Folder', |
t_mnf => 'New Folder', |
Line 5909 sub editing_js {
|
Line 6160 sub editing_js {
|
noor => 'No actions selected or changes to settings specified.', |
noor => 'No actions selected or changes to settings specified.', |
noch => 'No changes to settings specified.', |
noch => 'No changes to settings specified.', |
noac => 'No actions selected.', |
noac => 'No actions selected.', |
|
edri => 'Editing rights unavailable for your current role.', |
); |
); |
|
|
&js_escape(\%js_lt); |
&js_escape(\%js_lt); |
Line 5918 sub editing_js {
|
Line 6170 sub editing_js {
|
if (&HTML::Entities::decode($env{'environment.internal.'.$env{'request.course.id'}.'.docs_folderpath.folderpath'}) =~ /\:1$/) { |
if (&HTML::Entities::decode($env{'environment.internal.'.$env{'request.course.id'}.'.docs_folderpath.folderpath'}) =~ /\:1$/) { |
$main_container_page = 1; |
$main_container_page = 1; |
} |
} |
my $toplevelmain = |
my $backtourl; |
&escape(&mt('Main Content').':::::'); |
my $toplevelmain = &escape(&default_folderpath($coursenum,$coursedom,$navmapref)); |
my $toplevelsupp = &supplemental_base(); |
my $toplevelsupp = &supplemental_base(); |
|
|
my $backtourl; |
|
if ($env{'docs.exit.'.$env{'request.course.id'}} =~ /^direct_(.+)$/) { |
if ($env{'docs.exit.'.$env{'request.course.id'}} =~ /^direct_(.+)$/) { |
my $caller = $1; |
my $caller = $1; |
if ($caller =~ /^supplemental/) { |
if ($caller =~ /^supplemental/) { |
Line 5938 sub editing_js {
|
Line 6189 sub editing_js {
|
if (($caller =~ m{^([^#]+)\Q#$anchor\E$})) { |
if (($caller =~ m{^([^#]+)\Q#$anchor\E$})) { |
$caller = $1.&escape('#').$anchor; |
$caller = $1.&escape('#').$anchor; |
} |
} |
|
} else { |
|
$url = $res; |
} |
} |
$backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($url),'<>&"').'?symb='. |
$backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($url),'<>&"').'?symb='. |
&HTML::Entities::encode($caller,'<>&"'); |
&HTML::Entities::encode($caller,'<>&"'); |
Line 5965 sub editing_js {
|
Line 6218 sub editing_js {
|
$fieldsets = "'suppext','suppdoc'"; |
$fieldsets = "'suppext','suppdoc'"; |
} |
} |
|
|
return <<ENDNEWSCRIPT; |
my $jsmakefunctions; |
|
if ($canedit) { |
|
$jsmakefunctions = <<ENDNEWSCRIPT; |
function makenewfolder(targetform,folderseq) { |
function makenewfolder(targetform,folderseq) { |
var foldername=prompt('$js_lt{"p_mnf"}','$js_lt{"t_mnf"}'); |
var foldername=prompt('$js_lt{"p_mnf"}','$js_lt{"t_mnf"}'); |
if (foldername) { |
if (foldername) { |
Line 6051 function makeabout() {
|
Line 6306 function makeabout() {
|
if ((comp[0]) && (comp[1])) { |
if ((comp[0]) && (comp[1])) { |
this.document.forms.newaboutsomeone.importdetail.value= |
this.document.forms.newaboutsomeone.importdetail.value= |
'$js_lt{"p_mab2"}'+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme'; |
'$js_lt{"p_mab2"}'+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme'; |
this.document.forms.newaboutsomeone.submit(); |
this.document.forms.newaboutsomeone.submit(); |
} else { |
} else { |
alert("$js_lt{'p_mab_alrt1'}"); |
alert("$js_lt{'p_mab_alrt1'}"); |
} |
} |
} else { |
} else { |
alert("$js_lt{'p_mab_alrt2'}"); |
alert("$js_lt{'p_mab_alrt2'}"); |
|
} |
|
} |
} |
} |
|
|
|
function makenew(targetform) { |
|
targetform.submit(); |
} |
} |
|
|
|
function changename(folderpath,index,oldtitle) { |
|
var title=prompt('$js_lt{"p_chn"}',oldtitle); |
|
if (title) { |
|
this.document.forms.renameform.markcopy.value=''; |
|
this.document.forms.renameform.title.value=title; |
|
this.document.forms.renameform.cmd.value='rename_'+index; |
|
this.document.forms.renameform.folderpath.value=folderpath; |
|
this.document.forms.renameform.submit(); |
|
} |
} |
} |
|
|
|
ENDNEWSCRIPT |
|
} else { |
|
$jsmakefunctions = <<ENDNEWSCRIPT; |
|
|
|
function makenewfolder() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makenewpage() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makeexamupload() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makesmppage() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makewebpage(type) { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makesmpproblem() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makedropbox() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makebulboard() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makeabout() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function changename() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function makenew() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function groupimport() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function groupsearch() { |
|
alert("$js_lt{'edri'}"); |
|
} |
|
|
|
function groupopen(url,recover) { |
|
var options="scrollbars=1,resizable=1,menubar=0"; |
|
idxflag=1; |
|
idx=open("/adm/groupsort?inhibitmenu=yes&mode=simple&recover="+recover+"&readfile="+url,"idxout",options); |
|
idx.focus(); |
|
} |
|
|
|
ENDNEWSCRIPT |
|
|
|
} |
|
return <<ENDSCRIPT; |
|
|
|
$jsmakefunctions |
|
|
function toggleUpload(caller) { |
function toggleUpload(caller) { |
var blocks = Array($fieldsets); |
var blocks = Array($fieldsets); |
for (var i=0; i<blocks.length; i++) { |
for (var i=0; i<blocks.length; i++) { |
Line 6105 function makeims(imsform) {
|
Line 6445 function makeims(imsform) {
|
imsform.submit(); |
imsform.submit(); |
} |
} |
|
|
function changename(folderpath,index,oldtitle) { |
|
var title=prompt('$js_lt{"p_chn"}',oldtitle); |
|
if (title) { |
|
this.document.forms.renameform.markcopy.value=''; |
|
this.document.forms.renameform.title.value=title; |
|
this.document.forms.renameform.cmd.value='rename_'+index; |
|
this.document.forms.renameform.folderpath.value=folderpath; |
|
this.document.forms.renameform.submit(); |
|
} |
|
} |
|
|
|
function updatePick(targetform,index,caller) { |
function updatePick(targetform,index,caller) { |
var pickitem; |
var pickitem; |
var picknumitem; |
var picknumitem; |
Line 6281 function propagateState(form,param) {
|
Line 6610 function propagateState(form,param) {
|
} |
} |
|
|
function checkForSubmit(targetform,param,context,idx,folderpath,index,oldtitle,skip_confirm,container,folder,confirm_removal) { |
function checkForSubmit(targetform,param,context,idx,folderpath,index,oldtitle,skip_confirm,container,folder,confirm_removal) { |
|
var canedit = '$canedit'; |
|
if (canedit == '') { |
|
alert("$js_lt{'edri'}"); |
|
return; |
|
} |
var dosettings; |
var dosettings; |
var doaction; |
var doaction; |
var control = document.togglemultsettings; |
var control = document.togglemultsettings; |
Line 6826 function setBoxes(value) {
|
Line 7160 function setBoxes(value) {
|
return; |
return; |
} |
} |
|
|
ENDNEWSCRIPT |
ENDSCRIPT |
} |
} |
|
|
sub history_tab_js { |
sub history_tab_js { |