version 1.382, 2009/07/27 20:35:40
|
version 1.383, 2009/08/13 12:29:04
|
Line 35 use Apache::Constants qw(:common :http);
|
Line 35 use Apache::Constants qw(:common :http);
|
use Apache::imsexport; |
use Apache::imsexport; |
use Apache::lonnet; |
use Apache::lonnet; |
use Apache::loncommon; |
use Apache::loncommon; |
|
use Apache::lonhtmlcommon; |
use LONCAPA::map(); |
use LONCAPA::map(); |
use Apache::lonratedt(); |
use Apache::lonratedt(); |
use Apache::lonxml; |
use Apache::lonxml; |
Line 119 sub dumpbutton {
|
Line 120 sub dumpbutton {
|
my $type = &Apache::loncommon::course_type(); |
my $type = &Apache::loncommon::course_type(); |
if ($home+$other==0) { return ''; } |
if ($home+$other==0) { return ''; } |
if ($home) { |
if ($home) { |
return '<input type="submit" name="dumpcourse" value="'. |
my $link = "<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"dumpcourse\", \"".&mt('Dump '.$type.' DOCS to Construction Space')."\")'>".&mt('Dump '.$type.' DOCS to Construction Space')."</a>"; |
&mt('Dump '.$type.' DOCS to Construction Space').'" />'. |
return $link.' '. |
&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').'<br />'; |
&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs').'<br />'; |
} else { |
} else { |
return '<div>'. |
return '<div>'. |
Line 262 sub dumpcourse {
|
Line 263 sub dumpcourse {
|
|
|
sub exportbutton { |
sub exportbutton { |
my $type = &Apache::loncommon::course_type(); |
my $type = &Apache::loncommon::course_type(); |
return '<input type="submit" name="exportcourse"' |
return "<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"exportcourse\", \"".&mt('IMS Export')."\")'>".&mt('IMS Export')."</a>". |
.' value="'.&mt('IMS Export').'"' |
|
.' title="'.&mt('Export '.$type.' to IMS Package').'" />'. |
|
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'<br />'; |
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'<br />'; |
} |
} |
|
|
Line 1643 sub editor {
|
Line 1642 sub editor {
|
.$output |
.$output |
.&Apache::loncommon::end_data_table() |
.&Apache::loncommon::end_data_table() |
) |
) |
} else { |
} |
|
unless($shown) { |
$r->print('<p class="LC_info">' |
$r->print('<p class="LC_info">' |
.&mt('Currently no documents.') |
.&mt('Currently no documents.') |
.'</p>' |
.'</p>' |
Line 2702 sub handler {
|
Line 2702 sub handler {
|
$allowed=0; |
$allowed=0; |
} |
} |
|
|
|
# subroutine to list form elements |
|
sub create_list_elements { |
|
my @formarr = @_; |
|
my $list = ''; |
|
for my $button (@formarr){ |
|
for my $picture(keys %$button) { |
|
#my $link = Apache::lonhtmlcommon::htmltag('a' ,$button->{$picture}, {href => "test"}); |
|
$list .= Apache::lonhtmlcommon::htmltag('li', $picture.' '.$button->{$picture}, {class => 'LC_menubuttons_inline_text'}); |
|
} |
|
} |
|
return $list; |
|
} |
|
|
|
# subroutine to create ul from list elements |
|
sub create_form_ul { |
|
my $list = shift; |
|
my $ul = Apache::lonhtmlcommon::htmltag('ul',$list, {class => 'LC_ListStyleNormal'}); |
|
return $ul; |
|
} |
|
|
# get course data |
# get course data |
my $coursenum=$env{'course.'.$env{'request.course.id'}.'.num'}; |
my $coursenum=$env{'course.'.$env{'request.course.id'}.'.num'}; |
my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'}; |
my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'}; |
Line 2871 FIUP
|
Line 2891 FIUP
|
</label> |
</label> |
CHBO |
CHBO |
|
|
|
my @fileuploada = ( |
|
{ pic01 => "<a onclick='document.uploaddocument.submit()'>$lt{'upld'}</a> $help{'Uploading_From_Harddrive'}" }, |
|
); |
my $fileuploadform=(<<FUFORM); |
my $fileuploadform=(<<FUFORM); |
<form name="uploaddocument" action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
<form name="uploaddocument" action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
<input type="hidden" name="active" value="aa" /> |
<input type="hidden" name="active" value="aa" /> |
Line 2884 CHBO
|
Line 2907 CHBO
|
<span class="LC_nobreak"> |
<span class="LC_nobreak"> |
$checkbox |
$checkbox |
</span> |
</span> |
<br /> |
FUFORM |
<br /> |
$fileuploadform .= create_form_ul(create_list_elements(@fileuploada)); |
<span class="LC_nobreak"> |
$fileuploadform .= (<<FUFORM); |
<input type="submit" value="$lt{'upld'}" /> |
|
$help{'Uploading_From_Harddrive'} |
|
</span> |
|
</form> |
</form> |
FUFORM |
FUFORM |
|
|
my $simpleeditdefaultform=(<<SEDFFORM); |
my $simpleeditdefaultform=(<<SEDFFORM); |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
<input type="hidden" name="active" value="bb" /> |
<input type="hidden" name="active" value="bb" /> |
$uploadtag |
SEDFFORM |
<input type="button" onclick="javascript:groupsearch()" value="$lt{'srch'}" /> |
my @simpleeditdefaultforma = ( |
<br /> |
{ pic03 => "$uploadtag<a onclick='javascript:groupsearch()'>$lt{'srch'}</a>" }, |
<span class="LC_nobreak"> |
{ pic04 => "<a onclick='javascript:groupimport();'>$lt{'impo'}</a>$help{'Importing_LON-CAPA_Resource'}" }, |
<input type="button" onclick="javascript:groupimport();" value="$lt{'impo'}" /> |
{ pic05 => "<a onclick='javascript:groupopen(0,1,1);'>$lt{'book'}</a>" }, |
$help{'Importing_LON-CAPA_Resource'} |
); |
</span> |
$simpleeditdefaultform .= create_form_ul(create_list_elements(@simpleeditdefaultforma)); |
<br /> |
$simpleeditdefaultform .=(<<SEDFFORM); |
<input type="button" onclick="javascript:groupopen(0,1,1);" value="$lt{'book'}" /> |
|
<hr /> |
<hr /> |
<p> |
<p> |
$lt{'copm'}<br /> |
$lt{'copm'}<br /> |
Line 2921 SEDFFORM
|
Line 2940 SEDFFORM
|
<form action="/adm/coursedocs" method="post" name="newext"> |
<form action="/adm/coursedocs" method="post" name="newext"> |
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makenewext('newext');">$lt{'extr'}</a>$help{'Adding_External_Resource'} |
<input name="newext" type="button" onclick="javascript:makenewext('newext');" |
|
value="$lt{'extr'}" /> $help{'Adding_External_Resource'} |
|
</span> |
|
</form> |
</form> |
ERFORM |
ERFORM |
|
|
Line 2964 ERFORM
|
Line 2980 ERFORM
|
HIDDENFORM |
HIDDENFORM |
} |
} |
# --------------------------------------------------------- Main tab structure |
# --------------------------------------------------------- Main tab structure |
|
|
my $activeClass = 1; |
my $activeClass = 1; |
my $active = ''; |
my $active = ''; |
|
|
$r->print('<ul class="LC_TabContentBigger" id="mainnav">'); |
$r->print('<ul class="LC_TabContentBigger" id="mainnav">'); |
if (($standard) && ($allowed) && (!$forcesupplement) && (($env{'form.folderpath'}=~/^default/) || $env{'form.folderpath'}eq"" || ($env{'form.pagepath'}))) { |
if (($standard) && ($allowed) && (!$forcesupplement) && (($env{'form.folderpath'}=~/^default/) || $env{'form.folderpath'}eq"" || ($env{'form.pagepath'}))) { |
if($activeClass == 1){ |
if($activeClass == 1){ |
Line 2973 HIDDENFORM
|
Line 2991 HIDDENFORM
|
$activeClass = 0; |
$activeClass = 0; |
} |
} |
} |
} |
|
if($env{'request.role'}=~/^cc/){ |
$r->print('<li '.$active.' onclick="javascript:showPage(this,\'mainCourseDocuments\',\'mainnav\',\'maincoursedoc\');"><a href="#"><b>'.&mt('Main Course Documents').'</b></a></li>'); |
$r->print('<li '.$active.' onclick="javascript:showPage(this,\'mainCourseDocuments\',\'mainnav\',\'maincoursedoc\');"><a href="#"><b>'.&mt('Main Course Documents').'</b></a></li>'); |
|
} |
$active = ''; |
$active = ''; |
if (!$forcestandard || ($env{'form.folderpath'}=~/^supplemental/)) { |
if (!$forcestandard || ($env{'form.folderpath'}=~/^supplemental/)) { |
if($activeClass == 1){ |
if($activeClass == 1){ |
Line 2990 HIDDENFORM
|
Line 3010 HIDDENFORM
|
if($activeClass == 0){ |
if($activeClass == 0){ |
$active = 'style="display: block;"'; |
$active = 'style="display: block;"'; |
} |
} |
|
if($env{'request.role'}=~/^cc/){ |
$r->print('<div class="LC_ContentBox" id="mainCourseDocuments" '.$active.'>'); |
$r->print('<div class="LC_ContentBox" id="mainCourseDocuments" '.$active.'>'); |
my $folder=$env{'form.folder'}; |
my $folder=$env{'form.folder'}; |
if ($folder eq '' || $folder=~/^supplemental/) { |
if ($folder eq '' || $folder=~/^supplemental/) { |
Line 3024 HIDDENFORM
|
Line 3045 HIDDENFORM
|
|
|
my $recoverform=(<<RFORM); |
my $recoverform=(<<RFORM); |
<form action="/adm/groupsort" method="post" name="recover"> |
<form action="/adm/groupsort" method="post" name="recover"> |
<input type="button" name="recovermap" onclick="javascript:groupopen('$readfile',1,0)" value="$lt{'reco'}" /> |
<a onclick="javascript:groupopen('$readfile',1,0)">$lt{'reco'}</a> |
</form> |
</form> |
RFORM |
RFORM |
|
|
my $imspform=(<<IMSPFORM); |
my $imspform=(<<IMSPFORM); |
<form action="/adm/imsimportdocs" method="post" name="ims"> |
<form action="/adm/imsimportdocs" method="post" name="ims"> |
<input type="hidden" name="folder" value="$folder" /> |
<input type="hidden" name="folder" value="$folder" /> |
<input name="imsimport" type="button" value="$lt{'imsf'}" title="$lt{imsl}" onclick="javascript:makeims();" /> |
<a onclick="javascript:makeims();">$lt{'imsf'}</a> |
</form> |
</form> |
IMSPFORM |
IMSPFORM |
|
|
Line 3041 IMSPFORM
|
Line 3062 IMSPFORM
|
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$lt{'navc'}=/adm/navmaps" /> |
value="$lt{'navc'}=/adm/navmaps" /> |
<span class="LC_nobreak"> |
<a onclick="document.newnav.submit()">$lt{'navc'}</a> |
<input name="newnav" type="submit" value="$lt{'navc'}" /> |
|
$help{'Navigate_Content'} |
$help{'Navigate_Content'} |
</span> |
|
</form> |
</form> |
NNFORM |
NNFORM |
my $newsmppageform=(<<NSPFORM); |
my $newsmppageform=(<<NSPFORM); |
Line 3052 NNFORM
|
Line 3071 NNFORM
|
<input type="hidden" name="active" value="cc" /> |
<input type="hidden" name="active" value="cc" /> |
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makesmppage();"> $lt{'sipa'}</a> |
<input name="newsmppg" type="button" value="$lt{'sipa'}" |
$help{'Simple Page'} |
onclick="javascript:makesmppage();" /> $help{'Simple Page'} |
|
</span> |
|
</form> |
</form> |
NSPFORM |
NSPFORM |
|
|
Line 3064 NSPFORM
|
Line 3081 NSPFORM
|
<input type="hidden" name="active" value="cc" /> |
<input type="hidden" name="active" value="cc" /> |
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makesmpproblem();">$lt{'sipr'}</a> |
<input name="newsmpproblem" type="button" value="$lt{'sipr'}" |
$help{'Simple Problem'} |
onclick="javascript:makesmpproblem();" />$help{'Simple Problem'} |
|
</span> |
|
</form> |
</form> |
|
|
NSPROBFORM |
NSPROBFORM |
Line 3077 NSPROBFORM
|
Line 3092 NSPROBFORM
|
<input type="hidden" name="active" value="cc" /> |
<input type="hidden" name="active" value="cc" /> |
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makedropbox();">$lt{'drbx'}</a> |
<input name="newdropbox" type="button" value="$lt{'drbx'}" |
|
onclick="javascript:makedropbox();" /> |
|
</span> |
|
</form> |
</form> |
NDBFORM |
NDBFORM |
|
|
Line 3089 NDBFORM
|
Line 3101 NDBFORM
|
<input type="hidden" name="active" value="cc" /> |
<input type="hidden" name="active" value="cc" /> |
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makeexamupload();">$lt{'scuf'}</a> |
<input name="newexamupload" type="button" value="$lt{'scuf'}" |
|
onclick="javascript:makeexamupload();" /> |
|
$help{'Score_Upload_Form'} |
$help{'Score_Upload_Form'} |
</span> |
|
</form> |
</form> |
NEXUFORM |
NEXUFORM |
|
|
Line 3102 NEXUFORM
|
Line 3111 NEXUFORM
|
<input type="hidden" name="active" value="cc" /> |
<input type="hidden" name="active" value="cc" /> |
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makebulboard();" >$lt{'bull'}</a> |
<input name="newbulletin" type="button" value="$lt{'bull'}" |
|
onclick="javascript:makebulboard();" /> |
|
$help{'Bulletin Board'} |
$help{'Bulletin Board'} |
</span> |
|
</form> |
</form> |
NBFORM |
NBFORM |
|
|
Line 3116 NBFORM
|
Line 3122 NBFORM
|
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
<span class="LC_nobreak"> |
<a onclick="document.newaboutme.submit()">$lt{'mypi'}</a> |
<input name="newaboutme" type="submit" value="$lt{'mypi'}" /> |
|
$help{'My Personal Information Page'} |
$help{'My Personal Information Page'} |
</span> |
|
</form> |
</form> |
NAMFORM |
NAMFORM |
|
|
Line 3128 NAMFORM
|
Line 3132 NAMFORM
|
<input type="hidden" name="active" value="cc" /> |
<input type="hidden" name="active" value="cc" /> |
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makeabout();">$lt{'abou'}</a> |
<input name="newaboutsomeone" type="button" value="$lt{'abou'}" |
|
onclick="javascript:makeabout();" /> |
|
</span> |
|
</form> |
</form> |
NASOFORM |
NASOFORM |
|
|
Line 3142 NASOFORM
|
Line 3143 NASOFORM
|
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$lt{'rost'}=/adm/viewclasslist" /> |
value="$lt{'rost'}=/adm/viewclasslist" /> |
<span class="LC_nobreak"> |
<a onclick="document.newroster.submit()">$lt{'rost'}</a> |
<input name="newroster" type="submit" value="$lt{'rost'}" /> |
|
$help{'Course Roster'} |
$help{'Course Roster'} |
</span> |
|
</form> |
</form> |
NROSTFORM |
NROSTFORM |
|
|
my $specialdocumentsform; |
my $specialdocumentsform; |
|
my @specialdocumentsforma; |
my $newfolderform; |
my $newfolderform; |
|
|
unless ($env{'form.pagepath'}) { |
unless ($env{'form.pagepath'}) { |
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
|
|
my $newpageform=(<<NPFORM); |
my $newpageform=(<<NPFORM); |
<form action="/adm/coursedocs" method="post" name="newpage"> |
<form action="/adm/coursedocs" method="post" name="newpage"> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="active" value="cc" /> |
<input type="hidden" name="active" value="cc" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makenewpage(document.newpage,'$pageseq');">$lt{'newp'}</a> |
<input name="newpage" type="button" |
$help{'Adding_Pages'} |
onclick="javascript:makenewpage(this.form,'$pageseq');" |
|
value="$lt{'newp'}" />$help{'Adding_Pages'} |
|
</span> |
|
</form> |
</form> |
NPFORM |
NPFORM |
|
|
$newfolderform=(<<NFFORM); |
$newfolderform=(<<NFFORM); |
<form action="/adm/coursedocs" method="post" name="newfolder"> |
<form action="/adm/coursedocs" method="post" name="newfolder"> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="active" value="aa" /> |
<input type="hidden" name="active" value="aa" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makenewfolder(document.newfolder,'$folderseq');">$lt{'newf'}</a>$help{'Adding_Folders'} |
<input name="newfolder" type="button" |
|
onclick="javascript:makenewfolder(this.form,'$folderseq');" |
|
value="$lt{'newf'}" />$help{'Adding_Folders'} |
|
</span> |
|
</form> |
</form> |
NFFORM |
NFFORM |
|
my @newfolderforma= ( |
|
{ pic02 => "$newfolderform" } |
|
); |
|
|
|
|
|
$newfolderform = create_form_ul(create_list_elements(@newfolderforma)); |
|
|
my $newsylform=(<<NSYLFORM); |
my $newsylform=(<<NSYLFORM); |
<form action="/adm/coursedocs" method="post" name="newsyl"> |
<form action="/adm/coursedocs" method="post" name="newsyl"> |
Line 3187 NFFORM
|
Line 3186 NFFORM
|
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" /> |
value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" /> |
<span class="LC_nobreak"> |
<a onclick="document.newsyl.submit()">$lt{'syll'}</a> |
<input name="newsyl" type="submit" value="$lt{'syll'}" /> |
|
$help{'Syllabus'} |
$help{'Syllabus'} |
</span> |
|
</form> |
</form> |
NSYLFORM |
NSYLFORM |
|
|
Line 3200 NSYLFORM
|
Line 3198 NSYLFORM
|
$uploadtag |
$uploadtag |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" /> |
value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" /> |
<span class="LC_nobreak"> |
<a onclick="document.newgroupfiles.submit()">$lt{'grpo'}</a> |
<input name="newgroupfiles" type="submit" value="$lt{'grpo'}" /> |
|
$help{'Group Portfolio'} |
$help{'Group Portfolio'} |
</span> |
|
</form> |
</form> |
NGFFORM |
NGFFORM |
|
@specialdocumentsforma=( |
$specialdocumentsform="<br />$newpageform<br />$newsylform<br />$newgroupfileform"; |
{pic06=>$newpageform}, |
|
{pic07=>$newsylform}, |
|
{pic08=>$newgroupfileform}, |
|
); |
|
|
} |
} |
$specialdocumentsform.="<br />$newnavform<br />$newsmppageform |
push @specialdocumentsforma, ({pic09=>$newnavform}, |
<br />$newsmpproblemform<br />$newdropboxform |
{pic10=>$newsmppageform}, |
<br />$newexuploadform<br />$newbulform |
{pic11=>$newsmpproblemform}, |
<br />$newaboutmeform<br />$newaboutsomeoneform |
{pic12=>$newdropboxform}, |
<br />$newrosterform"; |
{pic13=>$newexuploadform}, |
|
{pic14=>$newbulform}, |
|
{pic15=>$newaboutmeform}, |
|
{pic16=>$newaboutsomeoneform}, |
|
{pic17=>$newrosterform},); |
|
|
|
$specialdocumentsform = create_form_ul(create_list_elements(@specialdocumentsforma)); |
|
|
if($env{'form.pagepath'}) { |
if($env{'form.pagepath'}) { |
$specialdocumentsform="<br />$newsmpproblemform<br />$newexuploadform"; |
|
|
@specialdocumentsforma=( |
|
{pic32=>$newsmpproblemform}, |
|
{pic33=>$newexuploadform} |
|
); |
|
$specialdocumentsform= create_form_ul(create_list_elements(@specialdocumentsforma)); |
} |
} |
|
|
|
my @tools = ( |
|
{pic18=>$extresourcesform}, |
|
{pic19=>$imspform}, |
|
{pic20=>$recoverform}, |
|
); |
|
|
my %orderhash = ( |
my %orderhash = ( |
'aa' => ['Upload Document',$fileuploadform.'<br />'.$newfolderform], |
'aa' => ['Upload Document',$fileuploadform.''.$newfolderform], |
'bb' => ['Published Resources',$simpleeditdefaultform], |
'bb' => ['Published Resources',$simpleeditdefaultform], |
'cc' => ['Special Documents',$specialdocumentsform], |
'cc' => ['Special Documents',$specialdocumentsform], |
'dd' => ['Tools',$extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env)], |
'dd' => ['Tools', create_form_ul(create_list_elements(@tools)).&generate_admin_options($containertag,$uploadtag,\%help,\%env)], |
'zz' => ['Hide'], |
'zz' => ['Hide'], |
); |
); |
my $tid='1'; |
my $tid='1'; |
Line 3241 $r->print(&generate_edit_table($tid,$var
|
Line 3259 $r->print(&generate_edit_table($tid,$var
|
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', |
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', |
&mt('Editing the Table of Contents for your '.$type))); |
&mt('Editing the Table of Contents for your '.$type))); |
$r->print('</div>'); |
$r->print('</div>'); |
|
} |
if ($env{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
} |
} |
# ----------------------------------------------------- Supplemental documents |
# ----------------------------------------------------- Supplemental documents |
Line 3268 $r->print('</div>');
|
Line 3287 $r->print('</div>');
|
|
|
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
|
|
|
my @supupdocform = ( |
|
{pic27=>"<a onclick='document.supuploaddocument.submit()'>$lt{'upld'}</a>$help{'Uploading_From_Harddrive'}"}, |
|
); |
my $supupdocform=(<<SUPDOCFORM); |
my $supupdocform=(<<SUPDOCFORM); |
<form action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
<form action="/adm/coursedocs" method="post" name="supuploaddocument" enctype="multipart/form-data"> |
<input type="hidden" name="active" value="ee" /> |
<input type="hidden" name="active" value="ee" /> |
$fileupload |
$fileupload |
<br /> |
<br /> |
Line 3279 $r->print('</div>');
|
Line 3301 $r->print('</div>');
|
</span> |
</span> |
<br /><br /> |
<br /><br /> |
$lt{'comment'}:<br /> |
$lt{'comment'}:<br /> |
<textarea cols="50" rows="4" name="comment"> |
<textarea cols="50" rows="4" name="comment"></textarea> |
</textarea> |
|
<br /> |
<br /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="cmd" value="upload_supplemental" /> |
<input type="hidden" name="cmd" value="upload_supplemental" /> |
<span class="LC_nobreak"> |
|
<input type="submit" value="$lt{'upld'}" /> |
|
$help{'Uploading_From_Harddrive'} |
|
</span> |
|
</form> |
|
SUPDOCFORM |
SUPDOCFORM |
|
$supupdocform .= create_form_ul(create_list_elements(@supupdocform))."</form>"; |
|
|
my $supnewfolderform=(<<SNFFORM); |
my $supnewfolderform=(<<SNFFORM); |
<form action="/adm/coursedocs" method="post" name="supnewfolder"> |
<form action="/adm/coursedocs" method="post" name="supnewfolder"> |
<input type="hidden" name="active" value="ee" /> |
<input type="hidden" name="active" value="ee" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makenewfolder(document.supnewfolder,'$folderseq');">$lt{'newf'}</a> |
<input name="newfolder" type="button" |
$help{'Adding_Folders'} |
onclick="javascript:makenewfolder(this.form,'$folderseq');" |
|
value="$lt{'newf'}" /> $help{'Adding_Folders'} |
|
</span> |
|
</form> |
</form> |
SNFFORM |
SNFFORM |
|
|
|
my @supnewfolderforma = ({pic28=>$supnewfolderform}); |
|
$supnewfolderform = create_form_ul(create_list_elements(@supnewfolderforma)); |
|
|
|
|
my $supnewextform=(<<SNEFORM); |
my $supnewextform=(<<SNEFORM); |
Line 3310 SNFFORM
|
Line 3327 SNFFORM
|
<input type="hidden" name="active" value="ff" /> |
<input type="hidden" name="active" value="ff" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="importdetail" value="" /> |
<span class="LC_nobreak"> |
<a onclick="javascript:makenewext('supnewext');">$lt{'extr'}</a> $help{'Adding_External_Resource'} |
<input name="newext" type="button" |
|
onclick="javascript:makenewext('supnewext');" |
|
value="$lt{'extr'}" /> $help{'Adding_External_Resource'} |
|
</span> |
|
</form> |
</form> |
SNEFORM |
SNEFORM |
|
|
Line 3324 SNEFORM
|
Line 3337 SNEFORM
|
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="Syllabus=/public/$coursedom/$coursenum/syllabus" /> |
value="Syllabus=/public/$coursedom/$coursenum/syllabus" /> |
<span class="LC_nobreak"> |
<a onclick="document.supnewsyl.submit()">$lt{'syll'}</a> |
<input name="newsyl" type="submit" value="$lt{'syll'}" /> |
|
$help{'Syllabus'} |
$help{'Syllabus'} |
</span> |
|
</form> |
</form> |
SNSFORM |
SNSFORM |
|
|
my $supnewaboutmeform=(<<SNAMFORM); |
my $supnewaboutmeform=(<<SNAMFORM); |
<form action="/adm/coursedocs" method="post" name="subnewaboutme"> |
<form action="/adm/coursedocs" method="post" name="supnewaboutme"> |
<input type="hidden" name="active" value="ff" /> |
<input type="hidden" name="active" value="ff" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<input type="hidden" name="importdetail" |
<input type="hidden" name="importdetail" |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
<span class="LC_nobreak"> |
<a onclick="document.supnewaboutme.submit()">$lt{'mypi'}</a> |
<input name="newaboutme" type="submit" value="$lt{'mypi'}" /> |
|
$help{'My Personal Information Page'} |
$help{'My Personal Information Page'} |
</span> |
|
</form> |
</form> |
SNAMFORM |
SNAMFORM |
|
|
|
|
|
my @specialdocs = ( |
|
{pic29=>$supnewextform}, |
|
{pic30=>$supnewsylform}, |
|
{pic31=>$supnewaboutmeform}, |
|
); |
my %suporderhash = ( |
my %suporderhash = ( |
'ee' => ['Upload Document',$supupdocform.'<br />'.$supnewfolderform], |
'ee' => ['Upload Document',$supupdocform.' '.$supnewfolderform], |
'ff' => ['Special Documents',$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform], |
'ff' => ['Special Documents',create_form_ul(create_list_elements(@specialdocs))], |
'zz' => ['Hide'], |
'zz' => ['Hide'], |
); |
); |
|
|
Line 3356 my $tid='2';
|
Line 3369 my $tid='2';
|
my $varscd = 'Supplemental Course Documents'; |
my $varscd = 'Supplemental Course Documents'; |
|
|
$r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); |
$r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); |
|
} |
|
|
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
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>'); |
} |
} |
$r->print('</div>'); |
|
} |
|
$r->print('</div>'); |
$r->print('</div>'); |
|
$r->print('</div></div>'); |
|
|
|
|
if ($allowed) { |
if ($allowed) { |
$r->print(' |
$r->print(' |
<form method="post" name="extimport" action="/adm/coursedocs"> |
<form method="post" name="extimport" action="/adm/coursedocs"> |
Line 3398 sub generate_admin_options {
|
Line 3414 sub generate_admin_options {
|
my %env = %{$env_ref}; |
my %env = %{$env_ref}; |
my $dumpbut=&dumpbutton(); |
my $dumpbut=&dumpbutton(); |
my $exportbut=&exportbutton(); |
my $exportbut=&exportbutton(); |
return (<<ENDOPTIONFORM); |
my @list = ( |
<form action="/adm/coursedocs" method="post" name="courseverify"> |
{pic21=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"verify\", \"$lt{'vc'}\")'>$lt{'vc'}</a>$help{'Verify_Content'}"}, |
<input type="submit" name="verify" value="$lt{'vc'}" />$help{'Verify_Content'}<br /> |
{pic22=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"versions\", \"$lt{'cv'}\")'>$lt{'cv'}</a>$help{'Check_Resource_Versions'}"}, |
<input type="submit" name="versions" value="$lt{'cv'}" />$help{'Check_Resource_Versions'}<br /> |
); |
$dumpbut |
if($dumpbut ne ''){ |
$exportbut |
push @list, {pic23=>$dumpbut}; |
<input type="submit" name="listsymbs" value="$lt{'ls'}" /> |
} |
<input type="hidden" name="folder" value="$env{'form.folder'}" /><br /> |
push @list, ({pic24=>$exportbut}, |
<input type="submit" name="docslog" value="$lt{'sl'}" /> |
{pic25=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"listsymbs\", \"$lt{'ls'}\")'>$lt{'ls'}</a><input type='hidden' name='folder' value='$env{'form.folder'}' />"}, |
</form> |
{pic26=>"<a onclick='javascript:injectData(document.courseverify, \"dummy\", \"docslog\", \"$lt{'sl'}\")'>$lt{'sl'}</a>"}, |
ENDOPTIONFORM |
); |
|
return '<form action="/adm/coursedocs" method="post" name="courseverify"><input type="hidden" id="dummy" />'.create_form_ul(create_list_elements(@list)).'</form>'; |
|
|
} |
} |
|
|
Line 3691 for (i = 0; i < currentDivs.length; i++)
|
Line 3708 for (i = 0; i < currentDivs.length; i++)
|
|
|
function openTabs(pageId) { |
function openTabs(pageId) { |
tabnav = document.getElementById(pageId).getElementsByTagName('UL'); |
tabnav = document.getElementById(pageId).getElementsByTagName('UL'); |
if(tabnav.length > 0 ){ |
if(tabnav.length > 2 ){ |
currentNav = document.getElementById(tabnav[0].id); |
currentNav = document.getElementById(tabnav[0].id); |
currentLis = currentNav.getElementsByTagName('LI'); |
currentLis = currentNav.getElementsByTagName('LI'); |
for(i = 0; i< currentLis.length; i++){ |
for(i = 0; i< currentLis.length; i++){ |
Line 3715 function showPage(current, pageId, nav,
|
Line 3732 function showPage(current, pageId, nav,
|
return false; |
return false; |
} |
} |
|
|
|
function injectData(current, hiddenField, name, value) { |
|
currentElement = document.getElementById(hiddenField); |
|
currentElement.name = name; |
|
currentElement.value = value; |
|
current.submit(); |
|
} |
|
|
ENDNEWSCRIPT |
ENDNEWSCRIPT |
} |
} |
1; |
1; |