version 1.63, 2003/07/07 07:32:16
|
version 1.69.2.1.2.3, 2003/09/02 18:31:08
|
Line 265 END
|
Line 265 END
|
} |
} |
} |
} |
$url=~s/^http\&colon\;\/\//\/adm\/wrapper\/ext\//; |
$url=~s/^http\&colon\;\/\//\/adm\/wrapper\/ext\//; |
if ($residx) { |
if (($residx) && ($folder!~/supplemental/)) { |
$url.=(($url=~/\?/)?'&':'?').'symb='. |
$url.=(($url=~/\?/)?'&':'?').'symb='. |
&Apache::lonnet::escape(&Apache::lonnet::symbclean( |
&Apache::lonnet::escape(&Apache::lonnet::symbclean( |
&Apache::lonnet::declutter('uploaded/'. |
&Apache::lonnet::declutter('uploaded/'. |
Line 329 sub checkonthis {
|
Line 329 sub checkonthis {
|
$r->print(' '); |
$r->print(' '); |
} |
} |
$r->print('- Rendering: '); |
$r->print('- Rendering: '); |
|
my $oldpath=$ENV{'request.filename'}; |
|
$ENV{'request.filename'}=&Apache::lonnet::filelocation('',$url); |
&Apache::lonxml::xmlparse($r,'web', |
&Apache::lonxml::xmlparse($r,'web', |
&Apache::lonnet::getfile( |
&Apache::lonnet::getfile( |
&Apache::lonnet::filelocation('',$url))); |
&Apache::lonnet::filelocation('',$url))); |
|
$ENV{'request.filename'}=$oldpath; |
if (($Apache::lonxml::errorcount) || |
if (($Apache::lonxml::errorcount) || |
($Apache::lonxml::warningcount)) { |
($Apache::lonxml::warningcount)) { |
if ($Apache::lonxml::errorcount) { |
if ($Apache::lonxml::errorcount) { |
Line 375 sub handler {
|
Line 378 sub handler {
|
# --------------------------------------------- Initialize help topics for this |
# --------------------------------------------- Initialize help topics for this |
foreach ('Adding_Course_Doc','Main_Course_Documents', |
foreach ('Adding_Course_Doc','Main_Course_Documents', |
'Adding_External_Resource','Navigate_Content', |
'Adding_External_Resource','Navigate_Content', |
'Adding_Folders','Docs_Overview', |
'Adding_Folders','Docs_Overview', 'Load_Map', |
'Creating_From_Template','Supplemental', |
'Supplemental', 'Score_Upload_Form', |
'Importing_LON-CAPA_Resource','Uploading_From_Harddrive') { |
'Importing_LON-CAPA_Resource','Uploading_From_Harddrive') { |
$help{$_}=&Apache::loncommon::help_open_topic('Docs_'.$_); |
$help{$_}=&Apache::loncommon::help_open_topic('Docs_'.$_); |
} |
} |
|
# Composite help files |
|
$help{'Syllabus'} = &Apache::loncommon::help_open_topic( |
|
'Docs_About_Syllabus,Docs_Editing_Templated_Pages'); |
|
$help{'Simple Page'} = &Apache::loncommon::help_open_topic( |
|
'Docs_About_Simple_Page,Docs_Editing_Templated_Pages'); |
|
$help{'Bulletin Board'} = &Apache::loncommon::help_open_topic( |
|
'Docs_About_Bulletin_Board,Docs_Editing_Templated_Pages'); |
|
$help{'My Personal Info'} = &Apache::loncommon::help_open_topic( |
|
'Docs_About_My_Personal_Info,Docs_Editing_Templated_Pages'); |
|
$help{'Caching'} = &Apache::loncommon::help_open_topic('Caching'); |
|
|
if ($ENV{'form.verify'}) { |
if ($ENV{'form.verify'}) { |
|
|
my $loaderror=&Apache::lonnet::overloaderror($r); |
my $loaderror=&Apache::lonnet::overloaderror($r); |
Line 398 sub handler {
|
Line 411 sub handler {
|
} |
} |
} |
} |
&untiehash(); |
&untiehash(); |
|
$r->print('<h1>Done.</h1>'); |
} elsif ($ENV{'form.versions'}) { |
} elsif ($ENV{'form.versions'}) { |
$r->print('<html><head><title>Check Versions</title></head>'. |
$r->print('<html><head><title>Check Versions</title></head>'. |
&Apache::loncommon::bodytag('Check Course Document Versions')); |
&Apache::loncommon::bodytag('Check Course Document Versions')); |
Line 485 ENDHEADERS
|
Line 499 ENDHEADERS
|
} |
} |
} |
} |
$r->print('</table>'); |
$r->print('</table>'); |
|
$r->print('<h1>Done.</h1>'); |
} else { |
} else { |
$r->print('<p>No content modifications yet.</p>'); |
$r->print('<p>No content modifications yet.</p>'); |
} |
} |
Line 498 ENDHEADERS
|
Line 513 ENDHEADERS
|
my $script=''; |
my $script=''; |
my $allowed; |
my $allowed; |
my $events=''; |
my $events=''; |
my $buttons=''; |
|
my $showdoc=0; |
my $showdoc=0; |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['folder','foldername']); |
['folder','foldername']); |
Line 520 ENDHEADERS
|
Line 534 ENDHEADERS
|
$script='</script>'.&Apache::lonmenu::registerurl(1,undef).'<script>'; |
$script='</script>'.&Apache::lonmenu::registerurl(1,undef).'<script>'; |
$events='onLoad="'.&Apache::lonmenu::loadevents. |
$events='onLoad="'.&Apache::lonmenu::loadevents. |
'" onUnload="'.&Apache::lonmenu::unloadevents.'"'; |
'" onUnload="'.&Apache::lonmenu::unloadevents.'"'; |
$buttons=&Apache::lonmenu::menubuttons(1,undef); |
|
} |
} |
|
|
# get course data |
# get course data |
Line 539 ENDHEADERS
|
Line 552 ENDHEADERS
|
$iconpath = $r->dir_config('lonIconsURL') . "/"; |
$iconpath = $r->dir_config('lonIconsURL') . "/"; |
|
|
my $now=time; |
my $now=time; |
# |
|
# FIXME: hack to disable new problem |
|
# |
|
my $noeggforyou=''; |
|
unless ($ENV{'user.debug'}) { |
|
$noeggforyou='alert("Sorry, not implemented yet."); return 0;'; |
|
} |
|
# print screen |
# print screen |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
<html> |
Line 590 function makesmppage() {
|
Line 597 function makesmppage() {
|
} |
} |
|
|
function makesmpproblem() { |
function makesmpproblem() { |
$noeggforyou |
|
var title=prompt('Listed Title for the Problem'); |
var title=prompt('Listed Title for the Problem'); |
if (title) { |
if (title) { |
this.document.forms.newsmpproblem.importdetail.value= |
this.document.forms.newsmpproblem.importdetail.value= |
Line 640 ENDNEWSCRIPT
|
Line 646 ENDNEWSCRIPT
|
} |
} |
# -------------------------------------------------------------------- Body tag |
# -------------------------------------------------------------------- Body tag |
$r->print('</head>'. |
$r->print('</head>'. |
&Apache::loncommon::bodytag('Course Documents','',$events). |
&Apache::loncommon::bodytag('Course Documents','',$events, |
$buttons); |
'','',$showdoc)); |
unless ($showdoc) { |
unless ($showdoc) { |
if ($allowed) { |
if ($allowed) { |
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', |
$r->print(&Apache::loncommon::help_open_topic('Docs_Adding_Course_Doc', |
Line 682 ENDCOURSEVERIFY
|
Line 688 ENDCOURSEVERIFY
|
'<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">Changes will become active for your current session after <input type="hidden" name="'. |
'<input type="hidden" name="orgurl" value="/adm/coursedocs" /><input type="hidden" name="selectrole" value="1" /><h3><font color="red">Changes will become active for your current session after <input type="hidden" name="'. |
$ENV{'request.role'}.'" value="1" /><input type="button" value="re-initializing course" onClick="reinit(this.form)"/>, or the next time you log in.</font></h3></form>'); |
$ENV{'request.role'}.'" value="1" /><input type="button" value="re-initializing course" onClick="reinit(this.form)"/>, or the next time you log in.'. |
|
$help{'Caching'}.'</font></h3></form>'); |
} |
} |
my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. |
my $folderseq='/uploaded/'.$coursedom.'/'.$coursenum.'/default_'.time. |
'.sequence'; |
'.sequence'; |
Line 722 $help{'Importing_LON-CAPA_Resource'}
|
Line 729 $help{'Importing_LON-CAPA_Resource'}
|
</nobr> |
</nobr> |
<p> |
<p> |
<hr /> |
<hr /> |
<input type="text" size="20" name="importmap"> |
<input type="text" size="20" name="importmap"><br /> |
<input type=button |
<nobr><input type=button |
onClick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')" |
onClick="javascript:openbrowser('simpleeditdefault','importmap','sequence,page','')" |
value="Select Map"><input type="submit" name="loadmap" value="Load Map"> |
value="Select Map"> <input type="submit" name="loadmap" value="Load Map"> |
|
$help{'Load_Map'}</nobr> |
</p> |
</p> |
</form> |
</form> |
</td><td bgcolor="#DDDDDD"> |
</td><td bgcolor="#DDDDDD"> |
Line 755 value="External Resource" /> $help{'Addi
|
Line 763 value="External Resource" /> $help{'Addi
|
value="Syllabus=/public/$coursedom/$coursenum/syllabus"> |
value="Syllabus=/public/$coursedom/$coursenum/syllabus"> |
<nobr> |
<nobr> |
<input name="newsyl" type="submit" value="Syllabus" /> |
<input name="newsyl" type="submit" value="Syllabus" /> |
$help{'Creating_From_Template'} |
$help{'Syllabus'} |
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="newnav"> |
<form action="/adm/coursedocs" method="post" name="newnav"> |
Line 774 $help{'Navigate_Content'}
|
Line 782 $help{'Navigate_Content'}
|
<input type=hidden name="importdetail" value=""> |
<input type=hidden name="importdetail" value=""> |
<nobr> |
<nobr> |
<input name="newsmppg" type="button" value="Simple Page" |
<input name="newsmppg" type="button" value="Simple Page" |
onClick="javascript:makesmppage();" /> $help{'Creating_From_Template'} |
onClick="javascript:makesmppage();" /> $help{'Simple Page'} |
</nobr> |
|
</form> |
|
<form action="/adm/coursedocs" method="post" name="newsmpproblem"> |
|
<input type="hidden" name="folder" value="$folder"> |
|
<input type="hidden" name="foldername" value="$ENV{'form.foldername'}"> |
|
<input type=hidden name="importdetail" value=""> |
|
<nobr> |
|
<input name="newsmpproblem" type="button" value="Simple Problem" |
|
onClick="javascript:makesmpproblem();" />$help{'Creating_From_Template'} |
|
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="newexamupload"> |
<form action="/adm/coursedocs" method="post" name="newexamupload"> |
Line 793 onClick="javascript:makesmpproblem();" /
|
Line 792 onClick="javascript:makesmpproblem();" /
|
<nobr> |
<nobr> |
<input name="newexamupload" type="button" value="Score Upload Form" |
<input name="newexamupload" type="button" value="Score Upload Form" |
onClick="javascript:makeexamupload();" /> |
onClick="javascript:makeexamupload();" /> |
|
$help{'Score_Upload_Form'} |
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="newbul"> |
<form action="/adm/coursedocs" method="post" name="newbul"> |
Line 802 onClick="javascript:makeexamupload();" /
|
Line 802 onClick="javascript:makeexamupload();" /
|
<nobr> |
<nobr> |
<input name="newbulletin" type="button" value="Bulletin Board" |
<input name="newbulletin" type="button" value="Bulletin Board" |
onClick="javascript:makebulboard();" /> |
onClick="javascript:makebulboard();" /> |
$help{'Creating_From_Template'} |
$help{'Bulletin Board'} |
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="newaboutme"> |
<form action="/adm/coursedocs" method="post" name="newaboutme"> |
Line 812 $help{'Creating_From_Template'}
|
Line 812 $help{'Creating_From_Template'}
|
value="$plainname=/adm/$udom/$uname/aboutme"> |
value="$plainname=/adm/$udom/$uname/aboutme"> |
<nobr> |
<nobr> |
<input name="newaboutme" type="submit" value="My Personal Info" /> |
<input name="newaboutme" type="submit" value="My Personal Info" /> |
$help{'Creating_From_Template'} |
$help{'My Personal Info'} |
</nobr> |
</nobr> |
</form> |
</form> |
</td></tr> |
</td></tr> |
Line 899 value="External Resource" /> $help{'Addi
|
Line 899 value="External Resource" /> $help{'Addi
|
value="Syllabus=/public/$coursedom/$coursenum/syllabus"> |
value="Syllabus=/public/$coursedom/$coursenum/syllabus"> |
<nobr> |
<nobr> |
<input name="newsyl" type="submit" value="Syllabus" /> |
<input name="newsyl" type="submit" value="Syllabus" /> |
$help{'Creating_From_Template'} |
$help{'Syllabus'} |
</nobr> |
</nobr> |
</form> |
</form> |
<form action="/adm/coursedocs" method="post" name="subnewaboutme"> |
<form action="/adm/coursedocs" method="post" name="subnewaboutme"> |
Line 909 $help{'Creating_From_Template'}
|
Line 909 $help{'Creating_From_Template'}
|
value="$plainname=/adm/$udom/$uname/aboutme"> |
value="$plainname=/adm/$udom/$uname/aboutme"> |
<nobr> |
<nobr> |
<input name="newaboutme" type="submit" value="My Personal Info" /> |
<input name="newaboutme" type="submit" value="My Personal Info" /> |
$help{'Creating_From_Template'} |
$help{'My Personal Info'} |
</nobr> |
</nobr> |
</form> |
</form> |
</td></tr> |
</td></tr> |