--- loncom/interface/lonrequestcourse.pm 2009/09/09 15:49:26 1.33 +++ loncom/interface/lonrequestcourse.pm 2009/10/02 16:15:49 1.36.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network # Request a course # -# $Id: lonrequestcourse.pm,v 1.33 2009/09/09 15:49:26 raeburn Exp $ +# $Id: lonrequestcourse.pm,v 1.36.2.2 2009/10/02 16:15:49 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -178,7 +178,7 @@ sub handler { $trail{'enrollment'} = 'Enrollment'; } - my ($page,$crumb,$newinstcode,$codechk,$checkedcode) = + my ($page,$crumb,$newinstcode,$codechk,$checkedcode,$description) = &get_breadcrumbs($dom,$action,\$state,\%states,\%trail); if ($action eq 'display') { if (($dom eq $env{'request.role.domain'}) && (&Apache::lonnet::allowed('ccc',$dom))) { @@ -238,8 +238,8 @@ sub handler { foreach my $item (@code_order) { $crosslistcode .= $env{'form.crosslist_'.$i.'_'.$item}; } - if ($crosslistcode ne '') { - $codechk{$i} = + if ($crosslistcode ne '') { + ($codechk{$i}, my $rest) = &Apache::lonnet::auto_validate_instcode('',$dom,$crosslistcode); } unless ($codechk{$i} eq 'valid') { @@ -286,7 +286,8 @@ sub handler { } else { &request_administration($r,$action,$state,$page,\%states,$dom, $jscript,$loaditems,$crumb,$newinstcode, - $codechk,$checkedcode,\@invalidcrosslist); + $codechk,$checkedcode,$description, + \@invalidcrosslist); } } else { $r->print(&header('Course Requests').$crumb. @@ -310,7 +311,7 @@ sub handler { &close_popup_form()); } else { &request_administration($r,$action,$state,$page,\%states,$dom,$jscript, - $loaditems,$crumb,'','','','',$uname,$udom); + $loaditems,$crumb,'','','','','',$uname,$udom); } } elsif ($action eq 'log') { &print_request_logs($jscript,$loaditems,$crumb); @@ -346,7 +347,7 @@ END sub get_breadcrumbs { my ($dom,$action,$state,$states,$trail) = @_; - my ($crumb,$newinstcode,$codechk,$checkedcode,$numtitles); + my ($crumb,$newinstcode,$codechk,$checkedcode,$numtitles,$description); my $page = 0; if ((ref($states) eq 'HASH') && (ref($trail) eq 'HASH') && (ref($state))) { if (defined($action)) { @@ -371,7 +372,7 @@ sub get_breadcrumbs { $$state = 'codepick'; $page --; } else { - $codechk = + ($codechk,$description) = &Apache::lonnet::auto_validate_instcode('', $dom,$newinstcode); if ($codechk ne 'valid') { @@ -416,7 +417,7 @@ sub get_breadcrumbs { {text=>'Pick Action'}); $crumb = &Apache::lonhtmlcommon::breadcrumbs('Course Requests','Course_Requests'); } - return ($page,$crumb,$newinstcode,$codechk,$checkedcode); + return ($page,$crumb,$newinstcode,$codechk,$checkedcode,$description); } sub header { @@ -626,12 +627,12 @@ sub check_can_request { } sub course_types { - my @types = ('official','unofficial','community'); + my @types = ('unofficial'); my %typename = ( official => 'Official course', unofficial => 'Unofficial course', community => 'Community', - ); + ); return (\@types,\%typename); } @@ -657,8 +658,31 @@ sub print_main_menu { } } + my $standby=&mt('Course selected. Please stand by.'); my $js = <<"END"; +function enterrole (thisform,rolecode,buttonname) { + document.title='$standby'; + window.status='$standby'; + thisform.newrole.value=rolecode; + thisform.selectrole.value='1'; + thisform.submit(); +} + +function ToSyllabus(cdom,cnum) { + if (cdom == '' || cdom == null) { + return; + } + if (cnum == '' || cnum == null) { + return; + } + var options = 'height=600,width=800,resizable=yes,scrollbars=yes,location=no,menubar=no,toolbar=no'; + var url = "/public/"+cdom+"/"+cnum+"/syllabus"; + syllwin = window.open(url,'',options,1); + syllwin.focus(); + return; +} + function nextPage(formname) { var crschoice = document.mainmenu_coursetype.crstype.value; var actionchoice = document.mainmenu_action.action.value; @@ -723,16 +747,20 @@ END } END - - $r->print(&header('Course Requests',$js.$jscript,$loaditems).$crumb.'
'. + $r->print(&header('Concept Test Courses',$js.$jscript,$loaditems).$crumb); + my $existing = &existing_courses(); + if ($existing) { + $r->print('
'. + '

'.&mt('Request creation of a new course').'

'); + } else { + $r->print('

'.&mt('Request creation of a new course, or review your pending course requests.').'

'); + } + $r->print('

'. &Apache::lonhtmlcommon::start_pick_box(). &Apache::lonhtmlcommon::row_title(&mt('Course Domain')). - '

'. - &Apache::loncommon::select_dom_form($dom,'showdom','',1,$onchange)); - if (!$onchange) { - $r->print(' '); - } + ''); + $r->print('GCI Web Center Concept Test Delivery (gcitest)'."\n". + ''); $r->print('
'.&Apache::lonhtmlcommon::row_closure()); my $formname = 'requestcrs'; @@ -742,41 +770,217 @@ END '. &Apache::lonhtmlcommon::row_closure(1). - &Apache::lonhtmlcommon::row_title(&mt('Course Type')).' -
-
'."\n". + &Apache::lonhtmlcommon::row_title(&mt('Course Type')). + &mt($typename->{'unofficial'})."\n". + '
'."\n". + '
'."\n". &Apache::lonhtmlcommon::row_closure(1)."\n". - &Apache::lonhtmlcommon::end_pick_box().'
'."\n". - '
'."\n". + &Apache::lonhtmlcommon::end_pick_box().'

'."\n". + '

'."\n". ''."\n". ''."\n". ''."\n". ''."\n". ''."\n". - '

'); + '

'); + if ($existing) { + $r->print('

'.&mt('Enter an existing Concept Test course').'

'.$existing.'
'); + } else { + $r->print('
'); + } $r->print(&Apache::loncommon::end_page()); return; } +sub existing_courses { + my $output; + my %roleshash = &Apache::lonnet::get_my_roles(undef,undef,'userroles',undef, + ['cc'],['gcitest']); + my %courses; + if (keys(%roleshash) > 0) { + foreach my $key (keys(%roleshash)) { + my ($cnum,$cdom,$role) = split(':',$key); + my ($tstart,$tend) = split(':',$roleshash{$key}); + my %coursehash = &Apache::lonnet::coursedescription($cdom.'/'.$cnum); + $courses{$cdom.'_'.$cnum}{'description'} = $coursehash{'description'}; + $courses{$cdom.'_'.$cnum}{'owner'} = $coursehash{'internal.courseowner'}; + if (defined($coursehash{'default_enrollment_start_date'}) ) { + $courses{$cdom.'_'.$cnum}{'startaccess'} = + &Apache::lonlocal::locallocaltime($coursehash{'default_enrollment_start_date'}); + } + if (defined($coursehash{'default_enrollment_end_date'}) ) { + $courses{$cdom.'_'.$cnum}{'endaccess'} = + &Apache::lonlocal::locallocaltime($coursehash{'default_enrollment_end_date'}); + if ($coursehash{'default_enrollment_end_date'} == 0) { + $courses{$cdom.'_'.$cnum}{'endaccess'} = &mt('No ending date'); + } + } + } + $output = '
'. + &Apache::loncommon::start_data_table(). + &Apache::loncommon::start_data_table_header_row(); + my @coltitles = ('Select','Title','Owner(s)', + 'Default Access Dates for Students','Student Counts'); + foreach my $item (@coltitles) { + $output .= ''; + if ($item eq 'Select') { + $output .= '  '; + } else { + $output .= &mt($item); + } + $output .= ''; + } + $output .= &Apache::loncommon::end_data_table_header_row(); + my %courseinfo = &build_courseinfo_hash(\%courses); + my %Sortby; + foreach my $course (sort(keys(%courses))) { + my $clean_title = $courseinfo{$course}{'title'}; + $clean_title =~ s/\W+//g; + if ($clean_title eq '') { + $clean_title = $courseinfo{$course}{'title'}; + } + push(@{$Sortby{$clean_title}},$course); + } + my @sorted_courses; + my @sorted_courses = sort { lc($a) cmp lc($b) } (keys(%Sortby)); + foreach my $item (@sorted_courses) { + foreach my $course (@{$Sortby{$item}}) { + my ($cdom,$cnum) = split('_',$course); + $output.= &Apache::loncommon::start_data_table_row(). + &courseinfo_row($courseinfo{$course},$cnum,$cdom). + &Apache::loncommon::end_data_table_row(); + } + } + $output .= &Apache::loncommon::end_data_table(). + ''. + '
'; + } + return $output; +} + +sub build_courseinfo_hash { + my ($courses) = @_; + my %courseinfo; + foreach my $course (keys(%{$courses})) { + my ($cdom,$cnum) = split('_',$course); + my $descr; + if (ref($courses->{$course}) eq 'HASH') { + $descr = $courses->{$course}{'description'}; + } + my $cleandesc=&HTML::Entities::encode($descr,'<>&"'); + $cleandesc=~s/'/\\'/g; + $cleandesc =~ s/^\s+//; + my ($cdom,$cnum)=split(/\_/,$course); + my ($singleowner,@owners,%ownernames); + if (ref($courses->{$course}) eq 'HASH') { + $singleowner = $courses->{$course}{'owner'}; + push(@owners,$singleowner); + if (ref($courses->{$course}{'co-owners'}) eq 'ARRAY') { + foreach my $item (@{$courses->{$course}{'co-owners'}}) { + push(@owners,$item); + } + } + } + foreach my $owner (@owners) { + my ($ownername,$ownerdom); + if ($owner =~ /:/) { + ($ownername,$ownerdom) = split(/:/,$owner); + } else { + $ownername = $owner; + if ($owner ne '') { + $ownerdom = $cdom; + } + } + if ($ownername ne '' && $ownerdom ne '') { + my %namehash=&Apache::loncommon::getnames($ownername,$ownerdom); + $ownernames{$ownername.':'.$ownerdom} = \%namehash; + } + } + $courseinfo{$course}{'cdom'} = $cdom; + $courseinfo{$course}{'cnum'} = $cnum; + my @lastnames; + foreach my $owner (keys(%ownernames)) { + if (ref($ownernames{$owner}) eq 'HASH') { + push(@lastnames,$ownernames{$owner}{'lastname'}); + } + } + $courseinfo{$course}{'ownerlastnames'} = join(', ',sort(@lastnames)); + $courseinfo{$course}{'title'} = $cleandesc; + $courseinfo{$course}{'owner'} = $singleowner; + my @classids; + $courseinfo{$course}{'counts'} = &count_students($cdom,$cnum,0); + my $startaccess = $courses->{$course}{'startaccess'}; + my $endaccess = $courses->{$course}{'endaccess'}; + my $accessdates; + if ($startaccess) { + $accessdates .= ''.&mt('From:[_1]',' '.$startaccess).'
'; + } + if ($endaccess) { + $accessdates .= ''.&mt('To:[_1]',' '.$endaccess).'
'; + } + $courseinfo{$course}{'access'} = $accessdates; + } + return %courseinfo; +} + +sub courseinfo_row { + my ($info,$cnum,$cdom) = @_; + my $output; + if (ref($info) eq 'HASH') { + my $rolecode = 'cc./'.$cdom.'/'.$cnum; + my $buttonname = $rolecode; + $buttonname=~s/\W//g; + $output .= ''. + ''.$info->{'title'}.' '. + ''. + &mt('Syllabus').''. + ''.$info->{'ownerlastnames'}.''. + ''.$info->{'access'}.''. + ''.$info->{'counts'}.''; + } else { + $output = ''.&mt('No information available for [_1].', + $cdom.'_'.$cnum).''; + return $output; + } + return $output; +} + +sub count_students { + my ($cdom,$cnum,$numsec) = @_; + my $classlist = &Apache::loncoursedata::get_classlist($cdom,$cnum); + my %student_count = ( + Active => 0, + Future => 0, + Expired => 0, + ); + my %idx; + $idx{'status'} = &Apache::loncoursedata::CL_STATUS(); + my %status_title = &Apache::lonlocal::texthash( + Expired => 'Previous access', + Active => 'Current access', + Future => 'Future access', + ); + + while (my ($student,$data) = each(%$classlist)) { + $student_count{$data->[$idx{'status'}]} ++; + } + + my $countslist = &mt('[quant,_1,section:,sections:,No sections]',$numsec).'
'; + foreach my $status ('Active','Future') { + $countslist .= ''.$status_title{$status}.': '. + $student_count{$status}.'
'; + } + return $countslist; +} + + sub request_administration { my ($r,$action,$state,$page,$states,$dom,$jscript,$loaditems,$crumb, - $newinstcode,$codechk,$checkedcode,$invalidcrosslist,$uname,$udom) = @_; + $newinstcode,$codechk,$checkedcode,$description,$invalidcrosslist, + $uname,$udom) = @_; my $js; if (($action eq 'new') || (($action eq 'view') && ($state eq 'pick_request'))) { $js = <print(&header('Request a course',$js.$jscript,$loaditems,$jsextra).$crumb); &print_request_form($r,$action,$state,$page,$states,$dom,$newinstcode, - $codechk,$checkedcode,$invalidcrosslist); + $codechk,$checkedcode,$description,$invalidcrosslist); } elsif ($action eq 'view') { my $jsextra; my $formname = 'requestcrs'; @@ -1124,7 +1328,7 @@ sub get_instcode { sub print_request_form { my ($r,$action,$state,$page,$states,$dom,$newinstcode,$codechk,$checkedcode, - $invalidcrosslist) = @_; + $description,$invalidcrosslist) = @_; my $formname = 'requestcrs'; my ($next,$prev,$message,$output,$codepicker,$crstype); $prev = $states->{$action}[$page-1]; @@ -1134,7 +1338,7 @@ sub print_request_form { next => 'Next', ); $crstype = $env{'form.crstype'}; - $r->print('
'); + $r->print('
'); my (@codetitles,%cat_titles,%cat_order,@code_order,$instcode,$code_chk, @disallowed); if ($crstype eq 'official') { @@ -1171,7 +1375,9 @@ sub print_request_form { $codepicker = &coursecode_form($dom,'instcode',\@codetitles, \%cat_titles,\%cat_order); if ($codepicker) { - $r->print('
'.&Apache::lonhtmlcommon::start_pick_box().$codepicker. + $r->print(&mt('Specify the course to be created.'). + '
'.&Apache::lonhtmlcommon::start_pick_box(). + $codepicker. &Apache::lonhtmlcommon::end_pick_box().'
'); } else { $next = $states->{$action}[$page+2]; @@ -1187,7 +1393,7 @@ sub print_request_form { if ($instcode eq '') { $prev = $states->{$action}[$page-2]; } - $r->print(&courseinfo_form($dom,$formname,$crstype,$next)); + $r->print(&courseinfo_form($dom,$formname,$crstype,$next,$description)); } elsif ($state eq 'enrollment') { if ($crstype eq 'official') { &Apache::lonnet::auto_possible_instcodes($dom,\@codetitles,\%cat_titles, @@ -1411,7 +1617,7 @@ sub get_excluded_elements { sub print_enrollment_menu { my ($formname,$instcode,$dom,$codetitles,$cat_titles,$cat_order,$code_order, $invalidcrosslist) =@_; - my ($sections,$autoenroll,$access_dates,$output); + my ($sections,$autoenroll,$access_dates,$output,$hasauto); my $starttime = time; my $endtime = time+(6*30*24*60*60); # 6 months from now, approx @@ -1430,7 +1636,8 @@ sub print_enrollment_menu { $section_form = &inst_section_selector($dom,$instcode); if ($section_form) { $sections = &Apache::lonhtmlcommon::row_headline(). - '

'.&mt('Sections for auto-enrollment').'

'. + '

'.&Apache::loncommon::help_open_topic('Course_Request_Sections'). + ' '.&mt('Sections for auto-enrollment').'

'. &Apache::lonhtmlcommon::row_closure(1). $section_form; } @@ -1457,26 +1664,29 @@ sub print_enrollment_menu { &Apache::lonhtmlcommon::row_closure(1). $crosslist_form; } + $hasauto = 1; $autoenroll = - &Apache::lonhtmlcommon::row_title(&mt('Add registered students automatically')). + &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic('Course_Request_Autoadd').' '.&mt('Add registered students automatically')). ''.(' 'x3).''. &Apache::lonhtmlcommon::row_closure(1). - &Apache::lonhtmlcommon::row_title(&mt('Drop unregistered students automatically')). + &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic('Course_Request_Autodrop').' '.&mt('Drop unregistered students automatically')). ''.(' 'x3).''. &Apache::lonhtmlcommon::row_closure(1). - &date_setting_table($starttime,$endtime,$formname,'enroll',%enrolltitles); + &date_setting_table($starttime,$endtime,$formname,'enroll', + $hasauto,%enrolltitles); } } my $access_dates = - &date_setting_table($starttime,$endtime,$formname,'access',%accesstitles); + &date_setting_table($starttime,$endtime,$formname,'access',$hasauto, + %accesstitles); $output .= &Apache::lonhtmlcommon::start_pick_box(); if ($sections) { $output .= $sections; @@ -1530,7 +1740,8 @@ sub inst_section_selector { ''.&mt('Include?').''. ''.&mt('Institutional Section').''. - ''.&mt('LON-CAPA section').''. + ''.&Apache::loncommon::help_open_topic('Course_Request_LCSection'). + ' '.&mt('LON-CAPA section').''. &Apache::loncommon::end_data_table_row(); for (my $i=0; $i<@sections; $i++) { my $colflag = $i%2; @@ -1559,7 +1770,7 @@ sub inst_section_selector { } sub date_setting_table { - my ($starttime,$endtime,$formname,$prefix,%datetitles) = @_; + my ($starttime,$endtime,$formname,$prefix,$hasauto,%datetitles) = @_; my ($perpetual,$table); my $startform = &Apache::lonhtmlcommon::date_setter($formname,$prefix.'start', $starttime,'','','',1,'','','',1); @@ -1572,11 +1783,27 @@ sub date_setting_table { &mt('No end date').''; $closure = '1'; } - $table = &Apache::lonhtmlcommon::row_title($datetitles{'start'}). - $startform. + + my %help_item = ( + access => { + start => 'Course_Request_Access_Start', + end => 'Course_Request_Access_End', + }, + enroll => { + start => 'Course_Request_Enroll_Start', + end => 'Course_Request_Enroll_End', + }, + ); + if ($hasauto) { + $help_item{'access'}{'start'} = 'Course_Request_RegAccess_Start'; + $help_item{'access'}{'end'} = 'Course_Request_RegAccess_End'; + } + + $table = &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic($help_item{$prefix}{'start'}). + ' '.$datetitles{'start'}).$startform. &Apache::lonhtmlcommon::row_closure(1). - &Apache::lonhtmlcommon::row_title($datetitles{'end'}). - $endform.$perpetual. + &Apache::lonhtmlcommon::row_title(&Apache::loncommon::help_open_topic($help_item{$prefix}{'end'}). + ' '.$datetitles{'end'}).$endform.$perpetual. &Apache::lonhtmlcommon::row_closure($closure); return $table; } @@ -1645,7 +1872,7 @@ sub print_personnel_menu { ); $lt{'unofficial'} = $lt{'official'}; $output .= &Apache::lonhtmlcommon::row_headline(). - '

'.$lt{$crstype}.' '.&mt('Include other personnel?').'

'; + '

'.&Apache::loncommon::help_open_topic('Course_Request_Personnel').' '.$lt{$crstype}.' '.&mt('Include other personnel?').'

'; } for (my $i=0; $i<$persontotal; $i++) { my @linkargs = map { 'person_'.$i.'_'.$_ } (@items); @@ -1687,8 +1914,9 @@ sub print_personnel_menu { ''.&mt('First Name').'
'.$form_elems{'firstname'}.''."\n". ''.&mt('Last Name').'
'.$form_elems{'lastname'}.''."\n". ''.&mt('E-mail').'
'.$form_elems{'emailaddr'}.''."\n". - ''.&mt('Role').&Apache::loncommon::help_open_topic('Course_Roles').'
'.$roleselector.''."\n". - ''.&mt('LON-CAPA Section(s)').'
'.$sectionselector.''."\n". + ''.&Apache::loncommon::help_open_topic('Course_Roles').' '.&mt('Role').'
'.$roleselector.''."\n". + ''. + &Apache::loncommon::help_open_topic('Course_Request_Rolesection').' '.&mt('LON-CAPA Section(s)').'
'.$sectionselector.''."\n". ''.&Apache::lonhtmlcommon::row_closure(); } $output .= &Apache::lonhtmlcommon::row_title(&mt('Add another?')). @@ -1696,7 +1924,8 @@ sub print_personnel_menu { ''.&mt('Add?').&Apache::lonhtmlcommon::row_closure(1). - &Apache::lonhtmlcommon::end_pick_box().'
'; + &Apache::lonhtmlcommon::end_pick_box().''. + '

'.&mt('You may also add users later, once the course has been created, by using the "Manage course users" link, accessible from the "Main Menu".').'

'; return $output; } @@ -1721,14 +1950,8 @@ sub print_request_status { my ($dom) = @_; my %statusinfo = &Apache::lonnet::dump('courserequests',$env{'user.domain'}, $env{'user.name'},'^status:'.$dom); - my ($output,$formname,%queue_by_date,%typenames); - if ($env{'form.crstype'} eq 'any') { - %typenames = &Apache::lonlocal::texthash ( - official => 'Official course', - unofficial => 'Unofficial course', - community => 'Community', - ); - } + my ($output,$formname,%queue_by_date); + my ($types,$typenames) = &course_types(); foreach my $key (keys(%statusinfo)) { if (($statusinfo{$key} eq 'approval') || ($statusinfo{$key} eq 'pending')) { (undef,my($cdom,$cnum)) = split(':',$key); @@ -1799,7 +2022,10 @@ sub print_request_status { ''.&unescape($desc).''. ''.$cdom.''; if ($env{'form.crstype'} eq 'any') { - my $typename = $typenames{$type}; + my $typename; + if (ref($typenames) eq 'HASH') { + $typename = &mt($typenames->{$type}); + } if ($typename eq '') { $typename = &mt('Unknown type'); } @@ -1952,7 +2178,7 @@ sub print_review { $crstypename = $env{'form.crstype'}; if (ref($typename) eq 'HASH') { unless ($typename->{$env{'form.crstype'}} eq '') { - $crstypename = $typename->{$env{'form.crstype'}}; + $crstypename = &mt($typename->{$env{'form.crstype'}}); } } my $category = 'Course'; @@ -2214,7 +2440,7 @@ sub dates_from_form { } sub courseinfo_form { - my ($dom,$formname,$crstype,$next) = @_; + my ($dom,$formname,$crstype,$next,$description) = @_; my %lt = &Apache::lonlocal::texthash( official => 'You must provide a (brief) course description.', community => 'You must provide a (brief) community description.' @@ -2241,10 +2467,10 @@ ENDJS } my $output .= $js_validate."\n".'
'.&Apache::lonhtmlcommon::start_pick_box(). &Apache::lonhtmlcommon::row_headline(). - '

'.$title.'

'. + '

'.&Apache::loncommon::help_open_topic('Course_Request_Description').' '.$title.'

'. &Apache::lonhtmlcommon::row_closure(1). &Apache::lonhtmlcommon::row_title(&mt('Description')). - ''; + ''; my ($home_server_pick,$numlib) = &Apache::loncommon::home_server_form_item($dom,'chome', 'default','hide'); @@ -2255,7 +2481,7 @@ ENDJS $output .= $home_server_pick. &Apache::lonhtmlcommon::row_closure(). &Apache::lonhtmlcommon::row_headline(). - '

'.&mt('Clone content and settings from an existing course?').'

'. + '

'.&Apache::loncommon::help_open_topic('Course_Request_Clone').' '.&mt('Clone content and settings from an existing course?').'

'. &Apache::lonhtmlcommon::row_closure(1). &clone_form($dom,$formname,$crstype). &Apache::lonhtmlcommon::end_pick_box().'
'."\n"; @@ -2268,14 +2494,14 @@ sub clone_form { if ($crstype eq 'community') { $type = 'Community'; } - my $cloneform = &Apache::loncommon::select_dom_form($dom,'clonedom'). + my $cloneform = &Apache::loncommon::select_dom_form($dom,'clonedom').' '. &Apache::loncommon::selectcourse_link($formname,'clonecrs','clonedom','','','',$type); my %lt = &clone_text(); my $output .= &Apache::lonhtmlcommon::row_title($lt{'cid'}).''.&Apache::lonhtmlcommon::row_closure(1).''. + ''.&Apache::lonhtmlcommon::row_closure(1). + &Apache::lonhtmlcommon::row_title($lt{'dmn'}).''.&Apache::lonhtmlcommon::row_closure(1). &Apache::lonhtmlcommon::row_title($lt{'dsh'}).'