--- loncom/interface/lonrequestcourse.pm 2017/08/11 00:24:53 1.101 +++ loncom/interface/lonrequestcourse.pm 2025/01/10 22:45:55 1.118 @@ -1,7 +1,7 @@ # The LearningOnline Network # Request a course # -# $Id: lonrequestcourse.pm,v 1.101 2017/08/11 00:24:53 raeburn Exp $ +# $Id: lonrequestcourse.pm,v 1.118 2025/01/10 22:45:55 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('Records/page:').' '. - &Apache::lonmeta::selectbox('show',$curr->{'show'},undef, + &Apache::lonmeta::selectbox('show',$curr->{'show'},'',undef, (&mt('all'),5,10,20,50,100,1000,10000)). ' | '; my $startform = @@ -2754,7 +2765,7 @@ sub requestlog_display_filter { $typename = $typenames->{$crstype}; } } - $output .= ''."\n"; + $output .= ''."\n"; } $output .= ''; } @@ -2930,7 +2941,7 @@ sub print_review { $inst_values .= ' | '.$env{'form.coursecredits'}.' | '; } - my %ctxt = &clone_text(); + my %ctxt = &clone_text($env{'form.crstype'}); $inst_headers .= ''.&mt('Clone From').' | '; if (($env{'form.cloning'}) && ($env{'form.clonecrs'} =~ /^$match_name$/) && @@ -2942,7 +2953,8 @@ sub print_review { my %courseenv = &Apache::lonnet::userenvironment($env{'form.clonedom'}, $env{'form.clonecrs'},('description','internal.coursecode')); if (keys(%courseenv) > 0) { - $inst_headers .= ''.$ctxt{'dsh'}.' | '; + $inst_headers .= ''.$ctxt{'dsh'}.' | '. + ''.$ctxt{'dpl'}.' | '; $inst_values .= ''.$courseenv{'description'}.' '; my $cloneinst = $courseenv{'internal.coursecode'}; if ($cloneinst ne '') { @@ -2958,6 +2970,14 @@ sub print_review { } else { $inst_values .= $ctxt{'ncd'}; } + $inst_values .= ' | '; + if ($env{'form.tinyurls'} eq 'delete') { + $inst_values .= $ctxt{'nsl'}; + } elsif ($env{'form.tinyurls'} eq 'transfer') { + $inst_values .= $ctxt{'tsl'}; + } else { + $inst_values .= $ctxt{'csl'}; + } $inst_values .= ' | '; } else { $inst_values .= ''.&mt('Unknown').' | '; @@ -3189,7 +3209,7 @@ sub clone_form { } elsif ($crstype eq 'placement') { $type = 'Placement'; } - my %lt = &clone_text(); + my %lt = &clone_text($crstype); my $output .= &Apache::lonhtmlcommon::row_title($lt{'dmn'}).''. @@ -3206,20 +3226,38 @@ sub clone_form { '
---|