version 1.325.4.2, 2009/09/24 22:15:27
|
version 1.335, 2009/02/03 18:31:59
|
Line 44 use HTML::Entities;
|
Line 44 use HTML::Entities;
|
use GDBM_File; |
use GDBM_File; |
use Apache::lonlocal; |
use Apache::lonlocal; |
use Cwd; |
use Cwd; |
use Apache::londocsgci(); |
|
use LONCAPA qw(:DEFAULT :match); |
use LONCAPA qw(:DEFAULT :match); |
|
|
my $iconpath; |
my $iconpath; |
Line 60 my $hadchanges;
|
Line 59 my $hadchanges;
|
my %help=(); |
my %help=(); |
|
|
|
|
|
|
sub mapread { |
sub mapread { |
my ($coursenum,$coursedom,$map)=@_; |
my ($coursenum,$coursedom,$map)=@_; |
return |
return |
Line 121 sub dumpbutton {
|
Line 119 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 '<div>'. |
return '<input type="submit" name="dumpcourse" value="'. |
'<input type="submit" name="dumpcourse" value="'. |
|
&mt('Dump '.$type.' DOCS to Construction Space').'" />'. |
&mt('Dump '.$type.' DOCS to Construction Space').'" />'. |
&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'). |
&Apache::loncommon::help_open_topic('Docs_Dump_Course_Docs'); |
'</div>'; |
|
} else { |
} else { |
return '<div>'. |
return '<div>'. |
&mt('Dump '.$type. |
&mt('Dump '.$type. |
Line 266 sub dumpcourse {
|
Line 262 sub dumpcourse {
|
|
|
sub exportbutton { |
sub exportbutton { |
my $type = &Apache::loncommon::course_type(); |
my $type = &Apache::loncommon::course_type(); |
return '<div>'. |
return '<input type="submit" name="exportcourse" value="'. |
'<input type="submit" name="exportcourse" value="'. |
|
&mt('Export '.$type.' to IMS').'" />'. |
&mt('Export '.$type.' to IMS').'" />'. |
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs').'</div>'; |
&Apache::loncommon::help_open_topic('Docs_Export_Course_Docs'); |
} |
} |
|
|
|
|
Line 402 sub exportcourse {
|
Line 397 sub exportcourse {
|
$display .= '<img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" /><img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" />'."\n"; |
$display .= '<img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" /><img src="/adm/lonIcons/whitespace1.gif" class="LC_docs_spacer" />'."\n"; |
} |
} |
if ($curRes->is_sequence()) { |
if ($curRes->is_sequence()) { |
$display .= '<img src="/adm/lonIcons/navmap.folder.open.gif" alt="" /> '."\n"; |
$display .= '<img src="/adm/lonIcons/navmap.folder.open.gif"> '."\n"; |
$lastcontainer = $count + $startcount + $boards; |
$lastcontainer = $count + $startcount + $boards; |
} elsif ($curRes->is_page()) { |
} elsif ($curRes->is_page()) { |
$display .= '<img src="/adm/lonIcons/navmap.page.open.gif" alt="" /> '."\n"; |
$display .= '<img src="/adm/lonIcons/navmap.page.open.gif"> '."\n"; |
$lastcontainer = $count + $startcount + $boards; |
$lastcontainer = $count + $startcount + $boards; |
} |
} |
my $currelem = $count+$boards+$startcount; |
my $currelem = $count+$boards+$startcount; |
Line 479 function containerCheck(item) {
|
Line 474 function containerCheck(item) {
|
$scripttag)); |
$scripttag)); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Export '.lc($type).' to IMS content package')); |
$r->print($display.'</table>'. |
$r->print($display.'</table>'. |
'<p><input type="hidden" name="finishexport" value="1" />'. |
'<p><input type="hidden" name="finishexport" value="1">'. |
'<input type="submit" name="exportcourse" value="'. |
'<input type="submit" name="exportcourse" value="'. |
&mt('Export '.$type.' DOCS').'" /></p></form>'); |
&mt('Export '.$type.' DOCS').'" /></p></form>'); |
} |
} |
Line 1228 sub update_paste_buffer {
|
Line 1223 sub update_paste_buffer {
|
&Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title}); |
&Apache::lonnet::appenv({'docs.markedcopy_supplemental' => $title}); |
($title) = &parse_supplemental_title($title); |
($title) = &parse_supplemental_title($title); |
} elsif ($env{'docs.markedcopy_supplemental'}) { |
} elsif ($env{'docs.markedcopy_supplemental'}) { |
&Apache::lonnet::delenv('docs.markedcopy_supplemental'); |
&Apache::lonnet::delenv('docs\\.markedcopy_supplemental'); |
} |
} |
$url=~s{http(:|:)//https(:|:)//}{https$2//}; |
$url=~s{http(:|:)//https(:|:)//}{https$2//}; |
|
|
Line 1332 sub do_paste_from_buffer {
|
Line 1327 sub do_paste_from_buffer {
|
} |
} |
# published maps can only exists once, so remove it from paste buffer when done |
# published maps can only exists once, so remove it from paste buffer when done |
if (($url=~/\.(page|sequence)$/) && ($url=~m {^/res/})) { |
if (($url=~/\.(page|sequence)$/) && ($url=~m {^/res/})) { |
&Apache::lonnet::delenv('docs.markedcopy'); |
&Apache::lonnet::delenv('docs\\.markedcopy'); |
} |
} |
if ($url=~ m{/smppg$}) { |
if ($url=~ m{/smppg$}) { |
my $db_name = &Apache::lonsimplepage::get_db_name($url); |
my $db_name = &Apache::lonsimplepage::get_db_name($url); |
Line 1780 sub entryline {
|
Line 1775 sub entryline {
|
'<select name="newpos" onChange="this.form.submit()">'; |
'<select name="newpos" onChange="this.form.submit()">'; |
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="1">('.$i.')</option>'; |
} else { |
} else { |
$selectbox.='<option value="'.$i.'">'.$i.'</option>'; |
$selectbox.='<option value="'.$i.'">'.$i.'</option>'; |
} |
} |
Line 1904 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 2005 END
|
Line 1999 END
|
'hd' => 'Hidden', |
'hd' => 'Hidden', |
'ec' => 'URL hidden'); |
'ec' => 'URL hidden'); |
my $enctext= |
my $enctext= |
((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i?' checked="checked"':''); |
((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i?' checked="1"':''); |
my $hidtext= |
my $hidtext= |
((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="checked"':''); |
((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="1"':''); |
$line.=(<<ENDPARMS); |
$line.=(<<ENDPARMS); |
<td class="LC_docs_entry_parameter"> |
<td class="LC_docs_entry_parameter"> |
$form_start |
$form_start |
Line 2099 sub checkonthis {
|
Line 2093 sub checkonthis {
|
if (($errorcount) || |
if (($errorcount) || |
($warningcount)) { |
($warningcount)) { |
if ($errorcount) { |
if ($errorcount) { |
$r->print('<img src="/adm/lonMisc/bomb.gif" alt="" /><span class="LC_error">'. |
$r->print('<img src="/adm/lonMisc/bomb.gif" /><span class="LC_error">'. |
&mt('[quant,_1,error]',$errorcount).'</span>'); |
&mt('[quant,_1,error]',$errorcount).'</span>'); |
} |
} |
if ($warningcount) { |
if ($warningcount) { |
Line 2124 sub checkonthis {
|
Line 2118 sub checkonthis {
|
unless ($url=~/\$/) { |
unless ($url=~/\$/) { |
$r->print('<span class="LC_error">'.&mt('not found').'</b></span>'); |
$r->print('<span class="LC_error">'.&mt('not found').'</b></span>'); |
} else { |
} else { |
$r->print('<span class="LC_error">'.&mt('unable to verify variable URL').'</span>'); |
$r->print('<span class="LC_unknown">'.&mt('unable to verify variable URL').'</span>'); |
} |
} |
} else { |
} else { |
$r->print('<span class="LC_error">'.&mt('access denied').'</span>'); |
$r->print('<span class="LC_error">'.&mt('access denied').'</span>'); |
Line 2524 sub handler {
|
Line 2518 sub handler {
|
return OK if $r->header_only; |
return OK if $r->header_only; |
my $type = &Apache::loncommon::course_type(); |
my $type = &Apache::loncommon::course_type(); |
|
|
my $coursedom=$env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
if ($coursedom eq 'gcitest') { |
|
my $allowed=&Apache::lonnet::allowed('mdc',$env{'request.course.id'}); |
|
if ($allowed) { |
|
&concept_test_builder($r); |
|
return OK; |
|
} |
|
} |
|
|
|
# --------------------------------------------- Initialize help topics for this |
# --------------------------------------------- Initialize help topics for this |
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents', |
foreach my $topic ('Adding_Course_Doc','Main_Course_Documents', |
Line 2586 sub handler {
|
Line 2572 sub handler {
|
my $showdoc=0; |
my $showdoc=0; |
my $containertag; |
my $containertag; |
my $uploadtag; |
my $uploadtag; |
|
|
|
|
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['folderpath','pagepath', |
['folderpath','pagepath', |
'pagesymb']); |
'pagesymb']); |
Line 2758 sub handler {
|
Line 2746 sub handler {
|
'uplm' => 'Upload a new main '.lc($type).' document', |
'uplm' => 'Upload a new main '.lc($type).' document', |
'upls' => 'Upload a new supplemental '.lc($type).' document', |
'upls' => 'Upload a new supplemental '.lc($type).' document', |
'impp' => 'Import a document', |
'impp' => 'Import a document', |
'pubd' => 'Published documents', |
'pubd' => 'Published Documents', |
'copm' => 'All documents out of a published map into this folder', |
'copm' => 'All documents out of a published map into this folder', |
'spec' => 'Special documents', |
|
'upld' => 'Upload Document', |
'upld' => 'Upload Document', |
'srch' => 'Search', |
'srch' => 'Search', |
'impo' => 'Import', |
'impo' => 'Import', |
Line 2773 sub handler {
|
Line 2760 sub handler {
|
'extr' => 'External Resource', |
'extr' => 'External Resource', |
'syll' => 'Syllabus', |
'syll' => 'Syllabus', |
'navc' => 'Navigate Contents', |
'navc' => 'Navigate Contents', |
'sipa' => 'Simple Course Page', |
'sipa' => 'Simple Page', |
'sipr' => 'Simple Problem', |
'sipr' => 'Simple Problem', |
'drbx' => 'Drop Box', |
'drbx' => 'Drop Box', |
'scuf' => 'Score Upload Form', |
'scuf' => 'Score Upload Form', |
'bull' => 'Discussion Board', |
'bull' => 'Bulletin Board', |
'mypi' => 'My Personal Information Page', |
'mypi' => 'My Personal Info', |
'grpo' => 'Group Portfolios', |
'grpo' => 'Group Files', |
'rost' => 'Course Roster', |
'rost' => 'Course Roster', |
'abou' => 'About User', |
'abou' => 'About User', |
'imsf' => 'Import IMS package', |
'imsf' => 'Import IMS package', |
'file' => 'File', |
'file' => 'File', |
'title' => 'Title', |
'title' => 'Title', |
'comment' => 'Comment', |
'comment' => 'Comment', |
'parse' => 'If HTML file, upload embedded images/multimedia files' |
'parse' => 'Upload embedded images/multimedia files if HTML file!', |
|
'nd' => 'New Document', |
|
'pm' => 'Published Map', |
|
'sd' => 'Special Document', |
|
'mo' => 'More Options', |
|
'hao' => 'Hide all Options' |
); |
); |
# ----------------------------------------------------------------------------- |
# ----------------------------------------------------------------------------- |
|
my $fileupload=(<<FIUP); |
|
$lt{'file'}:<br /> |
|
<input type="file" name="uploaddoc" size="40" /> |
|
FIUP |
|
|
|
my $checkbox=(<<CHBO); |
|
<!-- <label>$lt{'parse'}? |
|
<input type="checkbox" name="parserflag" /> |
|
</label> --> |
|
<label> |
|
<input type="checkbox" name="parserflag" checked="checked" /> $lt{'parse'} |
|
</label> |
|
CHBO |
|
|
|
my $fileuploadform=(<<FUFORM); |
|
<form name="uploaddocument" action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
|
$fileupload |
|
<br /> |
|
$lt{'title'}:<br /> |
|
<input type="text" size="50" name="comment" /> |
|
$uploadtag |
|
<input type="hidden" name="cmd" value="upload_default" /> |
|
<br /> |
|
<span class="LC_nobreak"> |
|
$checkbox |
|
</span> |
|
<br /> |
|
<br /> |
|
<span class="LC_nobreak"> |
|
<input type="submit" value="$lt{'upld'}" /> |
|
$help{'Uploading_From_Harddrive'} |
|
</span> |
|
</form> |
|
FUFORM |
|
|
|
my $simpleeditdefaultform=(<<SEDFFORM); |
|
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
|
$lt{'pubd'}<br /> |
|
$uploadtag |
|
<input type="button" onClick="javascript:groupsearch()" value="$lt{'srch'}" /> |
|
<br /> |
|
<span class="LC_nobreak"> |
|
<input type="button" onClick="javascript:groupimport();" value="$lt{'impo'}" /> |
|
$help{'Importing_LON-CAPA_Resource'} |
|
</span> |
|
<br /> |
|
<input type="button" onClick="javascript:groupopen(0,1,1);" value="$lt{'book'}" /> |
|
<hr /> |
|
<p> |
|
$lt{'copm'}<br /> |
|
<input type="text" size="40" name="importmap" /><br /> |
|
<span class="LC_nobreak"><input type="button" |
|
onClick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')" |
|
value="$lt{'selm'}" /> <input type="submit" name="loadmap" value="$lt{'load'}" /> |
|
$help{'Load_Map'}</span> |
|
</p> |
|
</form> |
|
SEDFFORM |
|
|
|
my $extresourcesform=(<<ERFORM); |
|
<form action="/adm/coursedocs" method="post" name="newext"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" value="" /> |
|
<span class="LC_nobreak"> |
|
<input name="newext" type="button" onClick="javascript:makenewext('newext');" |
|
value="$lt{'extr'}" /> $help{'Adding_External_Resource'} |
|
</span> |
|
</form> |
|
ERFORM |
|
|
if ($allowed) { |
if ($allowed) { |
&update_paste_buffer($coursenum,$coursedom); |
&update_paste_buffer($coursenum,$coursedom); |
my $dumpbut=&dumpbutton(); |
|
my $exportbut=&exportbutton(); |
|
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'vc' => 'Verify Content', |
'vc' => 'Verify Content', |
'cv' => 'Check/Set Resource Versions', |
'cv' => 'Check/Set Resource Versions', |
Line 2813 sub handler {
|
Line 2873 sub handler {
|
$uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
$uploadtag = '<input type="hidden" name="folderpath" value="'.&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
} |
} |
|
|
$r->print(<<ENDCOURSEVERIFY); |
$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> |
|
<form action="/adm/coursedocs" method="post" name="courseverify"> |
|
<div class="LC_docs_course_commands"> |
|
|
|
<div> |
|
<input type="submit" name="verify" value="$lt{'vc'}" />$help{'Verify_Content'} |
|
</div> |
|
<div> |
|
<input type="submit" name="versions" value="$lt{'cv'}" />$help{'Check_Resource_Versions'} |
|
</div> |
|
$dumpbut |
|
$exportbut |
|
<div> |
|
<input type="submit" name="listsymbs" value="$lt{'ls'}" /> |
|
</div> |
|
<div> |
|
<input type="hidden" name="folder" value="$env{'form.folder'}" /> |
|
<input type="submit" name="docslog" value="$lt{'sl'}" /> |
|
</div> |
|
</div> |
|
</form> |
|
<div style="clear: both; height: 0px;"> </div> |
|
ENDCOURSEVERIFY |
|
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', |
|
&mt('Editing the Table of Contents for your '.$type))); |
|
} |
} |
|
# --------------------------------------------------------- Main tab structure |
|
my $activeClass = 1; |
|
$r->print('<div class="LC_ContentBoxSpecial"><ul class="LC_TabContent" id="mainnav">'); |
|
if (($standard) && ($allowed) && (!$forcesupplement)) { |
|
my $active = ''; |
|
if($activeClass == 1){ |
|
$active = 'class="active"'; |
|
$activeClass = 0; |
|
} |
|
$r->print('<li '.$active.'onclick="javascript:showPage(this,\'Main Course Documents\',\'mainnav\',\'maincoursedoc\');">'.&mt('Main Course Documents').'</li>'); |
|
} |
|
if (!$forcestandard) { |
|
my $active = ''; |
|
if($activeClass == 1){ |
|
$active = 'class="active"'; |
|
} |
|
$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;">'); |
# --------------------------------------------------------- Standard documents |
# --------------------------------------------------------- Standard documents |
$r->print('<table class="LC_docs_documents">'); |
|
|
|
if (($standard) && ($allowed) && (!$forcesupplement)) { |
if (($standard) && ($allowed) && (!$forcesupplement)) { |
$r->print('<tr><td class="LC_docs_document">'); |
my $active = 'style="display: none;"'; |
# '<h2>'.&mt('Main Course Documents'). |
if($activeClass == 0){ |
# ($allowed?' '.$help{'Main_Course_Documents'}:'').'</h2>'); |
$active = 'style="display: block;"'; |
|
} |
|
$r->print('<div class="LC_ContentBox" id="Main Course Documents" '.$active.'>'); |
|
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', |
|
&mt('Editing the Table of Contents for your '.$type))); |
my $folder=$env{'form.folder'}; |
my $folder=$env{'form.folder'}; |
if ($folder eq '' || $folder eq 'supplemental') { |
if ($folder eq '' || $folder eq 'supplemental') { |
$folder='default'; |
$folder='default'; |
Line 2871 ENDCOURSEVERIFY
|
Line 2917 ENDCOURSEVERIFY
|
#$postexec='self.close();'; |
#$postexec='self.close();'; |
} |
} |
$hadchanges=0; |
$hadchanges=0; |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed, |
|
$upload_output,$type); |
|
if ($error) { |
|
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
|
} |
|
if ($hadchanges) { |
if ($hadchanges) { |
&mark_hash_old(); |
&mark_hash_old(); |
} |
} |
Line 2889 ENDCOURSEVERIFY
|
Line 2930 ENDCOURSEVERIFY
|
$container='page'; |
$container='page'; |
} |
} |
my $readfile='/uploaded/'.$coursedom.'/'.$coursenum.'/'.$folder.'.'.$container; |
my $readfile='/uploaded/'.$coursedom.'/'.$coursenum.'/'.$folder.'.'.$container; |
$r->print(<<ENDFORM); |
|
<table class="LC_docs_adddocs"> |
|
<tr> |
|
<th>$lt{'uplm'}</th> |
my $recoverform=(<<RFORM); |
<th>$lt{'impp'}</th> |
<form action="/adm/groupsort" method="post" name="recover"> |
<th>$lt{'spec'}</th> |
<input type="button" name="recovermap" onClick="javascript:groupopen('$readfile',1,0)" value="$lt{'reco'}" /> |
</tr> |
</form> |
<tr> |
RFORM |
<td> |
|
$lt{'file'}:<br /> |
my $imspform=(<<IMSPFORM); |
<form name="uploaddocument" action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
<form action="/adm/imsimportdocs" method="post" name="ims"> |
<input type="file" name="uploaddoc" size="40" /> |
<input type="hidden" name="folder" value="$folder" /> |
<br /> |
<input name="imsimport" type="button" value="$lt{'imsf'}" onClick="javascript:makeims();" /> |
$lt{'title'}:<br /> |
</form> |
<input type="text" size="50" name="comment" /> |
IMSPFORM |
$uploadtag |
|
<input type="hidden" name="cmd" value="upload_default" /> |
my $newnavform=(<<NNFORM); |
<br /> |
<form action="/adm/coursedocs" method="post" name="newnav"> |
<span class="LC_nobreak"> |
$uploadtag |
<label>$lt{'parse'}? |
<input type="hidden" name="importdetail" |
<input type="checkbox" name="parserflag" checked="checked" /> |
value="$lt{'navc'}=/adm/navmaps" /> |
</label> |
<span class="LC_nobreak"> |
</span> |
<input name="newnav" type="submit" value="$lt{'navc'}" /> |
<br /> |
$help{'Navigate_Content'} |
<br /> |
</span> |
<span class="LC_nobreak"> |
</form> |
<input type="submit" value="$lt{'upld'}" /> |
NNFORM |
$help{'Uploading_From_Harddrive'} |
my $newsmppageform=(<<NSPFORM); |
</span> |
<form action="/adm/coursedocs" method="post" name="newsmppg"> |
</form> |
$uploadtag |
</td> |
<input type="hidden" name="importdetail" value="" /> |
<td> |
<span class="LC_nobreak"> |
<form action="/adm/coursedocs" method="post" name="simpleeditdefault"> |
<input name="newsmppg" type="button" value="$lt{'sipa'}" |
$lt{'pubd'}<br /> |
onClick="javascript:makesmppage();" /> $help{'Simple Page'} |
$uploadtag |
</span> |
<input type="button" onClick="javascript:groupsearch()" value="$lt{'srch'}" /> |
</form> |
<br /> |
NSPFORM |
<span class="LC_nobreak"> |
|
<input type="button" onClick="javascript:groupimport();" value="$lt{'impo'}" /> |
my $newsmpproblemform=(<<NSPROBFORM); |
$help{'Importing_LON-CAPA_Resource'} |
<form action="/adm/coursedocs" method="post" name="newsmpproblem"> |
</span> |
$uploadtag |
<br /> |
<input type="hidden" name="importdetail" value="" /> |
<input type="button" onClick="javascript:groupopen(0,1,1);" value="$lt{'book'}" /> |
<span class="LC_nobreak"> |
<hr /> |
<input name="newsmpproblem" type="button" value="$lt{'sipr'}" |
<p> |
onClick="javascript:makesmpproblem();" />$help{'Simple Problem'} |
$lt{'copm'}<br /> |
</span> |
<input type="text" size="40" name="importmap" /><br /> |
</form> |
<span class="LC_nobreak"><input type="button" |
|
onClick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')" |
NSPROBFORM |
value="$lt{'selm'}" /> <input type="submit" name="loadmap" value="$lt{'load'}" /> |
|
$help{'Load_Map'}</span> |
my $newdropboxform=(<<NDBFORM); |
</p> |
<form action="/adm/coursedocs" method="post" name="newdropbox"> |
</form> |
$uploadtag |
<hr /> |
<input type="hidden" name="importdetail" value="" /> |
<form action="/adm/groupsort" method="post" name="recover"> |
<span class="LC_nobreak"> |
<input type="button" name="recovermap" onClick="javascript:groupopen('$readfile',1,0)" value="$lt{'reco'}" /> |
<input name="newdropbox" type="button" value="$lt{'drbx'}" |
</form> |
onClick="javascript:makedropbox();" /> |
ENDFORM |
</span> |
unless ($env{'form.pagepath'}) { |
</form> |
$r->print(<<ENDFORM); |
NDBFORM |
<hr /> |
|
<form action="/adm/coursedocs" method="post" name="newext"> |
my $newexuploadform=(<<NEXUFORM); |
$uploadtag |
<form action="/adm/coursedocs" method="post" name="newexamupload"> |
<input type="hidden" name="importdetail" value="" /> |
$uploadtag |
<span class="LC_nobreak"> |
<input type="hidden" name="importdetail" value="" /> |
<input name="newext" type="button" onClick="javascript:makenewext('newext');" |
<span class="LC_nobreak"> |
value="$lt{'extr'}" /> $help{'Adding_External_Resource'} |
<input name="newexamupload" type="button" value="$lt{'scuf'}" |
</span> |
onClick="javascript:makeexamupload();" /> |
</form> |
$help{'Score_Upload_Form'} |
<br /><form action="/adm/imsimportdocs" method="post" name="ims"> |
</span> |
<input type="hidden" name="folder" value="$folder" /> |
</form> |
<input name="imsimport" type="button" value="$lt{'imsf'}" onClick="javascript:makeims();" /> |
NEXUFORM |
</form> |
|
ENDFORM |
my $newbulform=(<<NBFORM); |
} |
<form action="/adm/coursedocs" method="post" name="newbul"> |
$r->print('</td><td>'); |
$uploadtag |
|
<input type="hidden" name="importdetail" value="" /> |
|
<span class="LC_nobreak"> |
|
<input name="newbulletin" type="button" value="$lt{'bull'}" |
|
onClick="javascript:makebulboard();" /> |
|
$help{'Bulletin Board'} |
|
</span> |
|
</form> |
|
NBFORM |
|
|
|
my $newaboutmeform=(<<NAMFORM); |
|
<form action="/adm/coursedocs" method="post" name="newaboutme"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" |
|
value="$plainname=/adm/$udom/$uname/aboutme" /> |
|
<span class="LC_nobreak"> |
|
<input name="newaboutme" type="submit" value="$lt{'mypi'}" /> |
|
$help{'My Personal Info'} |
|
</span> |
|
</form> |
|
NAMFORM |
|
|
|
my $newaboutsomeoneform=(<<NASOFORM); |
|
<form action="/adm/coursedocs" method="post" name="newaboutsomeone"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" value="" /> |
|
<span class="LC_nobreak"> |
|
<input name="newaboutsomeone" type="button" value="$lt{'abou'}" |
|
onClick="javascript:makeabout();" /> |
|
</span> |
|
</form> |
|
NASOFORM |
|
|
|
|
|
my $newrosterform=(<<NROSTFORM); |
|
<form action="/adm/coursedocs" method="post" name="newroster"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" |
|
value="$lt{'rost'}=/adm/viewclasslist" /> |
|
<span class="LC_nobreak"> |
|
<input name="newroster" type="submit" value="$lt{'rost'}" /> |
|
$help{'Course Roster'} |
|
</span> |
|
</form> |
|
NROSTFORM |
|
|
unless ($env{'form.pagepath'}) { |
unless ($env{'form.pagepath'}) { |
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
$r->print(<<ENDFORM); |
|
<br /><form action="/adm/coursedocs" method="post" name="newfolder"> |
my $newpageform=(<<NPFORM); |
<input type="hidden" name="folderpath" value="$path" /> |
<form action="/adm/coursedocs" method="post" name="newpage"> |
<input type="hidden" name="importdetail" value="" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<span class="LC_nobreak"> |
<input type="hidden" name="importdetail" value="" /> |
<input name="newfolder" type="button" |
<span class="LC_nobreak"> |
onClick="javascript:makenewfolder(this.form,'$folderseq');" |
<input name="newpage" type="button" |
value="$lt{'newf'}" />$help{'Adding_Folders'} |
onClick="javascript:makenewpage(this.form,'$pageseq');" |
</span> |
value="$lt{'newp'}" />$help{'Adding_Pages'} |
</form> |
</span> |
<br /><form action="/adm/coursedocs" method="post" name="newpage"> |
</form> |
<input type="hidden" name="folderpath" value="$path" /> |
NPFORM |
<input type="hidden" name="importdetail" value="" /> |
|
<span class="LC_nobreak"> |
my $newfolderform=(<<NFFORM); |
<input name="newpage" type="button" |
<form action="/adm/coursedocs" method="post" name="newfolder"> |
onClick="javascript:makenewpage(this.form,'$pageseq');" |
<input type="hidden" name="folderpath" value="$path" /> |
value="$lt{'newp'}" />$help{'Adding_Pages'} |
<input type="hidden" name="importdetail" value="" /> |
</span> |
<span class="LC_nobreak"> |
</form> |
<input name="newfolder" type="button" |
<br /><form action="/adm/coursedocs" method="post" name="newsyl"> |
onClick="javascript:makenewfolder(this.form,'$folderseq');" |
$uploadtag |
value="$lt{'newf'}" />$help{'Adding_Folders'} |
<input type="hidden" name="importdetail" |
</span> |
value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" /> |
</form> |
<span class="LC_nobreak"> |
NFFORM |
<input name="newsyl" type="submit" value="$lt{'syll'}" /> |
|
$help{'Syllabus'} |
my $newsylform=(<<NSYLFORM); |
</span> |
<form action="/adm/coursedocs" method="post" name="newsyl"> |
</form> |
$uploadtag |
<br /><form action="/adm/coursedocs" method="post" name="newnav"> |
<input type="hidden" name="importdetail" |
$uploadtag |
value="$lt{'syll'}=/public/$coursedom/$coursenum/syllabus" /> |
<input type="hidden" name="importdetail" |
<span class="LC_nobreak"> |
value="$lt{'navc'}=/adm/navmaps" /> |
<input name="newsyl" type="submit" value="$lt{'syll'}" /> |
<span class="LC_nobreak"> |
$help{'Syllabus'} |
<input name="newnav" type="submit" value="$lt{'navc'}" /> |
</span> |
$help{'Navigate_Content'} |
</form> |
</span> |
NSYLFORM |
</form> |
|
<br /><form action="/adm/coursedocs" method="post" name="newsmppg"> |
my $newgroupfileform=(<<NGFFORM); |
$uploadtag |
<form action="/adm/coursedocs" method="post" name="newgroupfiles"> |
<input type="hidden" name="importdetail" value="" /> |
$uploadtag |
<span class="LC_nobreak"> |
<input type="hidden" name="importdetail" |
<input name="newsmppg" type="button" value="$lt{'sipa'}" |
value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" /> |
onClick="javascript:makesmppage();" /> $help{'Simple Page'} |
<span class="LC_nobreak"> |
</span> |
<input name="newgroupfiles" type="submit" value="$lt{'grpo'}" /> |
</form> |
$help{'Group Files'} |
<br /><form action="/adm/coursedocs" method="post" name="newsmpproblem"> |
</span> |
$uploadtag |
</form> |
<input type="hidden" name="importdetail" value="" /> |
NGFFORM |
<span class="LC_nobreak"> |
|
<input name="newsmpproblem" type="button" value="$lt{'sipr'}" |
|
onClick="javascript:makesmpproblem();" />$help{'Simple Problem'} |
my $specialdocumentsform=(<<SPDOFORM); |
</span> |
<br />$newfolderform |
</form> |
<br />$newpageform |
<br /><form action="/adm/coursedocs" method="post" name="newdropbox"> |
<br />$newsylform |
$uploadtag |
<br />$newnavform |
<input type="hidden" name="importdetail" value="" /> |
<br />$newsmppageform |
<span class="LC_nobreak"> |
<br />$newsmpproblemform |
<input name="newdropbox" type="button" value="$lt{'drbx'}" |
<br />$newdropboxform |
onClick="javascript:makedropbox();" /> |
<br />$newexuploadform |
</span> |
<br />$newbulform |
</form> |
<br />$newaboutmeform |
<br /><form action="/adm/coursedocs" method="post" name="newexamupload"> |
<br />$newaboutsomeoneform |
$uploadtag |
<br />$newgroupfileform |
<input type="hidden" name="importdetail" value="" /> |
<br />$newrosterform |
<span class="LC_nobreak"> |
SPDOFORM |
<input name="newexamupload" type="button" value="$lt{'scuf'}" |
|
onClick="javascript:makeexamupload();" /> |
|
$help{'Score_Upload_Form'} |
my %orderhash = ( |
</span> |
'aa' => 'New Document', |
</form> |
'bb' => 'Published Documents', |
<br /><form action="/adm/coursedocs" method="post" name="newbul"> |
'cc' => 'Special Documents', |
$uploadtag |
'dd' => 'More Options', |
<input type="hidden" name="importdetail" value="" /> |
'zz' => 'Hide all Options', |
<span class="LC_nobreak"> |
); |
<input name="newbulletin" type="button" value="$lt{'bull'}" |
my %namehash = ( |
onClick="javascript:makebulboard();" /> |
'New Document' => $fileuploadform, |
$help{'Bulletin Board'} |
'Published Documents' => $simpleeditdefaultform, |
</span> |
'Special Documents' => $specialdocumentsform, |
</form> |
'More Options' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform, |
<br /><form action="/adm/coursedocs" method="post" name="newaboutme"> |
); |
$uploadtag |
my $tid='1'; |
<input type="hidden" name="importdetail" |
my $content='content'; |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
my $navigation='navigation'; |
<span class="LC_nobreak"> |
my $varcd = 'Main Course Documents'; |
<input name="newaboutme" type="submit" value="$lt{'mypi'}" /> |
$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash)); |
$help{'My Personal Info'} |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
</span> |
if ($error) { |
</form> |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
<br /><form action="/adm/coursedocs" method="post" name="newaboutsomeone"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" value="" /> |
|
<span class="LC_nobreak"> |
|
<input name="newaboutsomeone" type="button" value="$lt{'abou'}" |
|
onClick="javascript:makeabout();" /> |
|
</span> |
|
</form> |
|
<br /><form action="/adm/coursedocs" method="post" name="newgroupfiles"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" |
|
value="$lt{'grpo'}=/adm/$coursedom/$coursenum/aboutme" /> |
|
<span class="LC_nobreak"> |
|
<input name="newgroupfiles" type="submit" value="$lt{'grpo'}" /> |
|
$help{'Group Files'} |
|
</span> |
|
</form> |
|
<br /><form action="/adm/coursedocs" method="post" name="newroster"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" |
|
value="$lt{'rost'}=/adm/viewclasslist" /> |
|
<span class="LC_nobreak"> |
|
<input name="newroster" type="submit" value="$lt{'rost'}" /> |
|
$help{'Course Roster'} |
|
</span> |
|
</form> |
|
ENDFORM |
|
} |
} |
|
$r->print('</div>'); |
|
} |
if ($env{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
$r->print(<<ENDBLOCK); |
|
<form action="/adm/coursedocs" method="post" name="newsmpproblem"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" value="" /> |
|
<span class="LC_nobreak"> |
|
<input name="newsmpproblem" type="button" value="$lt{'sipr'}" |
|
onClick="javascript:makesmpproblem();" />$help{'Simple Problem'} |
|
</span> |
|
</form> |
|
<br /><form action="/adm/coursedocs" method="post" name="newexamupload"> |
|
$uploadtag |
|
<input type="hidden" name="importdetail" value="" /> |
|
<span class="LC_nobreak"> |
|
<input name="newexamupload" type="button" value="$lt{'scuf'}" |
|
onClick="javascript:makeexamupload();" /> |
|
$help{'Score_Upload_Form'} |
|
</span> |
|
</form> |
|
ENDBLOCK |
|
} |
} |
$r->print('</td></tr>'."\n". |
|
'</table>'); |
|
$r->print('</td></tr>'); |
|
} |
} |
# ----------------------------------------------------- Supplemental documents |
# ----------------------------------------------------- Supplemental documents |
if (!$forcestandard) { |
if (!$forcestandard) { |
$r->print('<tr><td class="LC_docs_document">'); |
my $active = 'style="display: none;"'; |
# '<h2>'.&mt('Supplemental Course Documents'). |
if($activeClass == 1){ |
# ($allowed?' '.$help{'Supplemental'}:'').'</h2>'); |
$active = 'style="display: block;"'; |
|
} |
|
$r->print('<div class="LC_ContentBox" id="Supplemental Course Documents" '.$active.'>'); |
my $folder=$env{'form.folder'}; |
my $folder=$env{'form.folder'}; |
unless ($folder=~/^supplemental/) { |
unless ($folder=~/^supplemental/) { |
$folder='supplemental'; |
$folder='supplemental'; |
Line 3122 ENDBLOCK
|
Line 3163 ENDBLOCK
|
$env{'form.folderpath'} = 'supplemental&'. |
$env{'form.folderpath'} = 'supplemental&'. |
&escape(&mt('Supplemental '.$type.' Documents')); |
&escape(&mt('Supplemental '.$type.' Documents')); |
} |
} |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
|
if ($error) { |
|
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
|
} |
|
if ($allowed) { |
if ($allowed) { |
my $folderseq= |
my $folderseq= |
'/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time. |
'/uploaded/'.$coursedom.'/'.$coursenum.'/supplemental_'.time. |
'.sequence'; |
'.sequence'; |
|
|
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
my $path = &HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
$r->print(<<ENDSUPFORM); |
|
<table class="LC_docs_adddocs"><tr> |
my $supupdocform=(<<SUPDOCFORM); |
<th>$lt{'upls'}</th> |
<form action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
<th>$lt{'spec'}</th> |
$fileupload |
</tr> |
<br /> |
<tr><td> |
<br /> |
<form action="/adm/coursedocs" method="post" enctype="multipart/form-data"> |
<span class="LC_nobreak"> |
<input type="file" name="uploaddoc" size="40" /> |
$checkbox |
<br /> |
</span> |
<br /> |
<br /><br /> |
<span class="LC_nobreak"> |
$lt{'comment'}:<br /> |
<label>$lt{'parse'}? |
<textarea cols=50 rows=4 name='comment'> |
<input type="checkbox" name="parserflag" /> |
</textarea> |
</label> |
<br /> |
</span> |
<input type="hidden" name="folderpath" value="$path" /> |
<br /><br /> |
<input type="hidden" name="cmd" value="upload_supplemental" /> |
$lt{'comment'}:<br /> |
<span class="LC_nobreak"> |
<textarea cols="50" rows="4" name="comment"> |
<input type="submit" value="$lt{'upld'}" /> |
</textarea> |
$help{'Uploading_From_Harddrive'} |
<br /> |
</span> |
<input type="hidden" name="folderpath" value="$path" /> |
</form> |
<input type="hidden" name="cmd" value="upload_supplemental" /> |
SUPDOCFORM |
<span class="LC_nobreak"> |
|
<input type="submit" value="$lt{'upld'}" /> |
my $supnewfolderform=(<<SNFFORM); |
$help{'Uploading_From_Harddrive'} |
<form action="/adm/coursedocs" method="post" name="supnewfolder"> |
</span> |
<input type="hidden" name="folderpath" value="$path" /> |
</form> |
<input type="hidden" name="importdetail" value="" /> |
</td> |
<span class="LC_nobreak"> |
<td> |
<input name="newfolder" type="button" |
<form action="/adm/coursedocs" method="post" name="supnewfolder"> |
onClick="javascript:makenewfolder(this.form,'$folderseq');" |
<input type="hidden" name="folderpath" value="$path" /> |
value="$lt{'newf'}" /> $help{'Adding_Folders'} |
<input type="hidden" name="importdetail" value="" /> |
</span> |
<span class="LC_nobreak"> |
</form> |
<input name="newfolder" type="button" |
SNFFORM |
onClick="javascript:makenewfolder(this.form,'$folderseq');" |
|
value="$lt{'newf'}" /> $help{'Adding_Folders'} |
|
</span> |
my $supnewextform=(<<SNEFORM); |
</form> |
<form action="/adm/coursedocs" method="post" name="supnewext"> |
<br /><form action="/adm/coursedocs" method="post" name="supnewext"> |
<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"> |
<span class="LC_nobreak"> |
<input name="newext" type="button" |
<input name="newext" type="button" |
onClick="javascript:makenewext('supnewext');" |
onClick="javascript:makenewext('supnewext');" |
value="$lt{'extr'}" /> $help{'Adding_External_Resource'} |
value="$lt{'extr'}" /> $help{'Adding_External_Resource'} |
</span> |
</span> |
</form> |
</form> |
SNEFORM |
<br /><form action="/adm/coursedocs" method="post" name="supnewsyl"> |
|
<input type="hidden" name="folderpath" value="$path" /> |
my $supnewsylform=(<<SNSFORM); |
<input type="hidden" name="importdetail" |
<form action="/adm/coursedocs" method="post" name="supnewsyl"> |
value="Syllabus=/public/$coursedom/$coursenum/syllabus" /> |
<input type="hidden" name="folderpath" value="$path" /> |
<span class="LC_nobreak"> |
<input type="hidden" name="importdetail" |
<input name="newsyl" type="submit" value="$lt{'syll'}" /> |
value="Syllabus=/public/$coursedom/$coursenum/syllabus" /> |
$help{'Syllabus'} |
<span class="LC_nobreak"> |
</span> |
<input name="newsyl" type="submit" value="$lt{'syll'}" /> |
</form> |
$help{'Syllabus'} |
<br /><form action="/adm/coursedocs" method="post" name="subnewaboutme"> |
</span> |
<input type="hidden" name="folderpath" value="$path" /> |
</form> |
<input type="hidden" name="importdetail" |
SNSFORM |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
|
<span class="LC_nobreak"> |
my $supnewaboutmeform=(<<SNAMFORM); |
<input name="newaboutme" type="submit" value="$lt{'mypi'}" /> |
<form action="/adm/coursedocs" method="post" name="subnewaboutme"> |
$help{'My Personal Info'} |
<input type="hidden" name="folderpath" value="$path" /> |
</span> |
<input type="hidden" name="importdetail" |
</form> |
value="$plainname=/adm/$udom/$uname/aboutme" /> |
</td></tr> |
<span class="LC_nobreak"> |
</table></td></tr> |
<input name="newaboutme" type="submit" value="$lt{'mypi'}" /> |
ENDSUPFORM |
$help{'My Personal Info'} |
|
</span> |
|
</form> |
|
SNAMFORM |
|
|
|
|
|
|
|
my %suporderhash = ( |
|
'ee' => 'New Document', |
|
'ff' => 'Special Documents', |
|
'zz' => 'Hide all Options', |
|
); |
|
|
|
my %supnamehash = ( |
|
'New Document' => $supupdocform, |
|
'Special Documents' => $supnewfolderform.'<br />'.$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform, |
|
); |
|
|
|
my $tid='2'; |
|
my $content='content'; |
|
my $navigation='navigation'; |
|
my $varscd = 'Supplemental Course Documents'; |
|
|
|
$r->print(&generate_edit_table($tid,$content,$navigation,$varscd,\%supnamehash,\%suporderhash)); |
|
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
|
if ($error) { |
|
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
} |
} |
} |
$r->print('</div)'); |
$r->print('</table>'); |
} |
|
} |
|
$r->print('</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 3224 ENDSUPFORM
|
Line 3289 ENDSUPFORM
|
} |
} |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |
|
} |
|
|
|
sub generate_admin_options { |
|
my ($containertag,$uploadtag,$lt_ref,$help_ref,$env_ref) = @_; |
|
my %lt = %{$lt_ref}; |
|
my %help = %{$help_ref}; |
|
my %env = %{$env_ref}; |
|
my $dumpbut=&dumpbutton(); |
|
my $exportbut=&exportbutton(); |
|
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"> |
|
<ul style="list-style-type:none"> |
|
<li> |
|
<input type="submit" name="verify" value="$lt{'vc'}" />$help{'Verify_Content'} |
|
</li> |
|
<li> |
|
<input type="submit" name="versions" value="$lt{'cv'}" />$help{'Check_Resource_Versions'} |
|
</li> |
|
<li> |
|
$dumpbut |
|
</li> |
|
<li> |
|
$exportbut |
|
</li> |
|
<li> |
|
<input type="submit" name="listsymbs" value="$lt{'ls'}" /> |
|
</li> |
|
<li> |
|
<input type="hidden" name="folder" value="$env{'form.folder'}" /> |
|
<input type="submit" name="docslog" value="$lt{'sl'}" /> |
|
</li> |
|
</ul> |
|
</form> |
|
<div style="clear: both; height: 0px;"> </div> |
|
ENDOPTIONFORM |
|
|
} |
} |
|
|
sub concept_test_builder { |
|
my ($r) = @_; |
sub generate_edit_table { |
$r->print(&Apache::loncommon::start_page('Assemble Test')); |
my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_; |
&Apache::londocsgci::setdefaults(); |
my %namehash = %{$namehash_ref}; #name verlinkt mit id |
if ($env{'form.phase'} eq 'storemap') { |
my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name |
&Apache::londocsgci::evaluate(); |
my $form; |
&Apache::londocsgci::store($r); |
|
} |
|
&Apache::londocsgci::load(); |
|
&Apache::londocsgci::listresources($r); |
$form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt($varcd).'</h4>'; |
$r->print(&Apache::loncommon::end_page()); |
$form .= '<ul id="'.$navigation.$tid.'" class="LC_TabContent">'; |
return; |
foreach my $name (sort(keys(%orderhash))){ |
|
if($name eq 'zz'){ |
|
$form .= '<li onclick="javascript:hideAll(this, \''.$navigation.$tid.'\' ,\''.$content.$tid.'\');" class="active">'.&mt($orderhash{$name}).'</li>'; |
|
}else{ |
|
$form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>'; |
|
} |
|
} |
|
$form .= '<div id="'.$content.$tid.'" style="padding: 0 0; margin: 0 0;">'; |
|
foreach my $field (keys(%namehash)){ |
|
$form .= '<div id="'.$tid.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>'; |
|
} |
|
$form .= '</div></div>'; |
|
|
|
return $form; |
} |
} |
|
|
sub editing_js { |
sub editing_js { |
Line 3249 sub editing_js {
|
Line 3374 sub editing_js {
|
p_mnp => 'Name of New Page', |
p_mnp => 'Name of New Page', |
t_mnp => 'New Page', |
t_mnp => 'New Page', |
p_mxu => 'Title for the Uploaded Score', |
p_mxu => 'Title for the Uploaded Score', |
p_msp => 'Name of the Simple Course 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 Discussion Board', |
p_mbb => 'Title for the Bulletin 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', |
Line 3354 function makeabout() {
|
Line 3479 function makeabout() {
|
if ((comp[0]) && (comp[1])) { |
if ((comp[0]) && (comp[1])) { |
this.document.forms.newaboutsomeone.importdetail.value= |
this.document.forms.newaboutsomeone.importdetail.value= |
'$lt{"p_mab2"}'+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme'; |
'$lt{"p_mab2"}'+escape(user)+'=/adm/'+comp[1]+'/'+comp[0]+'/aboutme'; |
this.document.forms.newaboutsomeone.submit(); |
this.document.forms.newaboutsomeone.submit(); |
} else { |
} else { |
alert("$lt{'p_mab_alrt1'}"); |
alert("$lt{'p_mab_alrt1'}"); |
} |
|
} else { |
|
alert("$lt{'p_mab_alrt2'}"); |
|
} |
|
} |
} |
|
} else { |
|
alert("$lt{'p_mab_alrt2'}"); |
|
} |
|
} |
} |
} |
|
|
function makeims() { |
function makeims() { |
var caller = document.forms.ims.folder.value; |
var caller = document.forms.ims.folder.value; |
var newlocation = "/adm/imsimportdocs?folder="+caller+"&phase=one"; |
var newlocation = "/adm/imsimportdocs?folder="+caller+"&phase=one"; |
newWindow = window.open("","IMSimport","HEIGHT=700,WIDTH=750,scrollbars=yes"); |
newWindow = window.open("","IMSimport","HEIGHT=700,WIDTH=750,scrollbars=yes"); |
newWindow.location.href = newlocation; |
newWindow.location.href = newlocation; |
} |
} |
|
|
|
|
function finishpick() { |
function finishpick() { |
var title=this.document.forms.extimport.title.value; |
var title=this.document.forms.extimport.title.value; |
var url=this.document.forms.extimport.url.value; |
var url=this.document.forms.extimport.url.value; |
var form=this.document.forms.extimport.useform.value; |
var form=this.document.forms.extimport.useform.value; |
var residx=this.document.forms.extimport.residx.value; |
var residx=this.document.forms.extimport.residx.value; |
eval('this.document.forms.'+form+'.importdetail.value="'+title+'='+url+'='+residx+'";this.document.forms.'+form+'.submit();'); |
eval('this.document.forms.'+form+'.importdetail.value="'+title+'='+url+'='+residx+'";this.document.forms.'+form+'.submit();'); |
} |
} |
|
|
function changename(folderpath,index,oldtitle,container,pagesymb) { |
function changename(folderpath,index,oldtitle,container,pagesymb) { |
var title=prompt('$lt{"p_chn"}',oldtitle); |
var title=prompt('$lt{"p_chn"}',oldtitle); |
if (title) { |
if (title) { |
this.document.forms.renameform.markcopy.value=-1; |
this.document.forms.renameform.markcopy.value=-1; |
this.document.forms.renameform.title.value=title; |
this.document.forms.renameform.title.value=title; |
this.document.forms.renameform.cmd.value='rename_'+index; |
this.document.forms.renameform.cmd.value='rename_'+index; |
if (container == 'sequence') { |
if (container == 'sequence') { |
this.document.forms.renameform.folderpath.value=folderpath; |
this.document.forms.renameform.folderpath.value=folderpath; |
} |
} |
if (container == 'page') { |
if (container == 'page') { |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagesymb.value=pagesymb; |
this.document.forms.renameform.pagesymb.value=pagesymb; |
} |
} |
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
} |
} |
} |
} |
|
|
function removeres(folderpath,index,oldtitle,container,pagesymb,skip_confirm) { |
function removeres(folderpath,index,oldtitle,container,pagesymb,skip_confirm) { |
if (skip_confirm || confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr2a"} "'+oldtitle+'" $lt{"p_rmr2b"}')) { |
if (skip_confirm || confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr2a"} "'+oldtitle+'" $lt{"p_rmr2b"}')) { |
this.document.forms.renameform.markcopy.value=-1; |
this.document.forms.renameform.markcopy.value=-1; |
this.document.forms.renameform.cmd.value='del_'+index; |
this.document.forms.renameform.cmd.value='del_'+index; |
if (container == 'sequence') { |
if (container == 'sequence') { |
this.document.forms.renameform.folderpath.value=folderpath; |
this.document.forms.renameform.folderpath.value=folderpath; |
} |
} |
if (container == 'page') { |
if (container == 'page') { |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagesymb.value=pagesymb; |
this.document.forms.renameform.pagesymb.value=pagesymb; |
} |
} |
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
} |
} |
} |
} |
|
|
function cutres(folderpath,index,oldtitle,container,pagesymb,folder,skip_confirm) { |
function cutres(folderpath,index,oldtitle,container,pagesymb,folder,skip_confirm) { |
if (skip_confirm || confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr2a"} "'+oldtitle+'" $lt{"p_ctr2b"}')) { |
if (skip_confirm || confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr2a"} "'+oldtitle+'" $lt{"p_ctr2b"}')) { |
this.document.forms.renameform.cmd.value='cut_'+index; |
this.document.forms.renameform.cmd.value='cut_'+index; |
this.document.forms.renameform.markcopy.value=index; |
this.document.forms.renameform.markcopy.value=index; |
this.document.forms.renameform.copyfolder.value=folder+'.'+container; |
this.document.forms.renameform.copyfolder.value=folder+'.'+container; |
if (container == 'sequence') { |
if (container == 'sequence') { |
this.document.forms.renameform.folderpath.value=folderpath; |
this.document.forms.renameform.folderpath.value=folderpath; |
} |
} |
if (container == 'page') { |
if (container == 'page') { |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagesymb.value=pagesymb; |
this.document.forms.renameform.pagesymb.value=pagesymb; |
} |
} |
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
} |
} |
} |
} |
|
|
function markcopy(folderpath,index,oldtitle,container,pagesymb,folder) { |
function markcopy(folderpath,index,oldtitle,container,pagesymb,folder) { |
this.document.forms.renameform.markcopy.value=index; |
this.document.forms.renameform.markcopy.value=index; |
this.document.forms.renameform.copyfolder.value=folder+'.'+container; |
this.document.forms.renameform.copyfolder.value=folder+'.'+container; |
if (container == 'sequence') { |
if (container == 'sequence') { |
this.document.forms.renameform.folderpath.value=folderpath; |
this.document.forms.renameform.folderpath.value=folderpath; |
} |
} |
if (container == 'page') { |
if (container == 'page') { |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagepath.value=folderpath; |
this.document.forms.renameform.pagesymb.value=pagesymb; |
this.document.forms.renameform.pagesymb.value=pagesymb; |
} |
} |
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
|
} |
|
|
|
function unselectInactive(nav) { |
|
currentNav = document.getElementById(nav); |
|
currentLis = currentNav.getElementsByTagName('LI'); |
|
for (i = 0; i < currentLis.length; i++) { |
|
currentLis[i].className = 'i'; |
|
} |
|
} |
|
|
|
function hideAll(current, nav, data) { |
|
unselectInactive(nav); |
|
current.className = 'active'; |
|
currentData = document.getElementById(data); |
|
currentDivs = currentData.getElementsByTagName('DIV'); |
|
for (i = 0; i < currentDivs.length; i++) { |
|
if(currentDivs[i].className == 'LC_ContentBox'){ |
|
currentDivs[i].style.display = 'none'; |
|
} |
|
} |
|
} |
|
|
|
function showPage(current, pageId, nav, data) { |
|
hideAll(current, nav, data); |
|
unselectInactive(nav); |
|
current.className = 'active'; |
|
currentData = document.getElementById(pageId); |
|
currentData.style.display = 'block'; |
|
return false; |
} |
} |
|
|
ENDNEWSCRIPT |
ENDNEWSCRIPT |