version 1.106, 2008/01/22 22:37:18
|
version 1.109, 2008/09/25 17:44:11
|
Line 153 function validate(formname) {
|
Line 153 function validate(formname) {
|
'audr' => "Automated drops", |
'audr' => "Automated drops", |
'dacu' => "Duration of automated classlist updates", |
'dacu' => "Duration of automated classlist updates", |
'dacc' => "Default start and end dates for student access", |
'dacc' => "Default start and end dates for student access", |
'psam' => "Please select the authentication mechanism", |
'psam' => "Please select the Authentication mechanism", |
'pcda' => "Please choose the default authentication method to be used by new users added to this LON-CAPA domain by the automated enrollment process", |
'pcda' => "Please choose the default authentication method to be used by new users added to this LON-CAPA domain by the automated enrollment process", |
'nech' => "Notification of enrollment changes", |
'nech' => "Notification of enrollment changes", |
'nccl' => "Notification to course coordinator via LON-CAPA message when enrollment changes occur during the automated update?", |
'nccl' => "Notification to course coordinator via LON-CAPA message when enrollment changes occur during the automated update?", |
Line 224 END
|
Line 224 END
|
'Create_Courses'); |
'Create_Courses'); |
$r->print($start_page.$crumbs); |
$r->print($start_page.$crumbs); |
if ($crstype eq 'Course') { |
if ($crstype eq 'Course') { |
$r->print(<<ENDDOCUMENT); |
|
<form action="/adm/createcourse" method="post" name="ccrs"> |
$r->print('<form action="/adm/createcourse" method="post" name="ccrs">' |
<h2>$lt{'cinf'}</h2> |
.&Apache::lonhtmlcommon::start_pick_box() |
<p> |
|
<label><b>$lt{'ctit'}:</b> |
.&Apache::lonhtmlcommon::row_headline() |
<input type="text" size="50" name="title" /></label> |
.'<h3>'.$lt{'cinf'}.'</h3>' |
</p><p> |
.&Apache::lonhtmlcommon::row_closure() |
<label> |
|
<b>$lt{'chsr'}:</b>$course_home |
.&Apache::lonhtmlcommon::row_title($lt{'ctit'}) |
</label> |
.'<input type="text" size="50" name="title" />' |
</p><p> |
.&Apache::lonhtmlcommon::row_closure() |
<label> |
|
<b>$lt{'cidn'} ($lt{'opt'})</b> |
.&Apache::lonhtmlcommon::row_title($lt{'chsr'}) |
<input type="text" size="30" name="crsid" /> |
.$course_home |
</label> |
.&Apache::lonhtmlcommon::row_closure() |
</p><p> |
|
<h2>$lt{'iinf'}</h2> |
.&Apache::lonhtmlcommon::row_title($lt{'cidn'}.' ('.$lt{'opt'}.')') |
<p> |
.'<input type="text" size="30" name="crsid" />' |
$lt{'stat'} |
.&Apache::lonhtmlcommon::row_closure() |
</p><p> |
|
<label> |
.&Apache::lonhtmlcommon::row_headline() |
<b>$lt{'ccod'}</b> |
.'<h3>'.$lt{'iinf'}.'</h3>' |
<input type="text" size="30" name="crscode" /> |
.$lt{'stat'} |
</label> |
.&Apache::lonhtmlcommon::row_closure() |
<br/> |
|
($lt{'toin'}) |
.&Apache::lonhtmlcommon::row_title($lt{'ccod'}) |
</p><p> |
.'<input type="text" size="30" name="crscode" />' |
<label> |
.'<br />('.$lt{'toin'}.')' |
<b>$lt{'snid'}</b> |
.&Apache::lonhtmlcommon::row_closure() |
<input type="text" size="30" name="crssections" /> |
|
</label> |
.&Apache::lonhtmlcommon::row_title($lt{'snid'}) |
<br/> |
.'<input type="text" size="30" name="crssections" />' |
($lt{'csli'}) |
.'<br />('.$lt{'csli'}.')' |
</p><p> |
.&Apache::lonhtmlcommon::row_closure() |
<label> |
|
<b>$lt{'crcs'}</b> |
.&Apache::lonhtmlcommon::row_title($lt{'crcs'}) |
<input type="text" size="30" name="crsxlist" /> |
.'<input type="text" size="30" name="crsxlist" />' |
</label> |
.'<br />('.$lt{'cscs'}.')' |
<br/> |
.&Apache::lonhtmlcommon::row_closure() |
($lt{'cscs'}) |
|
</p> |
.&Apache::lonhtmlcommon::row_headline() |
<h2>$lt{'crco'}</h2> |
.'<h3>'.$lt{'crco'}.'</h3>' |
|
); |
|
$r->print(<<MYEND); |
<table border="2"> |
<table border="2"> |
<tr><th>$lt{'cncr'}</th><th>$lt{'cecr'}</th></tr> |
<tr><th>$lt{'cncr'}</th><th>$lt{'cecr'}</th></tr> |
<tr><td> |
<tr><td> |
Line 287 $lt{'stat'}
|
Line 289 $lt{'stat'}
|
</label> |
</label> |
|
|
<label> |
<label> |
<input type="radio" name="firstres" value="syl" checked />$lt{'sllb'} |
<input type="radio" name="firstres" value="syl" checked="checked" />$lt{'sllb'} |
</label> |
</label> |
|
|
<label> |
<label> |
Line 311 $lt{'stat'}
|
Line 313 $lt{'stat'}
|
$lt{'asov'}. |
$lt{'asov'}. |
</td></tr> |
</td></tr> |
</table> |
</table> |
<h2>$lt{'assp'}</h2> |
MYEND |
<p> |
|
<label> |
|
<b>$lt{'oaas'}: </b> |
$r->print(' ' |
<input type="checkbox" name="openall" /> |
.&Apache::lonhtmlcommon::row_closure() |
</label> |
|
</p> |
.&Apache::lonhtmlcommon::row_headline() |
<h2>$lt{'mssg'}</h2> |
.'<h3>'.$lt{'assp'}.'</h3>' |
<p> |
.&Apache::lonhtmlcommon::row_closure() |
<label> |
|
<b>$lt{'scpf'}: </b> |
.&Apache::lonhtmlcommon::row_title($lt{'oaas'}) |
<input type="checkbox" name="setpolicy" checked /> |
.'<input type="checkbox" name="openall" />' |
</label> |
.&Apache::lonhtmlcommon::row_closure() |
<br /> |
|
<label> |
.&Apache::lonhtmlcommon::row_headline() |
<b>$lt{'scfc'}: </b> |
.'<h3>'.$lt{'mssg'}.'</h3>' |
<input type="checkbox" name="setcontent" checked /> |
.&Apache::lonhtmlcommon::row_closure() |
</label> |
|
</p> |
.&Apache::lonhtmlcommon::row_title($lt{'scpf'}) |
<h2>$lt{'cmmn'}</h2> |
.'<input type="checkbox" name="setpolicy" checked="checked" />' |
<p> |
.&Apache::lonhtmlcommon::row_closure() |
<label> |
|
<b>$lt{'dsrd'}: </b> |
.&Apache::lonhtmlcommon::row_title($lt{'scfc'}) |
<input type="checkbox" name="disresdis" /> |
.'<input type="checkbox" name="setcontent" checked="checked" />' |
</label> |
.&Apache::lonhtmlcommon::row_closure() |
<br /> |
|
<label> |
.&Apache::lonhtmlcommon::row_headline() |
<b>$lt{'dsuc'}: </b> |
.'<h3>'.$lt{'cmmn'}.'</h3>' |
<input type="checkbox" name="disablechat" /> |
.&Apache::lonhtmlcommon::row_closure() |
</label> |
|
</p> |
.&Apache::lonhtmlcommon::row_title($lt{'dsrd'}) |
<h2>$lt{'acco'}</h2> |
.'<input type="checkbox" name="disresdis" />' |
<p> |
.&Apache::lonhtmlcommon::row_closure() |
<label> |
|
<b>$lt{'snak'}: </b> |
.&Apache::lonhtmlcommon::row_title($lt{'dsuc'}) |
<input type="checkbox" name="setkeys" /> |
.'<input type="checkbox" name="disablechat" /' |
</label> |
.&Apache::lonhtmlcommon::row_closure() |
<br /> |
|
<label> |
.&Apache::lonhtmlcommon::row_headline() |
<b>$lt{'kaut'}: </b> |
.'<h3>'.$lt{'acco'}.'</h3>' |
<input type="text" size="30" name="keyauth" /> |
.&Apache::lonhtmlcommon::row_closure() |
</label> |
|
</p> |
.&Apache::lonhtmlcommon::row_title($lt{'snak'}) |
<h2>$lt{'rshm'}</h2> |
.'<input type="checkbox" name="setkeys" />' |
<p> |
.&Apache::lonhtmlcommon::row_closure() |
<label> |
|
<b>$lt{'rshm'}: </b> |
.&Apache::lonhtmlcommon::row_title($lt{'kaut'}) |
<input type="text" name="reshome" size="30" value="/res/$defdom/" /> |
.'<input type="text" size="30" name="keyauth" />' |
</label> |
.&Apache::lonhtmlcommon::row_closure() |
</p> |
|
<p> |
.&Apache::lonhtmlcommon::row_headline() |
<h2>$lt{'aens'}</h2> |
.'<h3>'.$lt{'rshm'}.'</h3>' |
$lt{'aesc'} |
.&Apache::lonhtmlcommon::row_closure() |
</p> |
|
<p> |
.&Apache::lonhtmlcommon::row_title($lt{'rshm'}) |
<b>$lt{'aadd'}</b> |
.'<input type="text" name="reshome" size="30" value="/res/'.$defdom.'/" />' |
<label><input type="radio" name="autoadds" value="1" />$lt{'yes'}</label> |
.&Apache::lonhtmlcommon::row_closure() |
<label><input type="radio" name="autoadds" value="0" checked="true" />$lt{'no'} |
|
</label> |
.&Apache::lonhtmlcommon::row_headline() |
</p><p> |
.'<h3>'.$lt{'aens'}.'</h3>' |
<b>$lt{'audr'}</b> |
.&Apache::lonhtmlcommon::row_closure() |
<label><input type="radio" name="autodrops" value="1" />$lt{'yes'}</label> |
|
<label><input type="radio" name="autodrops" value="0" checked="true" />$lt{'no'}</label> |
.&Apache::lonhtmlcommon::row_title($lt{'aadd'}) |
</p><p> |
.'<label><input type="radio" name="autoadds" value="1" />'.$lt{'yes'}.'</label>' |
<b>$lt{'dacu'}</b> |
.'<label><input type="radio" name="autoadds" value="0" checked="checked" />'.$lt{'no'}.'</label>' |
$enroll_table |
.&Apache::lonhtmlcommon::row_closure() |
</p><p> |
|
<b>$lt{'dacc'}</b> |
.&Apache::lonhtmlcommon::row_title($lt{'audr'}) |
$access_table |
.'<label><input type="radio" name="autodrops" value="1" />'.$lt{'yes'}.'</label>' |
<p></p> |
.'<label><input type="radio" name="autodrops" value="0" checked="checked" />'.$lt{'no'}.'</label>' |
<b>$lt{'psam'}.</b><br /> |
.&Apache::lonhtmlcommon::row_closure() |
$lt{'pcda'}. |
|
</p><p> |
.&Apache::lonhtmlcommon::row_title($lt{'dacu'}) |
$krbform |
.$enroll_table |
<br /> |
.&Apache::lonhtmlcommon::row_closure() |
$intform |
|
<br /> |
.&Apache::lonhtmlcommon::row_title($lt{'dacc'}) |
$locform |
.$access_table |
</p><p> |
.&Apache::lonhtmlcommon::row_closure() |
<b>$lt{'nech'}</b><br /> |
|
$lt{'nccl'}<br/> |
.&Apache::lonhtmlcommon::row_title($lt{'psam'}) |
<label> |
.$lt{'pcda'}.'<br />' |
<input type="radio" name="notify_owner" value="1" />$lt{'yes'} |
.$krbform.'<br />' |
</label> |
.$intform.'<br />' |
<label> |
.$locform |
<input type="radio" name="notify_owner" value="0" checked="true" />$lt{'no'} |
.&Apache::lonhtmlcommon::row_closure() |
</label> |
|
<br /> |
.&Apache::lonhtmlcommon::row_title($lt{'nech'}) |
$lt{'ndcl'}<br/> |
.$lt{'nccl'}.'<br/>' |
<label> |
.'<label><input type="radio" name="notify_owner" value="1" />'.$lt{'yes'}.'</label>' |
<input type="radio" name="notify_dc" value="1" />$lt{'yes'} |
.'<label><input type="radio" name="notify_owner" value="0" checked="checked" />'.$lt{'no'}.'</label>' |
</label> |
.'<br />' |
<label> |
.$lt{'ndcl'}.'<br/>' |
<input type="radio" name="notify_dc" value="0" checked="true" />$lt{'no'} |
.'<label><input type="radio" name="notify_dc" value="1" />'.$lt{'yes'}.'</label>' |
</label> |
.'<label><input type="radio" name="notify_dc" value="0" checked="checked" />'.$lt{'no'}.'</label>' |
</p><p> |
.&Apache::lonhtmlcommon::row_closure() |
<b>$lt{'irsp'}</b> |
|
<label> |
.&Apache::lonhtmlcommon::row_title($lt{'irsp'}) |
<input type="radio" name="showphotos" value="1" />$lt{'yes'} |
.'<label>' |
</label> |
.'<input type="radio" name="showphotos" value="1" />'.$lt{'yes'} |
<label> |
.'</label> ' |
<input type="radio" name="showphotos" value="0" checked="true" />$lt{'no'} |
.'<label>' |
</label> |
.'<input type="radio" name="showphotos" value="0" checked="checked" />'.$lt{'no'} |
</p> |
.'</label> ' |
<p> |
.&Apache::lonhtmlcommon::row_closure() |
<h2>$lt{'cgrs'}</h2> |
|
$lt{'cgrq'} |
.&Apache::lonhtmlcommon::row_headline() |
<input type="text" name="crsquota" value="20" size="6" />Mb |
.'<h3>'.$lt{'cgrs'}.'</h3>' |
</p> |
.&Apache::lonhtmlcommon::row_closure() |
<hr /> |
|
<h2>$lt{'cc'}</h2> |
.&Apache::lonhtmlcommon::row_title($lt{'cgrq'}) |
<p> |
.'<input type="text" name="crsquota" value="20" size="6" />Mb' |
<label> |
.&Apache::lonhtmlcommon::row_closure() |
<b>$lt{'user'}:</b> <input type="text" size="15" name="ccuname" /> |
|
</label> |
.&Apache::lonhtmlcommon::row_headline() |
</p><p> |
.'<h3>'.$lt{'cc'}.'</h3>' |
<label> |
.&Apache::lonhtmlcommon::row_closure() |
<b>$lt{'dmn'}:</b> $domform |
|
</label> |
.&Apache::lonhtmlcommon::row_title($lt{'user'}) |
</p> |
.'<input type="text" size="15" name="ccuname" />' |
|
.&Apache::lonhtmlcommon::row_closure() |
|
|
|
.&Apache::lonhtmlcommon::row_title($lt{'dmn'},"","LC_odd_row_value") |
|
.$domform |
|
.&Apache::lonhtmlcommon::row_closure(1) |
|
|
|
.&Apache::lonhtmlcommon::end_pick_box() |
|
); |
|
|
|
$r->print(<<ENDDOCUMENT); |
<p> |
<p> |
<input type="hidden" name="prevphase" value="courseone" /> |
<input type="hidden" name="prevphase" value="courseone" /> |
<input type="hidden" name="phase" value="coursetwo" /> |
<input type="hidden" name="phase" value="coursetwo" /> |
Line 438 $lt{'cgrq'}
|
Line 450 $lt{'cgrq'}
|
</p> |
</p> |
</form> |
</form> |
ENDDOCUMENT |
ENDDOCUMENT |
|
|
} elsif ($crstype eq 'Group') { |
} elsif ($crstype eq 'Group') { |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<form action="/adm/createcourse" method="post" name="ccrs"> |
<form action="/adm/createcourse" method="post" name="ccrs"> |
Line 477 ENDDOCUMENT
|
Line 490 ENDDOCUMENT
|
</label> |
</label> |
|
|
<label> |
<label> |
<input type="radio" name="firstres" value="syl" checked />$lt{'sllb'} |
<input type="radio" name="firstres" value="syl" checked="checked" />$lt{'sllb'} |
</label> |
</label> |
|
|
<label> |
<label> |
Line 506 $lt{'asov'}.
|
Line 519 $lt{'asov'}.
|
<p> |
<p> |
<label> |
<label> |
<b>$lt{'sgpf'}: </b> |
<b>$lt{'sgpf'}: </b> |
<input type="checkbox" name="setpolicy" checked /> |
<input type="checkbox" name="setpolicy" checked="checked" /> |
</label> |
</label> |
<br /> |
<br /> |
<label> |
<label> |
<b>$lt{'scfg'}: </b> |
<b>$lt{'scfg'}: </b> |
<input type="checkbox" name="setcontent" checked /> |
<input type="checkbox" name="setcontent" checked="checked" /> |
</label> |
</label> |
</p> |
</p> |
<h2>$lt{'cmmn'}</h2> |
<h2>$lt{'cmmn'}</h2> |
Line 661 sub create_course {
|
Line 674 sub create_course {
|
# Check the veracity of the course coordinator |
# Check the veracity of the course coordinator |
if (&Apache::lonnet::homeserver($ccuname,$ccdomain) eq 'no_host') { |
if (&Apache::lonnet::homeserver($ccuname,$ccdomain) eq 'no_host') { |
$r->print('<form action="/adm/createuser" method="post" name="crtuser">'); |
$r->print('<form action="/adm/createuser" method="post" name="crtuser">'); |
$r->print(&mt('No such user').' '.$ccuname.' '.&mt('at').' '.$ccdomain.'.<br />'); |
$r->print('<div class="LC_warning">' |
$r->print(&mt("Please click Back on your browser and select another user, or ")); |
.&mt('No such user [_1] at domain [_2].','<tt>'.$ccuname.'</tt>','<tt>'.$ccdomain.'</tt>') |
$r->print(' |
.'</div>'); |
<input type="hidden" name="phase" value="get_user_info" /> |
$r->print(&mt('Please click Back on your browser and select another user, or [_1]Create User[_2]' |
<input type="hidden" name="ccuname" value="'.$ccuname.'" /> |
, '<input type="hidden" name="phase" value="get_user_info" />' |
<input type="hidden" name="ccdomain" value="'.$ccdomain.'" /> |
.'<input type="hidden" name="ccuname" value="'.$ccuname.'" />' |
<input name="userrole" type="submit" value="'. |
.'<input type="hidden" name="ccdomain" value="'.$ccdomain.'" />' |
&mt('Create User').'" /> |
.'<input name="userrole" type="submit" value="' |
</form>'.&Apache::loncommon::end_page()); |
, '" />' |
|
) |
|
.'</form>'.&Apache::loncommon::end_page() |
|
); |
return; |
return; |
} |
} |
# Check the proposed home server for the course |
# Check the proposed home server for the course |
my %host_servers = |
my %host_servers = |
&Apache::lonnet::get_servers($env{'request.role.domain'},'library'); |
&Apache::lonnet::get_servers($env{'request.role.domain'},'library'); |
if (! exists($host_servers{$env{'form.course_home'}})) { |
if (! exists($host_servers{$env{'form.course_home'}})) { |
$r->print(&mt('Invalid home server for course').': '. |
$r->print(&mt('Invalid home server for course: [_1]' |
$env{'form.course_home'}.&Apache::loncommon::end_page()); |
,$env{'form.course_home'}.&Apache::loncommon::end_page())); |
return; |
return; |
} |
} |
my ($courseid,$crsudom,$crsunum); |
my ($courseid,$crsudom,$crsunum); |
Line 695 sub create_course {
|
Line 711 sub create_course {
|
$r->print(&mt('Assigning role of [_1] Coordinator to [_2] at [_3]: ', |
$r->print(&mt('Assigning role of [_1] Coordinator to [_2] at [_3]: ', |
$crstype,$ccuname,$ccdomain). |
$crstype,$ccuname,$ccdomain). |
&Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid, |
&Apache::lonnet::assignrole($ccdomain,$ccuname,$courseid, |
'cc').'<p>'); |
'cc','','','','','createcourse').'<p>'); |
} |
} |
if ($env{'form.setkeys'}) { |
if ($env{'form.setkeys'}) { |
$r->print( |
$r->print( |
Line 725 sub print_intro_page {
|
Line 741 sub print_intro_page {
|
&mt('Create a new course by completing an online form.'), |
&mt('Create a new course by completing an online form.'), |
}, |
}, |
{ internal_name => 'groupone', |
{ internal_name => 'groupone', |
name => &mt('Create a single collaborative group space '), |
name => &mt('Create a single collaborative group space'), |
short_description => |
short_description => |
&mt('Create a new group space for non-course use by completing an online form .'), |
&mt('Create a new group space for non-course use by completing an online form.'), |
}, |
}, |
{ internal_name => 'batchone', |
{ internal_name => 'batchone', |
name => &mt('Create courses/groups by uploading an attributes file'), |
name => &mt('Create courses/groups by uploading an attributes file'), |
short_description => |
short_description => |
&mt('Upload an attributes file containing specifications for one or more courses or groups in XML format'), |
&mt('Upload an attributes file containing specifications for one or more courses or groups in XML format.'), |
help => 'Batch_Creation', |
help => 'Batch_Creation', |
}, |
}, |
); |
); |