--- loncom/interface/courseprefs.pm 2017/03/14 12:29:42 1.49.2.23 +++ loncom/interface/courseprefs.pm 2021/12/12 21:52:15 1.49.2.26 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set configuration settings for a course # -# $Id: courseprefs.pm,v 1.49.2.23 2017/03/14 12:29:42 raeburn Exp $ +# $Id: courseprefs.pm,v 1.49.2.26 2021/12/12 21:52:15 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -375,7 +375,7 @@ sub handler { help => 'Course_Prefs_General', ordered => ['owner','co-owners','loncaparev','description', 'clonedfrom','courseid','uniquecode','categories', - 'hidefromcat','externalsyllabus','cloners','url', + 'hidefromcat','syllabus','cloners','url', 'rolenames'], itemtext => { 'owner' => $lt{'ownr'}, @@ -386,7 +386,7 @@ sub handler { 'categories' => $lt{'catg'}, 'hidefromcat' => $lt{'excc'}, 'cloners' => $lt{'clon'}, - 'externalsyllabus' => 'Syllabus status', + 'syllabus' => 'Syllabus status', 'url' => 'Top Level Map', 'rolenames' => $lt{'rept'}, 'loncaparev' => $lt{'lcrv'}, @@ -763,7 +763,8 @@ sub process_changes { (!$can_categorize)); next if (($entry eq 'loncaparev') || ($entry eq 'owner') || - ($entry eq 'clonedfrom')); + ($entry eq 'clonedfrom') || + ($entry eq 'syllabus')); push(@ordered,$entry); } } elsif ($action eq 'classlists') { @@ -966,19 +967,19 @@ sub process_changes { my $udom = $env{'user.domain'}; my $pendingcoowners = $values->{'internal.pendingco-owners'}; my @pendingcoown = split(',',$pendingcoowners); - if ($env{'form.pending_coowoner'}) { + if ($env{'form.pending_coowner'}) { foreach my $item (@pendingcoown) { unless ($item eq $uname.':'.$udom) { push(@newpending,$item); } } @newcoown = @currcoown; - if ($env{'form.pending_coowoner'} eq 'accept') { + if ($env{'form.pending_coowner'} eq 'accept') { unless (grep(/^\Q$uname\E:\Q$udom\E$/,@currcoown)) { push(@newcoown,$uname.':'.$udom); } } - } elsif ($env{'form.remove_coowoner'}) { + } elsif ($env{'form.remove_coowner'}) { foreach my $item (@currcoown) { unless ($item eq $uname.':'.$udom) { push(@newcoown,$item); @@ -1506,12 +1507,12 @@ sub store_changes { } } unless (&Apache::lonnet::is_course_owner($cdom,$cnum)) { - if ($env{'form.pending_coowoner'} eq 'accept') { + if ($env{'form.pending_coowner'} eq 'accept') { $displayval = &mt('on'); - } elsif ($env{'form.pending_coowoner'} eq 'decline') { + } elsif ($env{'form.pending_coowner'} eq 'decline') { $displayval = ''; $output .= '
  • '.&Apache::lonhtmlcommon::confirm_success(&mt('Invitation to be co-owner declined')).'
  • '; - } elsif ($env{'form.remove_coowoner'}) { + } elsif ($env{'form.remove_coowner'}) { $displayval = &mt('off'); } if ($displayval) { @@ -2107,8 +2108,8 @@ sub print_courseinfo { size => '20', advanced => 1 }, - 'externalsyllabus' => { - text => ''.&mt($itemtext->{'externalsyllabus'}).'
    '. + 'syllabus' => { + text => ''.&mt($itemtext->{'syllabus'}).'
    '. &mt('(Syllabus type in use)').(' ' x2). $editsyllabus, }, @@ -2353,7 +2354,7 @@ sub print_courseinfo { $datatable .= &manage_coownership($cnum,$cdom,\@currcoown,$noedit); } } - } elsif ($item eq 'externalsyllabus') { + } elsif ($item eq 'syllabus') { my $external = $env{'course.'.$env{'request.course.id'}.'.externalsyllabus'}; my $uploaded = $env{'course.'.$env{'request.course.id'}.'.uploadedsyllabus'}; my $minimal = $env{'course.'.$env{'request.course.id'}.'.minimalsyllabus'}; @@ -3269,10 +3270,10 @@ sub manage_coownership { } $output .= ''; if ($is_coowner) { - $output .= &mt('You are currently a co-owner:').' '; + $output .= &mt('You are currently a co-owner:').' '; } else { - $output .= &mt('The course owner has invited you to become a co-owner:').' '.(' 'x2). - ''; + $output .= &mt('The course owner has invited you to become a co-owner:').' '.(' 'x2). + ''; } $output .= ''; if (@currcoown) { @@ -3530,7 +3531,7 @@ sub select_recipient { my $domform = &Apache::loncommon::select_dom_form($cdom,$item.'_udom_'.$num,$includeempty); my $selectlink = &Apache::loncommon::selectstudent_link('display',$item.'_uname_'.$num, - $item.'_udom_'.$num,1); + $item.'_udom_'.$num,'only'); my $output = ''.
    '.&mt('Username').'
    '. '