version 1.159, 2016/04/04 01:09:48
|
version 1.162, 2016/04/15 19:27:37
|
Line 118 sub print_course_creation_page {
|
Line 118 sub print_course_creation_page {
|
my $endtime = time+(6*30*24*60*60); # 6 months from now, approx |
my $endtime = time+(6*30*24*60*60); # 6 months from now, approx |
my $access_table = &Apache::lonuserutils::date_setting_table($starttime, |
my $access_table = &Apache::lonuserutils::date_setting_table($starttime, |
$endtime,'create_defaultdates'); |
$endtime,'create_defaultdates'); |
if ($crstype eq 'Course') { |
if (($crstype eq 'Course') || ($crstype eq 'Placement')) { |
$enroll_table = &Apache::lonuserutils::date_setting_table($starttime, |
$enroll_table = &Apache::lonuserutils::date_setting_table($starttime, |
$endtime,'create_enrolldates'); |
$endtime,'create_enrolldates'); |
($krbdef,$krbdefdom) = |
($krbdef,$krbdefdom) = |
Line 132 sub print_course_creation_page {
|
Line 132 sub print_course_creation_page {
|
$krbform = &Apache::loncommon::authform_kerberos(%param); |
$krbform = &Apache::loncommon::authform_kerberos(%param); |
$intform = &Apache::loncommon::authform_internal(%param); |
$intform = &Apache::loncommon::authform_internal(%param); |
$locform = &Apache::loncommon::authform_local(%param); |
$locform = &Apache::loncommon::authform_local(%param); |
} elsif ($crstype eq 'Community') { |
} else { |
my $title_alert = &mt('A Community title is required'); |
my $title_alert = &mt('A Community title is required'); |
my $coord_alert = &mt('The username of the Coordinator is required'); |
my $coord_alert = &mt('The username of the Coordinator is required'); |
&js_escape(\$title_alert); |
&js_escape(\$title_alert); |
Line 149 function validate(formname) {
|
Line 149 function validate(formname) {
|
formname.submit(); |
formname.submit(); |
} |
} |
|; |
|; |
} else { |
|
my $title_alert = &mt('A Placement Test title is required'); |
|
my $coord_alert = &mt('The username of the Course Coordinator is required'); |
|
&js_escape(\$title_alert); |
|
&js_escape(\$coord_alert); |
|
$javascript_validations = qq| |
|
function validate(formname) { |
|
if (formname.title == '') { |
|
alert("$title_alert"); |
|
return; |
|
} |
|
if (formname.ccuname == '') { |
|
alert("$coord_alert"); |
|
} |
|
formname.submit(); |
|
} |
|
|; |
|
|
|
} |
} |
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'cinf' => "Course Information", |
'cinf' => "Course Information", |
Line 234 function validate(formname) {
|
Line 216 function validate(formname) {
|
'cgrq' => 'Set a quota for the total disk space available for storage of course group portfolio files', |
'cgrq' => 'Set a quota for the total disk space available for storage of course group portfolio files', |
'opco' => 'Open Course', |
'opco' => 'Open Course', |
'opcm' => 'Open Community', |
'opcm' => 'Open Community', |
|
'oppt' => 'Open Placement Test', |
); |
); |
$lt{'kaut'} = &mt('Key authority ([_1]id:domain[_2]) if other than course','<tt>','</tt>'); |
$lt{'kaut'} = &mt('Key authority ([_1]id:domain[_2]) if other than course','<tt>','</tt>'); |
$lt{'toin'} = &mt('to interface with institutional data, e.g., [_1]fs13glg231[_2] for [_3]Fall 2013 Geology 231[_4]','<tt>','</tt>','<i>','</i>'); |
$lt{'toin'} = &mt('to interface with institutional data, e.g., [_1]fs13glg231[_2] for [_3]Fall 2013 Geology 231[_4]','<tt>','</tt>','<i>','</i>'); |
Line 349 END
|
Line 332 END
|
.'<input type="text" size="30" name="crsid" />' |
.'<input type="text" size="30" name="crsid" />' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
); |
); |
if ($crstype eq 'Course') { |
if (($crstype eq 'Course') || ($crstype eq 'Placement')) { |
$r->print(&Apache::lonhtmlcommon::row_headline() |
$r->print(&Apache::lonhtmlcommon::row_headline() |
.'<h3>'.$lt{'iinf'}.'</h3>' |
.'<h3>'.$lt{'iinf'}.'</h3>' |
.$lt{'stat'}.' ' |
.$lt{'stat'}); |
.&mt('Default credits can also be specified, if different from the domain defaults (official courses: [_1]; unofficial courses: [_2]; textbook courses: [_3]).', |
if ($crstype eq 'Course') { |
$domdefaults{'officialcredits'},$domdefaults{'unofficialcredits'},$domdefaults{'textbookcredits'}) |
$r->print(' ' |
.&Apache::lonhtmlcommon::row_closure() |
.&mt('Default credits can also be specified, if different from the domain defaults (official courses: [_1]; unofficial courses: [_2]; textbook courses: [_3]).', |
|
$domdefaults{'officialcredits'},$domdefaults{'unofficialcredits'},$domdefaults{'textbookcredits'})); |
|
} |
|
$r->print(&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_title($lt{'ccod'}) |
.&Apache::lonhtmlcommon::row_title($lt{'ccod'}) |
.'<input type="text" size="30" name="crscode" />' |
.'<input type="text" size="30" name="crscode" />' |
.'<br />('.$lt{'toin'}.')' |
.'<br />('.$lt{'toin'}.')' |
Line 372 END
|
Line 357 END
|
.'<br />('.$lt{'cscs'}.')' |
.'<br />('.$lt{'cscs'}.')' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
); |
); |
if ($domdefaults{'officialcredits'} || $domdefaults{'unofficialcredits'} || $domdefaults{'textbookcredits'}) { |
if (($crstype eq 'Course') && ($domdefaults{'officialcredits'} || |
|
$domdefaults{'unofficialcredits'} || $domdefaults{'textbookcredits'})) { |
$r->print(&Apache::lonhtmlcommon::row_title($lt{'ccre'}) |
$r->print(&Apache::lonhtmlcommon::row_title($lt{'ccre'}) |
.'<input type="text" size="3" name="defaultcredits" />' |
.'<input type="text" size="3" name="defaultcredits" />' |
.'<br />('.$lt{'cred'}.')' |
.'<br />('.$lt{'cred'}.')' |
Line 530 END
|
Line 516 END
|
.'<input type="text" name="reshome" size="30" value="/res/'.$defdom.'/" />' |
.'<input type="text" name="reshome" size="30" value="/res/'.$defdom.'/" />' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
); |
); |
if ($crstype eq 'Course') { |
unless ($crstype eq 'Community') { |
$r->print(&Apache::lonhtmlcommon::row_headline() |
$r->print(&Apache::lonhtmlcommon::row_headline() |
.'<h3>'.$lt{'aens'}.'</h3>' |
.'<h3>'.$lt{'aens'}.'</h3>' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
Line 608 END
|
Line 594 END
|
<p> |
<p> |
<input type="hidden" name="prevphase" value="placementone" /> |
<input type="hidden" name="prevphase" value="placementone" /> |
<input type="hidden" name="phase" value="placementtwo" /> |
<input type="hidden" name="phase" value="placementtwo" /> |
<input type="submit" value="'.$lt{'opcm'}.'" /> |
<input type="button" onclick="verify_message(this.form)" value="'.$lt{'oppt'}.'" /> |
</p>' |
</p>' |
); |
); |
} |
} |
Line 1335 sub handler {
|
Line 1321 sub handler {
|
} |
} |
} |
} |
} |
} |
print STDERR "cacreate Community $cancreate{'Community'} cancreate Placement $cancreate{'Placement'}\n"; |
|
|
|
if (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) { |
if (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) { |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |