version 1.158.2.2, 2016/10/24 03:05:25
|
version 1.158.2.3.4.1, 2020/05/22 21:52:14
|
Line 99 sub print_course_creation_page {
|
Line 99 sub print_course_creation_page {
|
foreach my $server (sort(keys(%host_servers))) { |
foreach my $server (sort(keys(%host_servers))) { |
$course_home .= qq{<option value="$server"}; |
$course_home .= qq{<option value="$server"}; |
if ($server eq $Apache::lonnet::perlvar{'lonHostID'}) { |
if ($server eq $Apache::lonnet::perlvar{'lonHostID'}) { |
$course_home .= " selected "; |
$course_home .= ' selected="selected"'; |
} |
} |
$course_home .= qq{>$server $host_servers{$server}</option>}; |
$course_home .= qq{>$server $host_servers{$server}</option>}; |
} |
} |
Line 116 sub print_course_creation_page {
|
Line 116 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'); |
|
my $openallfrom = |
|
&Apache::lonhtmlcommon::date_setter('ccrs','openallfrom',$starttime); |
if ($crstype eq 'Course') { |
if ($crstype eq 'Course') { |
$enroll_table = &Apache::lonuserutils::date_setting_table($starttime, |
$enroll_table = &Apache::lonuserutils::date_setting_table($starttime, |
$endtime,'create_enrolldates'); |
$endtime,'create_enrolldates'); |
Line 185 function validate(formname) {
|
Line 187 function validate(formname) {
|
'shd' => 'Shift date parameters by number of days', |
'shd' => 'Shift date parameters by number of days', |
'assp' => "Assessment Parameters", |
'assp' => "Assessment Parameters", |
'oaas' => "Open all assessments", |
'oaas' => "Open all assessments", |
|
'sta' => "starting from:", |
'mssg' => "Messaging", |
'mssg' => "Messaging", |
'scpf' => "Set course policy feedback to Course Coordinator", |
'scpf' => "Set course policy feedback to Course Coordinator", |
'scfc' => "Set resource content feedback to Course Coordinator", |
'scfc' => "Set resource content feedback to Course Coordinator", |
Line 249 function validate(formname) {
|
Line 252 function validate(formname) {
|
} |
} |
my $js = <<END; |
my $js = <<END; |
<script type="text/javascript"> |
<script type="text/javascript"> |
|
// <![CDATA[ |
|
|
var editbrowser = null; |
var editbrowser = null; |
function openbrowser(formname,elementname) { |
function openbrowser(formname,elementname) { |
var url = '/res/?'; |
var url = '/res/?'; |
Line 267 function openbrowser(formname,elementnam
|
Line 272 function openbrowser(formname,elementnam
|
editbrowser.focus(); |
editbrowser.focus(); |
} |
} |
$javascript_validations |
$javascript_validations |
|
|
|
// ]]> |
</script> |
</script> |
$coursebrowserjs |
$coursebrowserjs |
END |
END |
Line 285 END
|
Line 292 END
|
'Create_Courses'); |
'Create_Courses'); |
$r->print($start_page.$crumbs); |
$r->print($start_page.$crumbs); |
|
|
$r->print('<form action="/adm/createcourse" method="post" name="ccrs" action=""><div class="LC_createcourse">' |
$r->print('<form action="/adm/createcourse" method="post" name="ccrs"><div class="LC_createcourse">' |
.&Apache::lonhtmlcommon::start_pick_box() |
.&Apache::lonhtmlcommon::start_pick_box() |
|
|
.&Apache::lonhtmlcommon::row_headline() |
.&Apache::lonhtmlcommon::row_headline() |
Line 352 END
|
Line 359 END
|
.'<span class="LC_nobreak">' |
.'<span class="LC_nobreak">' |
.'<input type="radio" name="uniquecode" value="1" />'.&mt('Yes').(' 'x2) |
.'<input type="radio" name="uniquecode" value="1" />'.&mt('Yes').(' 'x2) |
.'<input type="radio" name="uniquecode" value="0" checked="checked" />'.&mt('No') |
.'<input type="radio" name="uniquecode" value="0" checked="checked" />'.&mt('No') |
|
.'</span>' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
); |
); |
} |
} |
Line 399 END
|
Line 407 END
|
.&Apache::lonhtmlcommon::row_closure(1) |
.&Apache::lonhtmlcommon::row_closure(1) |
.&Apache::lonhtmlcommon::end_pick_box() |
.&Apache::lonhtmlcommon::end_pick_box() |
|
|
.'<td> </td>' |
.'</td><td> </td>' |
|
|
# Clone Course: |
# Clone Course: |
.'<td>' |
.'<td>' |
Line 449 END
|
Line 457 END
|
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
|
|
.&Apache::lonhtmlcommon::row_title($lt{'oaas'}) |
.&Apache::lonhtmlcommon::row_title($lt{'oaas'}) |
.'<input type="checkbox" name="openall" />' |
.'<span class="LC_nobreak">' |
|
.'<label><input type="radio" name="openall" value="0" checked="checked" />'.$lt{'no'}.'</label>'.(' 'x2) |
|
.'<label><input type="radio" name="openall" value="1" />'.$lt{'yes'}.'</label>'.', ' |
|
.$lt{'sta'}.' '.$openallfrom.'</span>' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
|
|
.&Apache::lonhtmlcommon::row_headline() |
.&Apache::lonhtmlcommon::row_headline() |
Line 563 END
|
Line 574 END
|
<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" /> |
<input type="button" onclick="verify_message(this.form)" value="'.$lt{'opco'}.'" />' |
<input type="button" onclick="verify_message(this.form)" value="'.$lt{'opco'}.'" /> |
|
</p>' |
); |
); |
} elsif ($crstype eq 'Community') { |
} elsif ($crstype eq 'Community') { |
$r->print(' |
$r->print(' |
Line 585 sub create_course {
|
Line 597 sub create_course {
|
my $ccuname =&LONCAPA::clean_username($env{'form.ccuname'}); |
my $ccuname =&LONCAPA::clean_username($env{'form.ccuname'}); |
my $ccdomain=&LONCAPA::clean_domain($env{'form.ccdomain'}); |
my $ccdomain=&LONCAPA::clean_domain($env{'form.ccdomain'}); |
my $crstype = 'Community'; |
my $crstype = 'Community'; |
my ($enrollstart,$enrollend,$startaccess,$endaccess); |
my ($enrollstart,$enrollend,$startaccess,$endaccess,$openallfrom); |
my %domdefaults = |
my %domdefaults = |
&Apache::lonnet::get_domain_defaults($env{'request.role.domain'}); |
&Apache::lonnet::get_domain_defaults($env{'request.role.domain'}); |
|
|
Line 596 sub create_course {
|
Line 608 sub create_course {
|
} |
} |
$startaccess = &Apache::lonhtmlcommon::get_date_from_form('startaccess'); |
$startaccess = &Apache::lonhtmlcommon::get_date_from_form('startaccess'); |
$endaccess = &Apache::lonhtmlcommon::get_date_from_form('endaccess'); |
$endaccess = &Apache::lonhtmlcommon::get_date_from_form('endaccess'); |
|
$openallfrom = &Apache::lonhtmlcommon::get_date_from_form('openallfrom'); |
|
|
my $autharg; |
my $autharg; |
my $authtype; |
my $authtype; |
Line 661 sub create_course {
|
Line 674 sub create_course {
|
disresdis => $env{'form.disresdis'}, |
disresdis => $env{'form.disresdis'}, |
disablechat => $env{'form.disablechat'}, |
disablechat => $env{'form.disablechat'}, |
openall => $env{'form.openall'}, |
openall => $env{'form.openall'}, |
|
openallfrom => $openallfrom, |
firstres => $env{'form.firstres'} |
firstres => $env{'form.firstres'} |
}; |
}; |
|
|
Line 1367 sub handler {
|
Line 1381 sub handler {
|
} |
} |
$r->print($start_page.$crumbs."\n".'<div>'. |
$r->print($start_page.$crumbs."\n".'<div>'. |
&Apache::loncoursequeueadmin::display_queued_requests( |
&Apache::loncoursequeueadmin::display_queued_requests( |
$context,$env{'request.role.domain'},undef).'</div>'. |
$context,$env{'request.role.domain'}).'</div>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
} elsif (($permission->{'create'}) && |
} elsif (($permission->{'create'}) && |
($env{'form.phase'} eq 'requestchange') && ($show_all_choices)) { |
($env{'form.phase'} eq 'requestchange') && ($show_all_choices)) { |