version 1.158.2.3, 2017/01/22 19:46:46
|
version 1.159, 2016/04/04 01:09:48
|
Line 91 sub print_course_creation_page {
|
Line 91 sub print_course_creation_page {
|
my $crstype = 'Community'; |
my $crstype = 'Community'; |
if ($env{'form.phase'} eq 'courseone') { |
if ($env{'form.phase'} eq 'courseone') { |
$crstype = 'Course'; |
$crstype = 'Course'; |
|
} elsif ($env{'form.phase'} eq 'placementone') { |
|
$crstype = 'Placement'; |
} |
} |
my $defdom=$env{'request.role.domain'}; |
my $defdom=$env{'request.role.domain'}; |
my %domdefaults = &Apache::lonnet::get_domain_defaults($defdom); |
my %domdefaults = &Apache::lonnet::get_domain_defaults($defdom); |
Line 130 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); |
} else { |
} elsif ($crstype eq 'Community') { |
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 147 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 187 function validate(formname) {
|
Line 207 function validate(formname) {
|
'oaas' => "Open all assessments", |
'oaas' => "Open all assessments", |
'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 content feedback to Course Coordinator", |
'scof' => "Set course content feedback to Course Coordinator", |
|
'cmmn' => "Communication", |
'cmmn' => "Communication", |
'dsrd' => "Disable student resource discussion", |
'dsrd' => "Disable student resource discussion", |
'dsuc' => "Disable student use of chat rooms", |
'dsuc' => "Disable student use of chat rooms", |
Line 234 function validate(formname) {
|
Line 253 function validate(formname) {
|
$lt{'navi'} = &mt('Community Contents'); |
$lt{'navi'} = &mt('Community Contents'); |
$lt{'cid'} = &mt('Community ID'); |
$lt{'cid'} = &mt('Community ID'); |
$lt{'scpf'} = &mt('Set community policy feedback to Coordinator'); |
$lt{'scpf'} = &mt('Set community policy feedback to Coordinator'); |
$lt{'scfc'} = &mt('Set resource content feedback to Coordinator'); |
$lt{'scfc'} = &mt('Set content feedback to Coordinator'); |
$lt{'scof'} = &mt('Set community content feedback to Coordinator'); |
|
$lt{'dsrd'} = &mt('Disable member resource discussion'); |
$lt{'dsrd'} = &mt('Disable member resource discussion'); |
$lt{'dsuc'} = &mt('Disable member use of chat rooms'); |
$lt{'dsuc'} = &mt('Disable member use of chat rooms'); |
$lt{'dads'} = &mt('Default Access Dates for Members'); |
$lt{'dads'} = &mt('Default Access Dates for Members'); |
Line 246 function validate(formname) {
|
Line 264 function validate(formname) {
|
$lt{'cc'} = &mt('(will be assigned Coordinator role)'); |
$lt{'cc'} = &mt('(will be assigned Coordinator role)'); |
$lt{'cgrs'} = &mt('Community Group Settings'); |
$lt{'cgrs'} = &mt('Community Group Settings'); |
$lt{'cgrq'} = &mt('Set a quota for the total disk space available for storage of community group portfolio files'); |
$lt{'cgrq'} = &mt('Set a quota for the total disk space available for storage of community group portfolio files'); |
|
} elsif ($crstype eq 'Placement') { |
|
$lt{'cinf'} = &mt('Placement Test Information'); |
|
$lt{'ctit'} = &mt('Placement Test Title'); |
|
$lt{'chsr'} = &mt('Placement Test Home Server'); |
|
$lt{'cidn'} = &mt('Placement Test ID/Number'); |
|
$lt{'crco'} = &mt('Placement Test Content'); |
|
$lt{'cncr'} = &mt('Completely new placement test'); |
|
$lt{'cecr'} = &mt('Clone an existing placement test'); |
|
$lt{'sacr'} = &mt('Do NOT generate as standard placement test'); |
|
$lt{'stco'} = &mt('standard placement tests only'); |
|
$lt{'navi'} = &mt('Placement Test Contents'); |
|
$lt{'cid'} = &mt('Placement Test ID'); |
} |
} |
my $js = <<END; |
my $js = <<END; |
<script type="text/javascript"> |
<script type="text/javascript"> |
Line 274 END
|
Line 304 END
|
my %titles = &Apache::lonlocal::texthash( |
my %titles = &Apache::lonlocal::texthash( |
courseone => 'Create a New Course', |
courseone => 'Create a New Course', |
groupone => 'Create a New Community', |
groupone => 'Create a New Community', |
|
placementone=> 'Create a New Placement Test', |
); |
); |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page($titles{$env{'form.phase'}},$js); |
&Apache::loncommon::start_page($titles{$env{'form.phase'}},$js); |
Line 353 END
|
Line 384 END
|
.'<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') |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
); |
); |
|
} |
|
my $blankchk; |
|
if ($crstype eq 'Placement') { |
|
$blankchk = ' checked="checked"'; |
} |
} |
# Table: New Course / Clone Course |
# Table: New Course / Clone Course |
$r->print(&Apache::lonhtmlcommon::row_headline() |
$r->print(&Apache::lonhtmlcommon::row_headline() |
Line 379 END
|
Line 414 END
|
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_title($lt{'fres'}) |
.&Apache::lonhtmlcommon::row_title($lt{'fres'}) |
.'<label>' |
.'<label>' |
.'<input type="radio" name="firstres" value="blank" />'.$lt{'blnk'} |
.'<input type="radio" name="firstres" value="blank"'.$blankchk.' />'.$lt{'blnk'} |
.'</label>' |
.'</label>'); |
.' '); |
|
if ($crstype eq 'Community') { |
if ($crstype eq 'Community') { |
$r->print('<label>' |
$r->print(' <label>' |
.'<input type="radio" name="firstres" value="nav" checked="checked" />'.$lt{'navi'} |
.'<input type="radio" name="firstres" value="nav" checked="checked" />'.$lt{'navi'} |
.'</label>'); |
.'</label>'); |
} else { |
} elsif ($crstype eq 'Course') { |
$r->print('<label>' |
$r->print(' <label>' |
.'<input type="radio" name="firstres" value="syl" checked="checked" />'.$lt{'sllb'} |
.'<input type="radio" name="firstres" value="syl" checked="checked" />'.$lt{'sllb'} |
.'</label>' |
.'</label>' |
.' ' |
.' ' |
Line 464 END
|
Line 498 END
|
.'<input type="checkbox" name="setcontent" checked="checked" />' |
.'<input type="checkbox" name="setcontent" checked="checked" />' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
|
|
.&Apache::lonhtmlcommon::row_title($lt{'scof'}) |
|
.'<input type="checkbox" name="setcomment" checked="checked" />' |
|
.&Apache::lonhtmlcommon::row_closure() |
|
|
|
.&Apache::lonhtmlcommon::row_headline() |
.&Apache::lonhtmlcommon::row_headline() |
.'<h3>'.$lt{'cmmn'}.'</h3>' |
.'<h3>'.$lt{'cmmn'}.'</h3>' |
.&Apache::lonhtmlcommon::row_closure() |
.&Apache::lonhtmlcommon::row_closure() |
Line 573 END
|
Line 603 END
|
<input type="submit" value="'.$lt{'opcm'}.'" /> |
<input type="submit" value="'.$lt{'opcm'}.'" /> |
</p>' |
</p>' |
); |
); |
|
} elsif ($crstype eq 'Placement') { |
|
$r->print(' |
|
<p> |
|
<input type="hidden" name="prevphase" value="placementone" /> |
|
<input type="hidden" name="phase" value="placementtwo" /> |
|
<input type="submit" value="'.$lt{'opcm'}.'" /> |
|
</p>' |
|
); |
} |
} |
$r->print('</form>'. |
$r->print('</form>'. |
$end_page); |
$end_page); |
Line 593 sub create_course {
|
Line 631 sub create_course {
|
$crstype='Course'; |
$crstype='Course'; |
$enrollstart=&Apache::lonhtmlcommon::get_date_from_form('startenroll'); |
$enrollstart=&Apache::lonhtmlcommon::get_date_from_form('startenroll'); |
$enrollend=&Apache::lonhtmlcommon::get_date_from_form('endenroll'); |
$enrollend=&Apache::lonhtmlcommon::get_date_from_form('endenroll'); |
|
} elsif ($env{'form.phase'} eq 'placementtwo') { |
|
$crstype='Placement'; |
} |
} |
$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'); |
Line 654 sub create_course {
|
Line 694 sub create_course {
|
endaccess => $endaccess, |
endaccess => $endaccess, |
setpolicy => $env{'form.setpolicy'}, |
setpolicy => $env{'form.setpolicy'}, |
setcontent => $env{'form.setcontent'}, |
setcontent => $env{'form.setcontent'}, |
setcomment => $env{'form.setcomment'}, |
|
reshome => $env{'form.reshome'}, |
reshome => $env{'form.reshome'}, |
setkeys => $env{'form.setkeys'}, |
setkeys => $env{'form.setkeys'}, |
keyauth => $env{'form.keyauth'}, |
keyauth => $env{'form.keyauth'}, |
Line 741 sub create_course {
|
Line 780 sub create_course {
|
} |
} |
|
|
sub print_intro_page { |
sub print_intro_page { |
my ($r,$show_all_choices,$cancreate,$permission) = @_; |
my ($r,$show_all_choices,$cancreate) = @_; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Create a New Course or Community'); |
&Apache::loncommon::start_page('Create a New Course, Community or Placement Test'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Options','Create_Course',undef,'Create_Courses'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Options','Create_Course',undef,'Create_Courses'); |
my $end_page = |
my $end_page = |
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
my $helplink=&Apache::loncommon::help_open_topic('Create_Course_Community',&mt('Help on Creating Courses and Communities')); |
my $helplink=&Apache::loncommon::help_open_topic('Create_Course_Community',&mt('Help on Creating Courses and Communities')); |
|
|
# Create menu |
# Create menu |
my $approve = 'Display requests awaiting approval'; |
|
if ($permission->{'create'}) { |
|
$approve = 'Approve or reject requests'; |
|
} |
|
my @menu; |
my @menu; |
@menu = |
@menu = |
({ categorytitle => 'Course/Community Creation', |
({ categorytitle => 'Course/Community Creation', |
Line 761 sub print_intro_page {
|
Line 796 sub print_intro_page {
|
{ |
{ |
linktext => 'Create a single course', |
linktext => 'Create a single course', |
url => '/adm/createcourse?phase=courseone', |
url => '/adm/createcourse?phase=courseone', |
permission => $permission->{'create'}, |
permission => 1, |
#help => '', |
#help => '', |
icon => 'crsnew.png', |
icon => 'crsnew.png', |
linktitle => 'Create a new course by completing an online form.' |
linktitle => 'Create a new course by completing an online form.' |
Line 769 sub print_intro_page {
|
Line 804 sub print_intro_page {
|
{ |
{ |
linktext => 'Create a single community', |
linktext => 'Create a single community', |
url => '/adm/createcourse?phase=groupone', |
url => '/adm/createcourse?phase=groupone', |
permission => $permission->{'create'} && $cancreate->{'Community'}, |
permission => $cancreate->{'Community'}, |
#help => '', |
#help => '', |
icon => 'crsnew.png', |
icon => 'crsnew.png', |
linktitle => 'Create a new collaborative community by completing an online form.' |
linktitle => 'Create a new collaborative community by completing an online form.' |
}, |
}, |
{ |
{ |
linktext => 'Create courses/communities by uploading an attributes file', |
linktext => 'Create a single placement test', |
|
url => '/adm/createcourse?phase=placementone', |
|
permission => $cancreate->{'Placement'}, |
|
#help => '', |
|
icon => 'crsnew.png', |
|
linktitle => 'Create a new placement test by completing an online form.' |
|
}, |
|
{ |
|
linktext => 'Create courses/communities/placement tests by uploading an attributes file', |
url => '/adm/createcourse?phase=batchone', |
url => '/adm/createcourse?phase=batchone', |
permission => $permission->{'create'}, |
permission => 1, |
help => 'Batch_Creation', |
help => 'Batch_Creation', |
icon => 'uplcrs.png', |
icon => 'uplcrs.png', |
linktitle => 'Upload an attributes file containing specifications for one or more courses or communities in XML format.' |
linktitle => 'Upload an attributes file containing specifications for one or more courses, communities or placement tests in XML format.' |
}, |
}, |
] |
] |
}, |
}, |
{ categorytitle => 'Course/Community Requests', |
{ categorytitle => 'Course/Community Requests', |
items => [ |
items => [ |
{ |
{ |
linktext => $approve, |
linktext => 'Approve or reject requests', |
url => '/adm/createcourse?phase=requestdisplay', |
url => '/adm/createcourse?phase=requestdisplay', |
permission => $show_all_choices, |
permission => $show_all_choices, |
#help => '', |
#help => '', |
icon => 'rcrs.png', |
icon => 'rcrs.png', |
linktitle => 'Display course and community creation requests submitted by authorized users, held pending approval by a Domain Coordinator.' |
linktitle => 'Display course, community creation and placement test requests submitted by authorized users, held pending approval by a Domain Coordinator.' |
}, |
}, |
{ |
{ |
linktext => 'View pending official course requests', |
linktext => 'View pending official course requests', |
Line 813 sub print_intro_page {
|
Line 856 sub print_intro_page {
|
permission => $show_all_choices, |
permission => $show_all_choices, |
#help => '', |
#help => '', |
icon => 'document-properties.png', |
icon => 'document-properties.png', |
linktitle => 'Display information about when, how and by whom courses and communities were created in this domain.' |
linktitle => 'Display information about when, how and by whom courses, communities and placement tests were created in this domain.' |
}, |
}, |
] |
] |
}, |
}, |
Line 830 sub print_intro_page {
|
Line 873 sub print_intro_page {
|
sub upload_batchfile { |
sub upload_batchfile { |
my $r = shift; |
my $r = shift; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Create a New Course or Community'); |
&Apache::loncommon::start_page('Create a New Course, Community, or Placement Test'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Upload Course/Community Attributes File','Create_Course',undef,'Create_Courses'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Upload Course/Community/Placement Test Attributes File','Create_Course',undef,'Create_Courses'); |
my $end_page = |
my $end_page = |
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
$r->print($start_page.$crumbs); |
$r->print($start_page.$crumbs); |
$r->print('<h3>'.&mt('Upload a courses or communities attributes file').'</h3>'); |
$r->print('<h3>'.&mt('Upload a courses, communities or placement tests attributes file').'</h3>'); |
$r->print('<form name="batchcreate" method="post" '. |
$r->print('<form name="batchcreate" method="post" '. |
'enctype="multipart/form-data" action="/adm/createcourse">'. |
'enctype="multipart/form-data" action="/adm/createcourse">'. |
'<input type="file" name="coursecreatorxml" />'. |
'<input type="file" name="coursecreatorxml" />'. |
'<input type="hidden" name="phase" value="batchtwo" /><br /><br />'. |
'<input type="hidden" name="phase" value="batchtwo" /><br /><br />'. |
'<input type="submit" name="batchsubmit" '. |
'<input type="submit" name="batchsubmit" '. |
'value="'.&mt('Create Courses/Communities').'" /></form>'); |
'value="'.&mt('Create Courses/Communities/Placement Tests').'" /></form>'); |
$r->print($end_page); |
$r->print($end_page); |
return; |
return; |
} |
} |
Line 849 sub upload_batchfile {
|
Line 892 sub upload_batchfile {
|
sub process_batchfile { |
sub process_batchfile { |
my $r = shift; |
my $r = shift; |
my $start_page = |
my $start_page = |
&Apache::loncommon::start_page('Create a New Course or Community'); |
&Apache::loncommon::start_page('Create a New Course, Community or Placement Test'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Outcome','Create_Course',undef,'Create_Courses'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Creation Outcome','Create_Course',undef,'Create_Courses'); |
my $end_page = |
my $end_page = |
&Apache::loncommon::end_page(); |
&Apache::loncommon::end_page(); |
Line 968 sub print_creation_logs {
|
Line 1011 sub print_creation_logs {
|
$crstype = '.'; |
$crstype = '.'; |
} elsif ($curr{'type'} eq 'community') { |
} elsif ($curr{'type'} eq 'community') { |
$crstype = 'Community'; |
$crstype = 'Community'; |
|
} elsif ($curr{'type'} eq 'placement') { |
|
$crstype = 'Placement'; |
} |
} |
|
|
my ($instcodefilter,$regexpok); |
my ($instcodefilter,$regexpok); |
Line 1058 sub print_creation_logs {
|
Line 1103 sub print_creation_logs {
|
my $showtype; |
my $showtype; |
if ($courses{$cid}{type} eq 'Community') { |
if ($courses{$cid}{type} eq 'Community') { |
$showtype = &mt('community'); |
$showtype = &mt('community'); |
|
} elsif ($courses{$cid}{type} eq 'Placement') { |
|
$showtype = &mt('placement test'); |
} else { |
} else { |
my $instcode = $courses{$cid}{inst_code}; |
my $instcode = $courses{$cid}{inst_code}; |
if ($instcode ne '') { |
if ($instcode ne '') { |
Line 1258 ENDJS
|
Line 1305 ENDJS
|
|
|
} |
} |
|
|
sub get_permission { |
|
my ($dom) = @_; |
|
my ($allowed,%permission); |
|
if (&Apache::lonnet::allowed('ccc',$dom)) { |
|
$allowed = 1; |
|
%permission = ( |
|
create => 1, |
|
); |
|
} elsif (&Apache::lonnet::allowed('dcc',$dom)) { |
|
$allowed = 1; |
|
} |
|
return ($allowed,\%permission); |
|
} |
|
|
|
# ===================================================================== Handler |
# ===================================================================== Handler |
sub handler { |
sub handler { |
my $r = shift; |
my $r = shift; |
Line 1282 sub handler {
|
Line 1315 sub handler {
|
return OK; |
return OK; |
} |
} |
|
|
my ($allowed,$permission) = &get_permission($env{'request.role.domain'}); |
my $show_all_choices = 0; |
if ($allowed) { |
my $primary_rev = &Apache::lonnet::get_server_loncaparev($env{'request.role.domain'}); |
my $show_all_choices = 0; |
my %cancreate = ( |
my $primary_rev = &Apache::lonnet::get_server_loncaparev($env{'request.role.domain'}); |
Community => 0, |
my %cancreate = ( |
Placement => 0, |
Community => 0, |
); |
); |
|
if (($primary_rev ne 'refused') && ($primary_rev ne 'error') && |
if (($primary_rev ne 'refused') && ($primary_rev ne 'error') && |
($primary_rev ne 'unknown_cmd') && ($primary_rev ne 'no_such_host')) { |
($primary_rev ne 'unknown_cmd') && ($primary_rev ne 'no_such_host')) { |
$show_all_choices = 1; |
$show_all_choices = 1; |
my ($primary_major,$primary_minor) = split(/\./,$primary_rev); |
my ($primary_major,$primary_minor) = split(/\./,$primary_rev); |
foreach my $key (keys(%cancreate)) { |
foreach my $key (keys(%cancreate)) { |
my ($needsmajor,$needsminor) = |
my ($needsmajor,$needsminor) = |
split(/\./,$Apache::lonnet::needsrelease{'course:crstype:'.$key}); |
split(/\./,$Apache::lonnet::needsrelease{'course:crstype:'.$key}); |
unless (($needsmajor > $primary_major) || |
unless (($needsmajor > $primary_major) || |
(($needsmajor == $primary_major) && ($needsminor > $primary_minor))) { |
(($needsmajor == $primary_major) && ($needsminor > $primary_minor))) { |
$cancreate{$key} = 1; |
$cancreate{$key} = 1; |
} |
|
} |
} |
} |
} |
|
} |
|
print STDERR "cacreate Community $cancreate{'Community'} cancreate Placement $cancreate{'Placement'}\n"; |
|
|
|
if (&Apache::lonnet::allowed('ccc',$env{'request.role.domain'})) { |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->send_http_header; |
$r->send_http_header; |
|
|
Line 1313 sub handler {
|
Line 1348 sub handler {
|
({href=>"/adm/createcourse", |
({href=>"/adm/createcourse", |
text=>"Creation Options", |
text=>"Creation Options", |
faq=>79,bug=>'Dom Coord Interface',}); |
faq=>79,bug=>'Dom Coord Interface',}); |
if (($permission->{'create'}) && |
if (($env{'form.phase'} eq 'coursetwo') || |
(($env{'form.phase'} eq 'coursetwo') || |
(($env{'form.phase'} eq 'grouptwo') && |
(($env{'form.phase'} eq 'grouptwo') && |
($cancreate{'Community'})) || |
($cancreate{'Community'})))) { |
(($env{'form.phase'} eq 'placementtwo') && |
|
($cancreate{'Placement'}))) { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/createcourse?phase=$env{'form.prevphase'}", |
({href=>"/adm/createcourse?phase=$env{'form.prevphase'}", |
text=>&mt('[_1] Creation Settings',), |
text=>&mt('[_1] Creation Settings',), |
Line 1326 sub handler {
|
Line 1362 sub handler {
|
text=>"Creation Outcome", |
text=>"Creation Outcome", |
faq=>9,bug=>'Dom Coord Interface',}); |
faq=>9,bug=>'Dom Coord Interface',}); |
&create_course($r); |
&create_course($r); |
} elsif (($permission->{'create'}) && |
} elsif (($env{'form.phase'} eq 'courseone') || |
(($env{'form.phase'} eq 'courseone') || |
(($env{'form.phase'} eq 'groupone') && |
(($env{'form.phase'} eq 'groupone') && |
($cancreate{'Community'})) || |
($cancreate{'Community'})))) { |
(($env{'form.phase'} eq 'placementone') && |
|
($cancreate{'Placement'}))) { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/createcourse?phase=$env{'form.phase'}", |
({href=>"/adm/createcourse?phase=$env{'form.phase'}", |
text=>&mt('[_1] Creation Settings',), |
text=>&mt('[_1] Creation Settings',), |
faq=>9,bug=>'Dom Coord Interface',}); |
faq=>9,bug=>'Dom Coord Interface',}); |
&print_course_creation_page($r); |
&print_course_creation_page($r); |
} elsif (($permission->{'create'}) && |
} elsif ($env{'form.phase'} eq 'batchone') { |
($env{'form.phase'} eq 'batchone')) { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/createcourse?phase=$env{'form.phase'}", |
({href=>"/adm/createcourse?phase=$env{'form.phase'}", |
text=>"Upload Description File", |
text=>"Upload Description File", |
faq=>9,bug=>'Dom Coord Interface',}); |
faq=>9,bug=>'Dom Coord Interface',}); |
&upload_batchfile($r); |
&upload_batchfile($r); |
} elsif (($permission->{'create'}) && |
} elsif ($env{'form.phase'} eq 'batchtwo') { |
($env{'form.phase'} eq 'batchtwo')) { |
|
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/createcourse?phase=$env{'form.prevphase'}", |
({href=>"/adm/createcourse?phase=$env{'form.prevphase'}", |
text=>"Upload Description File", |
text=>"Upload Description File", |
Line 1361 sub handler {
|
Line 1396 sub handler {
|
my $js = &courserequestbrowser_javascript(); |
my $js = &courserequestbrowser_javascript(); |
my $start_page=&Apache::loncommon::start_page('Display Requests',$js); |
my $start_page=&Apache::loncommon::start_page('Display Requests',$js); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Display Requests','Course_Requests',undef,'Course_Requests'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Display Requests','Course_Requests',undef,'Course_Requests'); |
my $context = 'domain'; |
|
unless ($permission->{'create'}) { |
|
$context = 'helpdesk'; |
|
} |
|
$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'}).'</div>'. |
'domain',$env{'request.role.domain'}).'</div>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
} elsif (($permission->{'create'}) && |
} elsif (($env{'form.phase'} eq 'requestchange') && ($show_all_choices)) { |
($env{'form.phase'} eq 'requestchange') && ($show_all_choices)) { |
|
if ($env{'form.queue'} eq 'pending') { |
if ($env{'form.queue'} eq 'pending') { |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/createcourse?phase=pendingdisplay", |
({href=>"/adm/createcourse?phase=pendingdisplay", |
Line 1400 sub handler {
|
Line 1430 sub handler {
|
my $js = &courserequestbrowser_javascript(); |
my $js = &courserequestbrowser_javascript(); |
my $start_page=&Apache::loncommon::start_page('Display Pending Queue',$js); |
my $start_page=&Apache::loncommon::start_page('Display Pending Queue',$js); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Display Pending Queue','Course_Requests',undef,'Course_Requests'); |
my $crumbs = &Apache::lonhtmlcommon::breadcrumbs('Display Pending Queue','Course_Requests',undef,'Course_Requests'); |
my $context = 'pending'; |
|
unless ($permission->{'create'}) { |
|
$context = 'displaypending'; |
|
} |
|
$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'}).'</div>'. |
'pending',$env{'request.role.domain'}).'</div>'. |
&Apache::loncommon::end_page()); |
&Apache::loncommon::end_page()); |
} elsif (($permission->{'create'}) && |
} elsif (($env{'form.phase'} eq 'requestvalidation') && ($show_all_choices)) { |
($env{'form.phase'} eq 'requestvalidation') && ($show_all_choices)) { |
|
my $js = &courserequestbrowser_javascript(); |
my $js = &courserequestbrowser_javascript(); |
&Apache::lonhtmlcommon::add_breadcrumb |
&Apache::lonhtmlcommon::add_breadcrumb |
({href=>"/adm/createcourse?phase=pendingdisplay", |
({href=>"/adm/createcourse?phase=pendingdisplay", |
Line 1436 sub handler {
|
Line 1461 sub handler {
|
&print_creation_logs($r); |
&print_creation_logs($r); |
$r->print('</div>'.&Apache::loncommon::end_page()); |
$r->print('</div>'.&Apache::loncommon::end_page()); |
} else { |
} else { |
&print_intro_page($r,$show_all_choices,\%cancreate,$permission); |
&print_intro_page($r,$show_all_choices,\%cancreate); |
} |
} |
} else { |
} else { |
$env{'user.error.msg'}= |
$env{'user.error.msg'}= |