version 1.14, 2002/09/26 15:19:39
|
version 1.24, 2003/06/16 13:51:46
|
Line 65 sub print_course_creation_page {
|
Line 65 sub print_course_creation_page {
|
$course_home .= "\n</select>\n"; |
$course_home .= "\n</select>\n"; |
my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain'); |
my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain'); |
my $bodytag=&Apache::loncommon::bodytag('Create a New Course'); |
my $bodytag=&Apache::loncommon::bodytag('Create a New Course'); |
|
my $helplink=&Apache::loncommon::help_open_topic('Create_Course','Help on Creating Courses'); |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
<html> |
<script language="JavaScript" type="text/javascript"> |
<script language="JavaScript" type="text/javascript"> |
Line 91 function openbrowser(formname,elementnam
|
Line 91 function openbrowser(formname,elementnam
|
<title>The LearningOnline Network with CAPA</title> |
<title>The LearningOnline Network with CAPA</title> |
</head> |
</head> |
$bodytag |
$bodytag |
|
$helplink |
<form action="/adm/createcourse" method="post" name="ccrs"> |
<form action="/adm/createcourse" method="post" name="ccrs"> |
<h2>Course Information</h2> |
<h2>Course Information</h2> |
<p> |
<p> |
Line 106 $bodytag
|
Line 107 $bodytag
|
<p> |
<p> |
<b>Map:</b> |
<b>Map:</b> |
<input type="text" size="50" name="topmap"> |
<input type="text" size="50" name="topmap"> |
<a href="javascript:openbrowser('ccrs','topmap')">Browse</a> |
<a href="javascript:openbrowser('ccrs','topmap')">Select Map</a> |
</p><p> |
</p><p> |
<b>Do NOT generate as standard course</b> |
<b>Do NOT generate as standard course</b> |
(only check if you know what you are doing): |
(only check if you know what you are doing): |
Line 114 $bodytag
|
Line 115 $bodytag
|
</p> |
</p> |
<p> |
<p> |
<b>First Resource</b> (standard courses only): |
<b>First Resource</b> (standard courses only): |
<input type="radio" name="firstres" value="blank" checked>Blank |
<input type="radio" name="firstres" value="blank">Blank |
|
|
<input type="radio" name="firstres" value="syl">Syllabus |
<input type="radio" name="firstres" value="syl" checked>Syllabus |
|
|
<input type="radio" name="firstres" value="nav">Navigate |
<input type="radio" name="firstres" value="nav">Navigate |
</p> |
</p> |
Line 134 $bodytag
|
Line 135 $bodytag
|
<b>Set content feedback to Course Coordinator: </b> |
<b>Set content feedback to Course Coordinator: </b> |
<input type="checkbox" name="setcontent" checked> |
<input type="checkbox" name="setcontent" checked> |
</p> |
</p> |
|
<h2>Communication</h2> |
|
<p> |
|
<b>Disable student resource discussion: </b> |
|
<input type="checkbox" name="disresdis" /> |
|
</p> |
|
<h2>Access Control</h2> |
|
<p> |
|
<b>Students need access key to enter course: </b> |
|
<input type="checkbox" name="setkeys" /> |
|
</p> |
<h2>Course Coordinator</h2> |
<h2>Course Coordinator</h2> |
<p> |
<p> |
<b>Username:</b> <input type="text" size="15" name="ccuname" /> |
<b>Username:</b> <input type="text" size="15" name="ccuname" /> |
Line 222 ENDENHEAD
|
Line 232 ENDENHEAD
|
$cenv{'question.email'}=$ccuname.':'.$ccdomain; |
$cenv{'question.email'}=$ccuname.':'.$ccdomain; |
} |
} |
} |
} |
|
if ($ENV{'form.setkeys'}) { |
|
$envflag=1; |
|
$cenv{'keyaccess'}='yes'; |
|
} |
|
if ($ENV{'form.disresdis'}) { |
|
$envflag=1; |
|
$cenv{'pch.roles.denied'}='st'; |
|
} |
|
|
|
# Record we've not yet viewed the Course Initialization Helper for this course |
|
$cenv{'course.helper.not.run'} = 1; |
|
# |
|
# Use new Randomseed |
|
# |
|
$envflag=1; |
|
$cenv{'rndseed'}=&Apache::lonnet::latest_rnd_algorithm_id();; |
|
|
if ($envflag) { |
if ($envflag) { |
$r->print('Setting environment: '. |
$r->print('Setting environment: '. |
&Apache::lonnet::put('environment',\%cenv,$crsudom,$crsunum).'<br>'); |
&Apache::lonnet::put('environment',\%cenv,$crsudom,$crsunum).'<br>'); |
Line 254 ENDENHEAD
|
Line 281 ENDENHEAD
|
$url='/adm/navmaps'; |
$url='/adm/navmaps'; |
} |
} |
$Apache::lonratedt::resources[1]=$title.':'.$url.':false:start:res'; |
$Apache::lonratedt::resources[1]=$title.':'.$url.':false:start:res'; |
my ($errtext,$fatal)= |
($errtext,$fatal)= |
&Apache::londocs::storemap($crsunum,$crsudom,'default.sequence'); |
&Apache::londocs::storemap($crsunum,$crsudom,'default.sequence'); |
$r->print(($fatal?$errtext:'write ok').'<br>'); |
$r->print(($fatal?$errtext:'write ok').'<br>'); |
} |
} |
Line 275 ENDENHEAD
|
Line 302 ENDENHEAD
|
$ccuname.' at '.$ccdomain.': '. |
$ccuname.' at '.$ccdomain.': '. |
&Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid,'cc').'<p>'); |
&Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid,'cc').'<p>'); |
} |
} |
$r->print('Roles will be active at next login.</body></html>'); |
if ($ENV{'form.setkeys'}) { |
|
$r->print( |
|
'<p><a href="/adm/managekeys?cid='.$crsudom.'_'.$crsunum.'">Manage Access Keys</a></p>'); |
|
} |
|
$r->print('<p>Roles will be active at next login.</p></body></html>'); |
} |
} |
|
|
# ===================================================================== Handler |
# ===================================================================== Handler |