version 1.13, 2002/09/05 19:37:00
|
version 1.21, 2003/05/03 21:30:21
|
Line 56 sub print_course_creation_page {
|
Line 56 sub print_course_creation_page {
|
my %host_servers = &Apache::loncommon::get_library_servers($defdom); |
my %host_servers = &Apache::loncommon::get_library_servers($defdom); |
my $course_home = '<select name="course_home" size="1">'."\n"; |
my $course_home = '<select name="course_home" size="1">'."\n"; |
foreach my $server (sort(keys(%host_servers))) { |
foreach my $server (sort(keys(%host_servers))) { |
$course_home .= |
$course_home .= qq{<option value="$server"}; |
qq{<option value="$server">$server $host_servers{$server}</option>}; |
if ($server eq $Apache::lonnet::perlvar{'lonHostID'}) { |
|
$course_home .= " selected "; |
|
} |
|
$course_home .= qq{>$server $host_servers{$server}</option>}; |
} |
} |
$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 88 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 111 $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 123 $bodytag
|
Line 127 $bodytag
|
<b>Open all assessments: </b> |
<b>Open all assessments: </b> |
<input type="checkbox" name="openall" checked> |
<input type="checkbox" name="openall" checked> |
</p> |
</p> |
|
<p> |
|
<b>Use new random seed function: </b> |
|
<input type="checkbox" name="rndseed" checked> |
|
</p> |
<h2>Messaging</h2> |
<h2>Messaging</h2> |
<p> |
<p> |
<b>Set course policy feedback to Course Coordinator: </b> |
<b>Set course policy feedback to Course Coordinator: </b> |
Line 131 $bodytag
|
Line 139 $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 219 ENDENHEAD
|
Line 236 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'; |
|
} |
|
# |
|
# Use new Randomseed |
|
# |
|
if ($ENV{'form.rndseed'}) { |
|
$envflag=1; |
|
$cenv{'rndseed'}='64bit'; |
|
} |
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 251 ENDENHEAD
|
Line 283 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 272 ENDENHEAD
|
Line 304 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 |