version 1.115, 2004/04/07 21:40:21
|
version 1.117, 2004/04/08 21:10:25
|
Line 261 sub group_import {
|
Line 261 sub group_import {
|
sub breadcrumbs { |
sub breadcrumbs { |
my ($where)=@_; |
my ($where)=@_; |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
if ($where =~ /^default/) { |
my (@folders)=split('&',$ENV{'form.folderpath'}); |
&Apache::lonhtmlcommon::add_breadcrumb({'href'=>'/adm/coursedocs', |
my $folderpath; |
'title'=>'Main Course Documents', |
while (@folders) { |
'text' =>'Main Course Documents'}); |
my $folder=shift(@folders); |
} elsif ($where =~ /^supplemental/) { |
my $foldername=shift(@folders); |
&Apache::lonhtmlcommon::add_breadcrumb({'href'=>'/adm/coursedocs', |
if ($folderpath) {$folderpath.='&';} |
'title'=>'Supplemental Course Documents', |
$folderpath.=$folder.'&'.$foldername; |
'text' =>'Supplemental Course Documents'}); |
my $url='/adm/coursedocs?folderpath='. |
|
&Apache::lonnet::escape($folderpath); |
} else { |
|
&Apache::lonhtmlcommon::add_breadcrumb({'href'=>'/adm/coursedocs', |
|
'title'=>$where, |
|
'text' =>$where}); |
|
} |
|
if ($ENV{'form.foldername'}) { |
|
my @folders; |
|
if (defined($ENV{'form.folders'})) { |
|
@folders=@{$ENV{'form.folders'}}; |
|
} |
|
@folders=(@folders,$ENV{'form.folder'}, |
|
&Apache::lonnet::escape($ENV{'form.foldername'})); |
|
|
|
my $folderpath; |
|
while (@folders) { |
|
my $folder=shift(@folders); |
|
my $foldername=shift(@folders); |
|
if ($folderpath) {$folderpath.='&';} |
|
$folderpath.=$folder.'&'.$foldername; |
|
my $url='/adm/coursedocs?folderpath='. |
|
&Apache::lonnet::escape($folderpath); |
|
&Apache::lonhtmlcommon::add_breadcrumb( |
&Apache::lonhtmlcommon::add_breadcrumb( |
{'href'=>$url, |
{'href'=>$url, |
'title'=>&Apache::lonnet::unescape($foldername), |
'title'=>&Apache::lonnet::unescape($foldername), |
'text'=>&Apache::lonnet::unescape($foldername)}); |
'text'=>'<font size="+1">'. |
|
&Apache::lonnet::unescape($foldername).'</font>' |
|
}); |
|
|
|
|
} |
|
} |
} |
return &Apache::lonhtmlcommon::breadcrumbs(); |
return &Apache::lonhtmlcommon::breadcrumbs(undef,undef,undef,undef,undef,0); |
} |
} |
|
|
sub editor { |
sub editor { |
Line 896 sub changewarning {
|
Line 876 sub changewarning {
|
$r->print( |
$r->print( |
'<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. |
'<script>function reinit(tf) { tf.submit();'.$postexec.' }</script>'. |
'<form method="post" action="/adm/roles" target="loncapaclient">'. |
'<form method="post" action="/adm/roles" target="loncapaclient">'. |
'<input type="hidden" name="orgurl" value="/adm/coursedocs" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'. |
'<input type="hidden" name="orgurl" value="/adm/coursedocs?folderpath='. |
|
&Apache::lonnet::escape($ENV{'form.folderpath'}). |
|
'" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">'. |
&mt('Changes will become active for your current session after'). |
&mt('Changes will become active for your current session after'). |
' <input type="hidden" name="'. |
' <input type="hidden" name="'. |
$ENV{'request.role'}.'" value="1" /><input type="button" value="'. |
$ENV{'request.role'}.'" value="1" /><input type="button" value="'. |
Line 954 sub handler {
|
Line 936 sub handler {
|
my (@folderpath)=split('&',$ENV{'form.folderpath'}); |
my (@folderpath)=split('&',$ENV{'form.folderpath'}); |
$ENV{'form.foldername'}=&Apache::lonnet::unescape(pop(@folderpath)); |
$ENV{'form.foldername'}=&Apache::lonnet::unescape(pop(@folderpath)); |
$ENV{'form.folder'}=pop(@folderpath); |
$ENV{'form.folder'}=pop(@folderpath); |
$ENV{'form.folders'}=\@folderpath; |
} |
} |
|
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { |
if ($r->uri=~/^\/adm\/coursedocs\/showdoc\/(.*)$/) { |
$showdoc=$1; |
$showdoc=$1; |
} |
} |
Line 1171 ENDCOURSEVERIFY
|
Line 1152 ENDCOURSEVERIFY
|
&mt('Editing the Table of Contents for your Course'))); |
&mt('Editing the Table of Contents for your Course'))); |
} |
} |
# --------------------------------------------------------- Standard documents |
# --------------------------------------------------------- Standard documents |
#my $htmlfoldername=&HTML::Entities::encode($ENV{'form.foldername'},'<>&"'); |
|
$r->print('<table border=2 cellspacing=4 cellpadding=4>'); |
$r->print('<table border=2 cellspacing=4 cellpadding=4>'); |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
$r->print('<tr><td bgcolor="#BBBBBB"><h2>'.&mt('Main Course Documents'). |
$r->print('<tr><td bgcolor="#BBBBBB">'); |
($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>'); |
# '<h2>'.&mt('Main Course Documents'). |
|
# ($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>'); |
my $folder=$ENV{'form.folder'}; |
my $folder=$ENV{'form.folder'}; |
if ($folder eq '') { |
if ($folder eq '' || $folder eq 'supplemental') { |
$folder='default'; |
$folder='default'; |
|
$ENV{'form.folderpath'}='default&'.&Apache::lonnet::escape(&mt('Main Course Documents')); |
} |
} |
my $postexec=''; |
my $postexec=''; |
if ($folder eq 'default') { |
if ($folder eq 'default') { |
$r->print('<script>this.window.name="loncapaclient";</script>'); |
$r->print('<script>this.window.name="loncapaclient";</script>'); |
} else { |
} else { |
$postexec='self.close();'; |
#$postexec='self.close();'; |
} |
} |
$hadchanges=0; |
$hadchanges=0; |
&editor($r,$coursenum,$coursedom,$folder,$allowed); |
&editor($r,$coursenum,$coursedom,$folder,$allowed); |
Line 1330 ENDFORM
|
Line 1312 ENDFORM
|
} |
} |
# ----------------------------------------------------- Supplemental documents |
# ----------------------------------------------------- Supplemental documents |
if (!$forcestandard) { |
if (!$forcestandard) { |
$r->print( |
$r->print('<tr><td bgcolor="#BBBBBB">'); |
'<tr><td bgcolor="#BBBBBB"><h2>'.&mt('Supplemental Course Documents'). |
# '<h2>'.&mt('Supplemental Course Documents'). |
($allowed?' '.$help{'Supplemental'}:'').'</h2>'); |
# ($allowed?' '.$help{'Supplemental'}:'').'</h2>'); |
my $folder=$ENV{'form.folder'}; |
my $folder=$ENV{'form.folder'}; |
unless ($folder=~/supplemental/) { $folder='supplemental'; } |
unless ($folder=~/^supplemental/) { |
|
$folder='supplemental'; |
|
} |
|
if ($folder =~ /^supplemental$/ && |
|
$ENV{'form.folderpath'} =~ /^default\&/) { |
|
$ENV{'form.folderpath'}='supplemental&'. |
|
&Apache::lonnet::escape(&mt('Supplemental Course Documents')); |
|
} |
&editor($r,$coursenum,$coursedom,$folder,$allowed); |
&editor($r,$coursenum,$coursedom,$folder,$allowed); |
if ($allowed) { |
if ($allowed) { |
my $folderseq= |
my $folderseq= |