--- loncom/interface/lonrequestcourse.pm 2014/01/08 17:18:12 1.76 +++ loncom/interface/lonrequestcourse.pm 2021/03/06 13:44:51 1.110 @@ -1,7 +1,7 @@ # The LearningOnline Network # Request a course # -# $Id: lonrequestcourse.pm,v 1.76 2014/01/08 17:18:12 bisitz Exp $ +# $Id: lonrequestcourse.pm,v 1.110 2021/03/06 13:44:51 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -119,6 +119,10 @@ use Apache::loncoursequeueadmin; use Apache::lonuserutils; use LONCAPA qw(:DEFAULT :match); +my $registered_flush; +my $registered_instcats; +my $modified_dom; + sub handler { my ($r) = @_; &Apache::loncommon::content_type($r,'text/html'); @@ -127,6 +131,10 @@ sub handler { return OK; } + $registered_flush = 0; + $registered_instcats = 0; + $modified_dom = ''; + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['action','showdom','cnum','state','crstype','queue','tabs']); &Apache::lonhtmlcommon::clear_breadcrumbs(); @@ -155,6 +163,23 @@ sub handler { } if ($canreq) { + if (($env{'form.crstype'} eq 'lti') && ($env{'request.lti.login'}) && + ($env{'form.lti.reqrole'} eq 'cc') && ($env{'form.lti.reqcrs'}) && + ($env{'form.lti.sourcecrs'} ne '')) { + if ($action eq 'process') { + if ($can_request{'lti'}) { + my %domconfig = &Apache::lonnet::get_dom('configuration',['requestcourses'],$dom); + &process_textbook_request($r,$dom,$action,\%domdefs,\%domconfig,\%can_request,'lti'); + } else { + $r->print(&header('Course Request','','','',{ 'only_body' => 1}). + '
'.&mt('You do not have privileges to request creation of LTI courses.').'
'. + ''.&mt('Make another request').'
'); + unless ($customized) { + $r->print(''.&mt('Make another request').'
'); + } } } } elsif ($state eq 'reqauthor') { @@ -2041,18 +2131,32 @@ sub print_personnel_menu { official => 'Requestor is automatically assigned Course Coordinator role.', ); $lt{'unofficial'} = $lt{'official'}; - $lt{'textbook'} = $lt{'textbook'}; + $lt{'textbook'} = $lt{'official'}; + $lt{'placement'} = $lt{'official'}; $output .= &Apache::lonhtmlcommon::row_headline(). '