--- loncom/interface/lonrequestcourse.pm 2016/09/05 01:46:08 1.99 +++ loncom/interface/lonrequestcourse.pm 2023/03/29 16:01:13 1.117 @@ -1,7 +1,7 @@ # The LearningOnline Network # Request a course # -# $Id: lonrequestcourse.pm,v 1.99 2016/09/05 01:46:08 raeburn Exp $ +# $Id: lonrequestcourse.pm,v 1.117 2023/03/29 16:01:13 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.').'

'. + '
'. + &Apache::loncommon::end_page()); + } + } + return OK; + } if (($env{'form.crstype'} eq 'textbook') || (scalar(keys(%can_request)) == 1) && ($can_request{'textbook'})) { my %domconfig = &Apache::lonnet::get_dom('configuration',['requestcourses'],$dom); @@ -192,7 +217,8 @@ sub handler { } } else { if ($can_request{'textbook'}) { - &print_textbook_form($r,$dom,\@incdoms,\%domdefs,$domconfig{'requestcourses'},\%can_request); + &print_textbook_form($r,$dom,\@incdoms,\%domdefs,$domconfig{'requestcourses'}, + \%can_request,'textbook'); } else { &textbook_request_disabled($r,$dom,$action,\%can_request); } @@ -311,8 +337,6 @@ sub handler { $jscript = &Apache::lonhtmlcommon::set_form_elements($elementsref,\%stored); if ($state eq 'courseinfo') { $jscript .= &cloning_javascript(); - } elsif ($state eq 'process') { - $jscript .= &processing_javascript(); } } } @@ -424,17 +448,6 @@ function setCloneDisplay(courseForm) { END } -sub processing_javascript { - return <<"END"; -function hideProcessing() { - if (document.getElementById('processing')) { - document.getElementById('processing').style.display="none"; - } -} - -END -} - sub get_breadcrumbs { my ($dom,$action,$state,$states,$trail) = @_; my ($crumb,$newinstcode,$codechk,$checkedcode,$numtitles,$description); @@ -551,6 +564,7 @@ sub form_elements { clonedom => 'selectbox', datemode => 'radio', dateshift => 'text', + tinyurls => 'radio', }, enrollment => { accessstart_month => 'selectbox', @@ -712,9 +726,6 @@ sub onload_action { if ($state eq 'courseinfo') { $loaditems{'onload'} .= 'javascript:setCloneDisplay(document.requestcrs);'; } - if ($state eq 'process') { - $loaditems{'onload'} .= 'javascript:hideProcessing();'; - } } return \%loaditems; } @@ -2121,14 +2132,15 @@ sub print_personnel_menu { } } } - for (my $i=0; $i<$persontotal; $i++) { + my ($trusted,$untrusted) = &Apache::lonnet::trusted_domains('enroll',$dom); + for (my $i=0; $i<$persontotal; $i++) { my @linkargs = map { 'person_'.$i.'_'.$_ } (@items); my $linkargstr = join("','",@linkargs); my $uname_form = ''; my $onchange = 'javascript:fix_domain('."'$formname','person_".$i."_dom',". "'person_".$i."_hidedom','person_".$i."_uname'".');'; my $udom_form = &Apache::loncommon::select_dom_form($dom,'person_'.$i.'_dom','', - 1,$onchange). + 1,$onchange,undef,$trusted,$untrusted). ''; my %form_elems; foreach my $item (@items) { @@ -2399,7 +2411,7 @@ sub print_cancel_request { &Apache::loncommon::start_data_table_row(). ''.$history{details}{'cdescr'}.''. &Apache::lonlocal::locallocaltime($timestamp).''. - ''.$showtype.''. + ''.&mt($showtype).''. &Apache::loncommon::end_data_table_row(). &Apache::loncommon::end_data_table(). '
'; @@ -2714,7 +2726,7 @@ sub requestlog_display_filter { my $nolink = 1; my $output = ''; my $startform = @@ -2753,7 +2765,7 @@ sub requestlog_display_filter { $typename = $typenames->{$crstype}; } } - $output .= ''."\n"; + $output .= ''."\n"; } $output .= ''; } @@ -2929,7 +2941,7 @@ sub print_review { $inst_values .= ''; } - my %ctxt = &clone_text(); + my %ctxt = &clone_text($env{'form.crstype'}); $inst_headers .= ''; if (($env{'form.cloning'}) && ($env{'form.clonecrs'} =~ /^$match_name$/) && @@ -2941,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 .= ''; + $inst_headers .= ''. + ''; $inst_values .= ''; } else { $inst_values .= ''; @@ -3188,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'}).''. @@ -3205,20 +3226,38 @@ sub clone_form { '
'. - ''. + ''. + &Apache::lonhtmlcommon::row_closure(1). + &Apache::lonhtmlcommon::row_title($lt{'dpl'}).'

'. &Apache::lonhtmlcommon::row_closure(1); return $output; } sub clone_text { - return &Apache::lonlocal::texthash( + my ($crstype) = @_; + my %lt = &Apache::lonlocal::texthash( 'cid' => 'Course ID', 'dmn' => 'Domain', 'dsh' => 'Date Shift', 'ncd' => 'Do not clone date parameters', 'prd' => 'Clone date parameters as-is', 'shd' => 'Shift date parameters by number of days', - ); + 'dpl' => 'URL shortcuts (for deep linking)', + 'nsl' => 'Do not clone URL shortcuts', + 'tsl' => 'Transfer URL shortcuts from existing course to new course', + 'csl' => 'Create new URL shortcuts in new course', + ); + if ($crstype eq 'Community') { + $lt{'tsl'} = &mt('Transfer URL shortcuts from existing course to new community'); + $lt{'csl'} = &mt('Create new URL shortcuts in new course'); + } + return %lt; } sub coursecode_form { @@ -3244,7 +3283,7 @@ sub coursecode_form { } if (@{$codetitles} > 0) { my $lastitem = pop(@{$codetitles}); - my $lastinput = ''; + my $lastinput = ''; if (@{$codetitles} > 0) { my $helplink; if (defined($helpitem{$context})) { @@ -3352,18 +3391,23 @@ sub get_course_dom { return $env{'user.domain'}; } } - my @possible_doms; + my (@possible_doms,%willtrust); foreach my $type (@{$types}) { my $dom_str = $env{'environment.reqcrsotherdom.'.$type}; if ($dom_str ne '') { my @domains = split(',',$dom_str); foreach my $entry (@domains) { my ($extdom,$extopt) = split(':',$entry); - if ($extdom eq $env{'request.role.domain'}) { - return $extdom; - } - unless(grep(/^\Q$extdom\E$/,@possible_doms)) { - push(@possible_doms,$extdom); + unless (exists($willtrust{$extdom})) { + $willtrust{$extdom} = &Apache::lonnet::will_trust('reqcrs',$env{'user.domain'},$extdom); + } + if ($willtrust{$extdom}) { + if ($extdom eq $env{'request.role.domain'}) { + return $extdom; + } + unless(grep(/^\Q$extdom\E$/,@possible_doms)) { + push(@possible_doms,$extdom); + } } } } @@ -3645,6 +3689,19 @@ sub print_request_outcome { } } } + if ($env{'form.chome'} eq 'default') { + my %servers = &Apache::lonnet::get_servers($dom,'library'); + my $numlib = keys(%servers); + if ($numlib) { + my $loadm=10000000; + my $chome; + foreach my $tryserver (keys(%servers)) { + ($chome,$loadm) = + &Apache::lonnet::compare_server_load($tryserver,$chome,$loadm); + } + $env{'form.chome'} = $chome; + } + } my $details = { owner => $env{'user.name'}, domain => $env{'user.domain'}, @@ -3660,6 +3717,7 @@ sub print_request_outcome { clonecrs => $clonecrs, datemode => $env{'form.datemode'}, dateshift => $env{'form.dateshift'}, + tinyurls => $env{'form.tinyurls'}, sectotal => $sectotal, sections => \%sections, crosslisttotal => $crosslisttotal, @@ -3793,7 +3851,9 @@ sub process_request { $storeresult = 'rejected'; } elsif ($disposition eq 'process') { my %domdefs = &Apache::lonnet::get_domain_defaults($dom); - my ($logmsg,$newusermsg,$addresult,$enrollcount,$response,$keysmsg,%longroles,$code); + my ($logmsg,$newusermsg,$addresult,$enrollcount,$response, + $keysmsg,%longroles,$code); + my $clonemsg = []; my $type = 'Course'; if ($crstype eq 'community') { $type = 'Community'; @@ -3802,9 +3862,20 @@ sub process_request { foreach my $role (@roles) { $longroles{$role}=&Apache::lonnet::plaintext($role,$type); } - $r->print('
'."\n". - &mt('Your request is being processed; this page will update when processing is complete.'). - '
'); + my $preamble = '
'. + '
'. + &mt("Please be patient while your request is processed"). + '
'. + '
'; + my $closure = < +// + +ENDCLOSE + my %prog_state = &Apache::lonhtmlcommon::Create_PrgWin($r,undef,$preamble); + &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Processing ...')); $r->rflush(); if (ref($details) eq 'HASH') { if ($details->{'clonecrs'}) { @@ -3826,9 +3897,12 @@ sub process_request { $customitems{'_LC_coursestartdate'} = $accessstart; $customitems{'_LC_courseenddate'} = $accessend; my ($result,$postprocess) = &Apache::loncoursequeueadmin::course_creation($dom,$cnum, - 'autocreate',$details,\$logmsg,\$newusermsg,\$addresult, - \$enrollcount,\$response,\$keysmsg,\%domdefs,\%longroles, - \$code,\%customitems); + 'autocreate',$details,\$logmsg,$clonemsg,\$newusermsg, + \$addresult,\$enrollcount,\$response,\$keysmsg,\%domdefs, + \%longroles,\$code,\%customitems); + &Apache::lonhtmlcommon::Update_PrgWin($r,\%prog_state,&mt('Finished!')); + &Apache::lonhtmlcommon::Close_PrgWin($r,\%prog_state); + $r->print($closure); if (ref($postprocess) eq 'HASH') { $customized = $postprocess->{'createdcustomized'}; } @@ -3862,7 +3936,39 @@ sub process_request { $output .= '
'.$role_result; } $output .= '

'; + if ($logmsg) { + $output .= '

'.$logmsg.'

'; + } + if ((ref($clonemsg) eq 'ARRAY') && (@{$clonemsg})) { + $output .= '

'; + my $user_lh = &Apache::loncommon::user_lang($env{'user.name'},$env{'user.domain'}); + foreach my $item (@{$clonemsg}) { + if (ref($item) eq 'HASH') { + $output .= &mt_user($user_lh,$item->{mt}, + @{$item->{args}}).'
'."\n"; + } + } + $output .= '

'."\n"; + } $creationresult = 'created'; + # Flush the course logs so reverse user roles immediately updated + unless ($registered_flush) { + my $handlers = $r->get_handlers('PerlCleanupHandler'); + $r->set_handlers('PerlCleanupHandler' => [\&Apache::lonnet::flushcourselogs,@{$handlers}]); + $registered_flush=1; + } + if ($instcode ne '') { + &Apache::lonnet::devalidate_cache_new('instcats',$dom); + # Update cache of self-cataloging courses on institution's server(s). + if (&Apache::lonnet::shared_institution($dom)) { + unless ($registered_instcats) { + my $handlers = $r->get_handlers('PerlCleanupHandler'); + $r->set_handlers('PerlCleanupHandler' => [\&devalidate_remote_instcats,@{$handlers}]); + $registered_instcats=1; + $modified_dom = $dom; + } + } + } } else { $output = ''; if ($crstype eq 'community') { @@ -3971,7 +4077,7 @@ sub process_request { } elsif ($disposition eq 'pending') { my $pendingform; if ($crstype ne 'official') { - $pendingform = &pending_validation_form($dom,$cnum,$crstype,$now,$token, + $pendingform = &pending_validation_form($r,$dom,$cnum,$crstype,$now,$token, $lonhost,$env{'form.cdescr'}); } if ($pendingform) { @@ -3998,6 +4104,22 @@ sub process_request { } } +sub devalidate_remote_instcats { + if ($modified_dom ne '') { + my %servers = &Apache::lonnet::internet_dom_servers($modified_dom); + my %thismachine; + map { $thismachine{$_} = 1; } &Apache::lonnet::current_machine_ids(); + if (keys(%servers)) { + foreach my $server (keys(%servers)) { + next if ($thismachine{$server}); + &Apache::lonnet::remote_devalidate_cache($server,['instcats:'.$modified_dom]); + } + } + $modified_dom = ''; + } + return; +} + sub custom_formitems { my ($preprocess,$customhash) = @_; return unless ((ref($preprocess) eq 'HASH') && (ref($customhash) eq 'HASH')); @@ -4273,7 +4395,7 @@ sub notification_information { } sub pending_validation_form { - my ($cdom,$cnum,$crstype,$now,$token,$lonhost,$cdesc) = @_; + my ($r,$cdom,$cnum,$crstype,$now,$token,$lonhost,$cdesc) = @_; my $output; my %postvalues = ( 'owner' => $env{'user.name'}.':'.$env{'user.domain'}, @@ -4306,9 +4428,12 @@ sub pending_validation_form { $buttontext = &mt('Create course'); } } + my $hostname = &Apache::lonnet::hostname($lonhost); my $protocol = $Apache::lonnet::protocol{$lonhost}; $protocol = 'http' if ($protocol ne 'https'); - my $crscreator = $protocol.'://'.&Apache::lonnet::hostname($lonhost).'/cgi-bin/createpending.pl'; + my $alias = &Apache::lonnet::use_proxy_alias($r,$lonhost); + $hostname = $alias if ($alias ne ''); + my $crscreator = $protocol.'://'.$hostname.'/cgi-bin/createpending.pl'; $output .= ''."\n". ''."\n". ''."\n". @@ -4384,6 +4509,7 @@ sub retrieve_settings { } $env{'form.datemode'} = $reqinfo{'datemode'}; $env{'form.dateshift'} = $reqinfo{'dateshift'}; + $env{'form.tinyurls'} = $reqinfo{'tinyurls'}; if ($reqinfo{'crstype'} eq 'official') { $env{'form.autoadds'} = $reqinfo{'autoadds'}; $env{'form.autodrops'} = $reqinfo{'autodrops'}; @@ -4535,9 +4661,11 @@ sub generate_date_items { } sub print_textbook_form { - my ($r,$dom,$incdoms,$domdefs,$settings,$can_request) = @_; + my ($r,$dom,$incdoms,$domdefs,$settings,$can_request,$crstype,$formhash) = @_; my (%prefab,%ordered,%numprefab); - my $crstype = 'textbook'; + if ($crstype eq '') { + $crstype = 'textbook'; + } # # Retrieve list of prefabricated courses (textbook courses and templates) cloneable by user # @@ -4597,7 +4725,7 @@ sub print_textbook_form { owner => $courseinfo{'internal.courseowner'}, releaserequired => $courseinfo{'internal.releaserequired'}, type => $courseinfo{'type'}, - }; + }; } } @@ -4654,31 +4782,37 @@ sub print_textbook_form { my $jscript = &textbook_request_javascript(\%numprefab,$numcurrent,$numdomcourses,$customvalidationjs); $jscript .= $customjs; - my %loaditems; + my (%loaditems,$args); $loaditems{'onload'} = 'javascript:uncheckAllRadio();'.$customonload; - $r->print(&header('Course Request',$jscript,\%loaditems)); + if ($crstype eq 'lti') { + $args = { 'only_body' => 1}; + } + $r->print(&header('Course Request',$jscript,\%loaditems,undef,$args)); if (ref($can_request) eq 'HASH') { - unless ((scalar(keys(%{$can_request})) == 1) && ($can_request->{'textbook'})) { + unless (((scalar(keys(%{$can_request})) == 1) && ($can_request->{'textbook'})) || + ($crstype eq 'lti')) { &Apache::lonhtmlcommon::add_breadcrumb( { href => '/adm/requestcourse', text => 'Pick action', }); } } - &Apache::lonhtmlcommon::add_breadcrumb({text=>'Course Request'}); - $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course Requests','Course_Requests')); + unless ($crstype eq 'lti') { + &Apache::lonhtmlcommon::add_breadcrumb({text=>'Course Request'}); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course Requests','Course_Requests')); - &startContentScreen($r,'textbookrequests'); + &startContentScreen($r,'textbookrequests'); # # Show domain selector form, if required. # - if (@{$incdoms} > 1) { - my $onchange = 'this.form.submit()'; - $r->print('
'. - '
'.&mt('Domain').''. - &Apache::loncommon::select_dom_form($dom,'showdom','',1,$onchange,$incdoms). - '
'); + if (@{$incdoms} > 1) { + my $onchange = 'this.form.submit()'; + $r->print('
'. + '
'.&mt('Domain').''. + &Apache::loncommon::select_dom_form($dom,'showdom','',1,$onchange,$incdoms). + '
'); + } } # @@ -4786,17 +4920,26 @@ sub print_textbook_form { # # Table of user's current courses (owner and/or course coordinator) # - my %lt = &clone_text(); + my %lt = &clone_text('Course'); if (keys(%cloneable)) { $r->print(''); } # @@ -4805,13 +4948,20 @@ sub print_textbook_form { if (keys(%domcloneable)) { $r->print(''); } @@ -4858,15 +5008,24 @@ sub print_textbook_form { # # Submit button # - $r->print(''. + $r->print(''. ''. ''); # # End request form # + + if (($crstype eq 'lti') && (ref($formhash) eq 'HASH')) { + foreach my $item (keys(%{$formhash})) { + $r->print(''."\n"); + } + } + $r->print(''); - &endContentScreen($r). + unless ($crstype eq 'lti') { + &endContentScreen($r); + } $r->print(&Apache::loncommon::end_page()); return; } @@ -4953,9 +5112,11 @@ sub clone_selection_table { } sub process_textbook_request { - my ($r,$dom,$action,$domdefs,$domconfig,$can_request) = @_; + my ($r,$dom,$action,$domdefs,$domconfig,$can_request,$crstype) = @_; my ($uniquecode,$req_notifylist); - my $crstype = 'textbook'; + if ($crstype eq '') { + $crstype = 'textbook'; + } if (ref($domconfig) eq 'HASH') { if (ref($domconfig->{'requestcourses'}) eq 'HASH') { if (ref($domconfig->{'requestcourses'}{'notify'}) eq 'HASH') { @@ -4996,28 +5157,30 @@ sub process_textbook_request { undef($clonedom); } } - my $js = &processing_javascript(); - my $loaditems = { - onload => 'javascript:hideProcessing();', - }; - $r->print(&header('Course Creation',$js,$loaditems)); - - if (ref($can_request) eq 'HASH') { - unless ((scalar(keys(%{$can_request})) == 1) && ($can_request->{'textbook'})) { - &Apache::lonhtmlcommon::add_breadcrumb( - { href => '/adm/requestcourse', - text => 'Pick action', - }); + my $args; + if ($crstype eq 'lti') { + $args = { 'only_body' => 1}; + } + $r->print(&header('Course Creation','','',undef,$args)); + + unless ($crstype eq 'lti') { + if (ref($can_request) eq 'HASH') { + unless ((scalar(keys(%{$can_request})) == 1) && ($can_request->{'textbook'})) { + &Apache::lonhtmlcommon::add_breadcrumb( + { href => '/adm/requestcourse', + text => 'Pick action', + }); + } } + &Apache::lonhtmlcommon::add_breadcrumb( + { href => '/adm/requestcourse', + text => "Create Course", + } + ); + &Apache::lonhtmlcommon::add_breadcrumb({text=>'Request Processed'}); + $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course Requests','Course_Requests')); + &startContentScreen($r,'textbookrequests'); } - &Apache::lonhtmlcommon::add_breadcrumb( - { href => '/adm/requestcourse', - text => "Create Course", - } - ); - &Apache::lonhtmlcommon::add_breadcrumb({text=>'Request Processed'}); - $r->print(&Apache::lonhtmlcommon::breadcrumbs('Course Requests','Course_Requests')); - &startContentScreen($r,'textbookrequests'); my $details = { owner => $env{'user.name'}, @@ -5042,6 +5205,7 @@ sub process_textbook_request { } else { $details->{dateshift} = ''; } + $details->{tinyurls} = $env{'form.owntinyurls'}; } elsif ($reqtype eq 'colleague') { $details->{datemode} = $env{'form.colldatemode'}; if ($details->{datemode} eq 'shift') { @@ -5049,6 +5213,11 @@ sub process_textbook_request { } else { $details->{dateshift} = ''; } + $details->{tinyurls} = $env{'form.colltinyurls'}; + } elsif (($reqtype eq 'textbook') || ($reqtype eq 'template')) { + $details->{datemode} = 'delete'; + $details->{dateshift} = ''; + $details->{tinyurls} = ''; } if ($details->{dateshift} ne '') { $details->{dateshift} =~ s/[^\d\.]+//g; @@ -5056,13 +5225,28 @@ sub process_textbook_request { } else { $details->{datemode} = ''; $details->{dateshift} = ''; + $details->{tinyurls} = ''; } my $lonhost = $r->dir_config('lonHostID'); $r->rflush(); my ($result,$output,$customized) = &process_request($r,$lonhost,$dom,$cnum,$crstype,$now,$details, '',$req_notifylist,[],$domconfig); $r->print($output); - if (&Apache::loncoursequeueadmin::author_prompt()) { + if ($crstype eq 'lti') { + my $storecrs; + if ($env{'request.lti.login'}) { + my %lti = &Apache::lonnet::get_domain_lti($dom,'provider'); + if (ref($lti{$env{'request.lti.login'}}) eq 'HASH') { + $storecrs = $lti{$env{'request.lti.login'}}{'storecrs'}; + } + if ($storecrs) { + my %consumers = &Apache::lonnet::get_dom('lticonsumers',[$env{'form.sourcecrs'}],$dom); + if (($env{'form.lti.sourcecrs'} ne '') && ($consumers{$env{'form.lti.sourcecrs'}} eq '') && ($cnum ne '')) { + &Apache::lonnet::put_dom('lticonsumers',{ $env{'form.lti.sourcecrs'} => $env{'request.lti.login'}.':'.$cnum },$dom); + } + } + } + } elsif (&Apache::loncoursequeueadmin::author_prompt()) { unless ($customized) { &print_author_prompt($r,$action,$cnum,$dom,$crstype,$result); } @@ -5071,7 +5255,9 @@ sub process_textbook_request { $r->print('

'.&mt('Create another course').'

'); } } - &endContentScreen($r); + unless ($crstype eq 'lti') { + &endContentScreen($r); + } $r->print(&Apache::loncommon::end_page()); }
'. ''.&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)). '
  '.$env{'form.coursecredits'}.''.&mt('Clone From').''.$ctxt{'dsh'}.''.$ctxt{'dsh'}.''.$ctxt{'dpl'}.''.$courseenv{'description'}.' '; my $cloneinst = $courseenv{'internal.coursecode'}; if ($cloneinst ne '') { @@ -2957,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 .= ''.&mt('Unknown').'