version 1.335, 2009/02/03 18:31:59
|
version 1.341, 2009/02/12 15:45:38
|
Line 1899 END
|
Line 1899 END
|
} |
} |
|
|
my $orig_url = $url; |
my $orig_url = $url; |
|
$orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; |
my $external = ($url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}); |
my $external = ($url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}); |
if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) { |
if ((!$isfolder) && ($residx) && ($folder!~/supplemental/) && (!$ispage)) { |
my $symb=&Apache::lonnet::symbclean( |
my $symb=&Apache::lonnet::symbclean( |
Line 2764 sub handler {
|
Line 2765 sub handler {
|
'sipr' => 'Simple Problem', |
'sipr' => 'Simple Problem', |
'drbx' => 'Drop Box', |
'drbx' => 'Drop Box', |
'scuf' => 'Score Upload Form', |
'scuf' => 'Score Upload Form', |
'bull' => 'Bulletin Board', |
'bull' => 'Discussion Board', |
'mypi' => 'My Personal Info', |
'mypi' => 'My Personal Info', |
'grpo' => 'Group Files', |
'grpo' => 'Group Files', |
'rost' => 'Course Roster', |
'rost' => 'Course Roster', |
Line 2872 ERFORM
|
Line 2873 ERFORM
|
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
$uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
$uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
} |
} |
|
$r->print(<<HIDDENFORM); |
$r->print(&generate_admin_options($containertag,$uploadtag,\%lt,\%help,\%env)); |
<form name="renameform" method="post" action="/adm/coursedocs"> |
|
<input type="hidden" name="title" /> |
|
<input type="hidden" name="cmd" /> |
|
<input type="hidden" name="markcopy" /> |
|
<input type="hidden" name="copyfolder" /> |
|
$containertag |
|
</form> |
|
<form name="simpleedit" method="post" action="/adm/coursedocs"> |
|
<input type="hidden" name="importdetail" value="" /> |
|
$uploadtag |
|
</form> |
|
HIDDENFORM |
} |
} |
# --------------------------------------------------------- Main tab structure |
# --------------------------------------------------------- Main tab structure |
my $activeClass = 1; |
my $activeClass = 1; |
$r->print('<div class="LC_ContentBoxSpecial"><ul class="LC_TabContent" id="mainnav">'); |
$r->print('<ul class="LC_TabContentBigger" id="mainnav">'); |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
my $active = ''; |
my $active = ''; |
if($activeClass == 1){ |
if($activeClass == 1){ |
Line 2893 ERFORM
|
Line 2905 ERFORM
|
} |
} |
$r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>'); |
$r->print('<li '.$active.'onclick="javascript:showPage(this,\'Supplemental Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>'); |
} |
} |
$r->print('</ul><div id="maincoursedoc" style="margin:0 0;padding:0 0;">'); |
$r->print('<li onclick="javascript:showPage(this,\'Special Admin Options\',\'mainnav\',\'maincoursedoc\');">'.&mt('Special Admin Options').'</li>'); |
|
$r->print('</ul><div class="LC_ContentBoxSpecial" style="margin:0 0;padding:0 0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">'); |
# --------------------------------------------------------- Standard documents |
# --------------------------------------------------------- Standard documents |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
my $active = 'style="display: none;"'; |
my $active = 'style="display: none;"'; |
Line 2916 ERFORM
|
Line 2929 ERFORM
|
} else { |
} else { |
#$postexec='self.close();'; |
#$postexec='self.close();'; |
} |
} |
$hadchanges=0; |
# $hadchanges=0; |
if ($hadchanges) { |
# my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
&mark_hash_old(); |
# if ($error) { |
} |
# $r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
&changewarning($r,$postexec); |
# } |
|
# if ($hadchanges) { |
|
# &mark_hash_old(); |
|
# } |
|
# |
|
# &changewarning($r,$postexec); |
my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. |
my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. |
'.sequence'; |
'.sequence'; |
my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. |
my $pageseq = '/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. |
Line 3138 my $content='content';
|
Line 3156 my $content='content';
|
my $navigation='navigation'; |
my $navigation='navigation'; |
my $varcd = 'Main Course Documents'; |
my $varcd = 'Main Course Documents'; |
$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash)); |
$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash)); |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
$hadchanges=0; |
|
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
if ($error) { |
if ($error) { |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
} |
} |
|
if ($hadchanges) { |
|
&mark_hash_old(); |
|
} |
|
|
|
&changewarning($r,''); |
$r->print('</div>'); |
$r->print('</div>'); |
} |
} |
if ($env{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
Line 3264 my $error = &editor($r,$coursenum,$cours
|
Line 3288 my $error = &editor($r,$coursenum,$cours
|
if ($error) { |
if ($error) { |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
} |
} |
$r->print('</div)'); |
$r->print('</div>'); |
} |
} |
} |
} |
|
$r->print('<div class="LC_ContentBox" id="Special Admin Options" style="display: none;">'); |
|
$r->print(&generate_admin_options($containertag,$uploadtag,\%help,\%env)); |
|
$r->print('</div>'); |
$r->print('</div>'); |
$r->print('</div>'); |
if ($allowed) { |
if ($allowed) { |
$r->print(' |
$r->print(' |
Line 3292 $r->print('</div>');
|
Line 3319 $r->print('</div>');
|
} |
} |
|
|
sub generate_admin_options { |
sub generate_admin_options { |
my ($containertag,$uploadtag,$lt_ref,$help_ref,$env_ref) = @_; |
my ($containertag,$uploadtag,$help_ref,$env_ref) = @_; |
my %lt = %{$lt_ref}; |
my %lt=&Apache::lonlocal::texthash( |
|
'vc' => 'Verify Content', |
|
'cv' => 'Check/Set Resource Versions', |
|
'ls' => 'List Symbs', |
|
'sl' => 'Show Log' |
|
); |
my %help = %{$help_ref}; |
my %help = %{$help_ref}; |
my %env = %{$env_ref}; |
my %env = %{$env_ref}; |
my $dumpbut=&dumpbutton(); |
my $dumpbut=&dumpbutton(); |
my $exportbut=&exportbutton(); |
my $exportbut=&exportbutton(); |
return (<<ENDOPTIONFORM); |
return (<<ENDOPTIONFORM); |
<form name="renameform" method="post" action="/adm/coursedocs"> |
|
<input type="hidden" name="title" /> |
|
<input type="hidden" name="cmd" /> |
|
<input type="hidden" name="markcopy" /> |
|
<input type="hidden" name="copyfolder" /> |
|
$containertag |
|
</form> |
|
<form name="simpleedit" method="post" action="/adm/coursedocs"> |
|
<input type="hidden" name="importdetail" value="" /> |
|
$uploadtag |
|
</form> |
|
<form action="/adm/coursedocs" method="post" name="courseverify"> |
<form action="/adm/coursedocs" method="post" name="courseverify"> |
<ul style="list-style-type:none"> |
<ul style="list-style-type:none"> |
<li> |
<li> |
Line 3333 sub generate_admin_options {
|
Line 3354 sub generate_admin_options {
|
</li> |
</li> |
</ul> |
</ul> |
</form> |
</form> |
<div style="clear: both; height: 0px;"> </div> |
<!-- <div style="clear: both; height: 0px;"> </div>--> |
ENDOPTIONFORM |
ENDOPTIONFORM |
|
|
} |
} |
Line 3356 sub generate_edit_table {
|
Line 3377 sub generate_edit_table {
|
$form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>'; |
$form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>'; |
} |
} |
} |
} |
|
$form .= '</ul>'; |
$form .= '<div id="'.$content.$tid.'" style="padding: 0 0; margin: 0 0;">'; |
$form .= '<div id="'.$content.$tid.'" style="padding: 0 0; margin: 0 0;">'; |
foreach my $field (keys(%namehash)){ |
foreach my $field (keys(%namehash)){ |
$form .= '<div id="'.$tid.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>'; |
$form .= '<div id="'.$tid.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>'; |
Line 3377 sub editing_js {
|
Line 3399 sub editing_js {
|
p_msp => 'Title for the Page', |
p_msp => 'Title for the Page', |
p_msb => 'Title for the Problem', |
p_msb => 'Title for the Problem', |
p_mdb => 'Title for the Drop Box', |
p_mdb => 'Title for the Drop Box', |
p_mbb => 'Title for the Bulletin Board', |
p_mbb => 'Title for the Discussion Board', |
p_mab => "Enter user:domain for User's 'About Me' Page", |
p_mab => "Enter user:domain for User's 'About Me' Page", |
p_mab2 => "About [_99]", |
p_mab2 => "About [_99]", |
p_mab_alrt1 => 'Not a valid user:domain', |
p_mab_alrt1 => 'Not a valid user:domain', |