Diff for /loncom/interface/courseprefs.pm between versions 1.49.2.23 and 1.49.2.26

version 1.49.2.23, 2017/03/14 12:29:42 version 1.49.2.26, 2021/12/12 21:52:15
Line 375  sub handler { Line 375  sub handler {
                      help => 'Course_Prefs_General',                       help => 'Course_Prefs_General',
                      ordered => ['owner','co-owners','loncaparev','description',                       ordered => ['owner','co-owners','loncaparev','description',
                                  'clonedfrom','courseid','uniquecode','categories',                                   'clonedfrom','courseid','uniquecode','categories',
                                  'hidefromcat','externalsyllabus','cloners','url',                                   'hidefromcat','syllabus','cloners','url',
                                  'rolenames'],                                   'rolenames'],
                      itemtext => {                       itemtext => {
                                    'owner'            => $lt{'ownr'},                                     'owner'            => $lt{'ownr'},
Line 386  sub handler { Line 386  sub handler {
                                    'categories'       => $lt{'catg'},                                     'categories'       => $lt{'catg'},
                                    'hidefromcat'      => $lt{'excc'},                                     'hidefromcat'      => $lt{'excc'},
                                    'cloners'          => $lt{'clon'},                                      'cloners'          => $lt{'clon'}, 
                                    'externalsyllabus' => 'Syllabus status',                                     'syllabus'         => 'Syllabus status',
                                    'url'              => 'Top Level Map',                                     'url'              => 'Top Level Map',
                                    'rolenames'        => $lt{'rept'},                                     'rolenames'        => $lt{'rept'},
                                    'loncaparev'       => $lt{'lcrv'},                                     'loncaparev'       => $lt{'lcrv'},
Line 763  sub process_changes { Line 763  sub process_changes {
                                  (!$can_categorize));                                   (!$can_categorize));
                         next if (($entry eq 'loncaparev') ||                           next if (($entry eq 'loncaparev') || 
                                 ($entry eq 'owner') ||                                  ($entry eq 'owner') ||
                                 ($entry eq 'clonedfrom'));                                  ($entry eq 'clonedfrom') ||
                                   ($entry eq 'syllabus'));
                         push(@ordered,$entry);                          push(@ordered,$entry);
                     }                      }
                 } elsif ($action eq 'classlists') {                  } elsif ($action eq 'classlists') {
Line 966  sub process_changes { Line 967  sub process_changes {
                                 my $udom = $env{'user.domain'};                                  my $udom = $env{'user.domain'};
                                 my $pendingcoowners = $values->{'internal.pendingco-owners'};                                  my $pendingcoowners = $values->{'internal.pendingco-owners'};
                                 my @pendingcoown = split(',',$pendingcoowners);                                  my @pendingcoown = split(',',$pendingcoowners);
                                 if ($env{'form.pending_coowoner'}) {                                  if ($env{'form.pending_coowner'}) {
                                     foreach my $item (@pendingcoown) {                                      foreach my $item (@pendingcoown) {
                                         unless ($item eq $uname.':'.$udom) {                                          unless ($item eq $uname.':'.$udom) {
                                             push(@newpending,$item);                                              push(@newpending,$item);
                                         }                                          }
                                     }                                      }
                                     @newcoown = @currcoown;                                      @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)) {                                          unless (grep(/^\Q$uname\E:\Q$udom\E$/,@currcoown)) {
                                             push(@newcoown,$uname.':'.$udom);                                              push(@newcoown,$uname.':'.$udom);
                                         }                                          }
                                     }                                      }
                                 } elsif ($env{'form.remove_coowoner'}) {                                  } elsif ($env{'form.remove_coowner'}) {
                                     foreach my $item (@currcoown) {                                      foreach my $item (@currcoown) {
                                         unless ($item eq $uname.':'.$udom) {                                          unless ($item eq $uname.':'.$udom) {
                                             push(@newcoown,$item);                                              push(@newcoown,$item);
Line 1506  sub store_changes { Line 1507  sub store_changes {
                                                 }                                                  }
                                             }                                              }
                                             unless (&Apache::lonnet::is_course_owner($cdom,$cnum)) {                                              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');                                                          $displayval = &mt('on');
                                                 } elsif ($env{'form.pending_coowoner'} eq 'decline') {                                                  } elsif ($env{'form.pending_coowner'} eq 'decline') {
                                                         $displayval = '';                                                          $displayval = '';
                                                         $output .= '<li>'.&Apache::lonhtmlcommon::confirm_success(&mt('Invitation to be co-owner declined')).'</li>';                                                          $output .= '<li>'.&Apache::lonhtmlcommon::confirm_success(&mt('Invitation to be co-owner declined')).'</li>';
                                                 } elsif ($env{'form.remove_coowoner'}) {                                                  } elsif ($env{'form.remove_coowner'}) {
                                                     $displayval = &mt('off');                                                      $displayval = &mt('off');
                                                 }                                                  }
                                                 if ($displayval) {                                                  if ($displayval) {
Line 2107  sub print_courseinfo { Line 2108  sub print_courseinfo {
                    size  => '20',                     size  => '20',
                    advanced => 1                     advanced => 1
                         },                          },
         'externalsyllabus' => {          'syllabus' => {
                    text => '<b>'.&mt($itemtext->{'externalsyllabus'}).'</b><br />'.                     text => '<b>'.&mt($itemtext->{'syllabus'}).'</b><br />'.
                            &mt('(Syllabus type in use)').('&nbsp;' x2).                             &mt('(Syllabus type in use)').('&nbsp;' x2).
                            $editsyllabus,                             $editsyllabus,
                         },                          },
Line 2353  sub print_courseinfo { Line 2354  sub print_courseinfo {
                     $datatable .= &manage_coownership($cnum,$cdom,\@currcoown,$noedit);                      $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 $external = $env{'course.'.$env{'request.course.id'}.'.externalsyllabus'};
             my $uploaded = $env{'course.'.$env{'request.course.id'}.'.uploadedsyllabus'};              my $uploaded = $env{'course.'.$env{'request.course.id'}.'.uploadedsyllabus'};
             my $minimal =  $env{'course.'.$env{'request.course.id'}.'.minimalsyllabus'};              my $minimal =  $env{'course.'.$env{'request.course.id'}.'.minimalsyllabus'};
Line 3269  sub manage_coownership  { Line 3270  sub manage_coownership  {
         }          }
         $output .= '<span class="LC_nobreak">';          $output .= '<span class="LC_nobreak">';
         if ($is_coowner) {          if ($is_coowner) {
             $output .= &mt('You are currently a co-owner:').'&nbsp;<label><input type="checkbox" name="remove_coowoner" value="'.$uname.':'.$udom.'" />'.&mt('Discontinue?').'</label>';              $output .= &mt('You are currently a co-owner:').'&nbsp;<label><input type="checkbox" name="remove_coowner" value="'.$uname.':'.$udom.'" />'.&mt('Discontinue?').'</label>';
         } else {          } else {
             $output .= &mt('The course owner has invited you to become a co-owner:').'&nbsp;<label><input type="radio" name="pending_coowoner" value="accept"'.$disabled.' />'.&mt('Accept?').'</label>'.('&nbsp;'x2).              $output .= &mt('The course owner has invited you to become a co-owner:').'&nbsp;<label><input type="radio" name="pending_coowner" value="accept"'.$disabled.' />'.&mt('Accept?').'</label>'.('&nbsp;'x2).
                        '<label><input type="radio" name=pending_coowoner" value="decline"'.$disabled.' />'.&mt('Decline?').'</label>';                         '<label><input type="radio" name=pending_coowner" value="decline"'.$disabled.' />'.&mt('Decline?').'</label>';
         }          }
         $output .= '</span>';          $output .= '</span>';
         if (@currcoown) {          if (@currcoown) {
Line 3530  sub select_recipient { Line 3531  sub select_recipient {
     my $domform = &Apache::loncommon::select_dom_form($cdom,$item.'_udom_'.$num,$includeempty);      my $domform = &Apache::loncommon::select_dom_form($cdom,$item.'_udom_'.$num,$includeempty);
     my $selectlink =      my $selectlink =
         &Apache::loncommon::selectstudent_link('display',$item.'_uname_'.$num,          &Apache::loncommon::selectstudent_link('display',$item.'_uname_'.$num,
                                                $item.'_udom_'.$num,1);                                                 $item.'_udom_'.$num,'only');
     my $output =       my $output = 
         '<table><tr><td align="center">'.&mt('Username').'<br />'.          '<table><tr><td align="center">'.&mt('Username').'<br />'.
         '<input type="text" name="'.$item.'_uname_'.$num.'" value="" /></td>'.          '<input type="text" name="'.$item.'_uname_'.$num.'" value="" /></td>'.

Removed from v.1.49.2.23  
changed lines
  Added in v.1.49.2.26


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>