Diff for /loncom/interface/lonuserutils.pm between versions 1.118 and 1.121

version 1.118, 2010/03/21 14:58:40 version 1.121, 2010/08/04 16:50:29
Line 1472  sub print_userlist { Line 1472  sub print_userlist {
             $title = &mt('Select Communities');              $title = &mt('Select Communities');
             $warning = &mt('Warning: data retrieval for multiple communities can take considerable time, as this operation is not currently optimized.');              $warning = &mt('Warning: data retrieval for multiple communities can take considerable time, as this operation is not currently optimized.');
         }          }
           my @standardnames = &Apache::loncommon::get_standard_codeitems();
         my $courseform =          my $courseform =
             &Apache::lonhtmlcommon::course_selection($formname,$numcodes,              &Apache::lonhtmlcommon::course_selection($formname,$numcodes,
                             $codetitles,$idlist,$idlist_titles,$crstype);                              $codetitles,$idlist,$idlist_titles,$crstype,
                               \@standardnames);
         $r->print('<p>'.&Apache::lonhtmlcommon::start_pick_box()."\n".          $r->print('<p>'.&Apache::lonhtmlcommon::start_pick_box()."\n".
                   &Apache::lonhtmlcommon::start_pick_box()."\n".                    &Apache::lonhtmlcommon::start_pick_box()."\n".
                   &Apache::lonhtmlcommon::row_title($title,'LC_oddrow_value')."\n".                    &Apache::lonhtmlcommon::row_title($title,'LC_oddrow_value')."\n".
Line 1923  function setCourseCat(formname) { Line 1925  function setCourseCat(formname) {
     if (formname.Year.options[formname.Year.selectedIndex].value == -1) {      if (formname.Year.options[formname.Year.selectedIndex].value == -1) {
         return;          return;
     }      }
     courseSet('Year');      courseSet('$codetitles[0]');
     for (var j=0; j<formname.Semester.length; j++) {      for (var j=0; j<formname.Semester.length; j++) {
         if (formname.Semester.options[j].value == "$env{'form.Semester'}") {          if (formname.Semester.options[j].value == "$env{'form.Semester'}") {
             formname.Semester.options[j].selected = true;              formname.Semester.options[j].selected = true;
Line 1932  function setCourseCat(formname) { Line 1934  function setCourseCat(formname) {
     if (formname.Semester.options[formname.Semester.selectedIndex].value == -1) {      if (formname.Semester.options[formname.Semester.selectedIndex].value == -1) {
         return;          return;
     }      }
     courseSet('Semester');      courseSet('$codetitles[1]');
     for (var j=0; j<formname.Department.length; j++) {      for (var j=0; j<formname.Department.length; j++) {
         if (formname.Department.options[j].value == "$env{'form.Department'}") {            formname.Department.options[j].selected = true;          if (formname.Department.options[j].value == "$env{'form.Department'}") {            formname.Department.options[j].selected = true;
         }          }
Line 1940  function setCourseCat(formname) { Line 1942  function setCourseCat(formname) {
     if (formname.Department.options[formname.Department.selectedIndex].value == -1) {      if (formname.Department.options[formname.Department.selectedIndex].value == -1) {
         return;          return;
     }      }
     courseSet('Department');      courseSet('$codetitles[2]');
     for (var j=0; j<formname.Number.length; j++) {      for (var j=0; j<formname.Number.length; j++) {
         if (formname.Number.options[j].value == "$env{'form.Number'}") {          if (formname.Number.options[j].value == "$env{'form.Number'}") {
             formname.Number.options[j].selected = true;              formname.Number.options[j].selected = true;
Line 4395  sub update_user_list { Line 4397  sub update_user_list {
     my ($r,$context,$setting,$choice,$crstype) = @_;      my ($r,$context,$setting,$choice,$crstype) = @_;
     my $now = time;      my $now = time;
     my $count=0;      my $count=0;
     my $crstype;  
     if ($context eq 'course') {      if ($context eq 'course') {
         $crstype = &Apache::loncommon::course_type();          $crstype = &Apache::loncommon::course_type();
     }      }
Line 4685  sub update_user_list { Line 4686  sub update_user_list {
                }                 }
             } elsif ($choice eq 'chgdates') {              } elsif ($choice eq 'chgdates') {
                 $r->print(&mt("$result_text{'ok'}{$choice} role of '[_1]' in [_2] for '[_3]' - [_4]",$plrole,$extent,                   $r->print(&mt("$result_text{'ok'}{$choice} role of '[_1]' in [_2] for '[_3]' - [_4]",$plrole,$extent, 
                       '<i>'.&Apache::loncommon::plainname($uname.':'.$udom).'</i>',                        '<i>'.&Apache::loncommon::plainname($uname,$udom).'</i>',
                       $dates).'<br />');                        $dates).'<br />');
                $count ++;                 $count ++;
             } else {              } else {
                 $r->print(&mt("$result_text{'ok'}{$choice} role of '[_1]' in [_2] for '[_3]'.",$plrole,$extent,                  $r->print(&mt("$result_text{'ok'}{$choice} role of '[_1]' in [_2] for '[_3]'.",$plrole,$extent,
                       '<i>'.&Apache::loncommon::plainname($uname.':'.$udom).'</i>').                        '<i>'.&Apache::loncommon::plainname($uname,$udom).'</i>').
                           '<br />');                            '<br />');
                 $count ++;                  $count ++;
             }              }
Line 4698  sub update_user_list { Line 4699  sub update_user_list {
             $r->print(              $r->print(
                 &mt("Error $result_text{'error'}{$choice} [_1] in [_2] for '[_3]': [_4].",                  &mt("Error $result_text{'error'}{$choice} [_1] in [_2] for '[_3]': [_4].",
                     $plrole,$extent,                      $plrole,$extent,
                     '<i>'.&Apache::loncommon::plainname($uname.':'.$udom).'</i>',                      '<i>'.&Apache::loncommon::plainname($uname,$udom).'</i>',
                     $result).'<br />');                      $result).'<br />');
         }          }
     }      }
Line 4936  sub setsections_javascript { Line 4937  sub setsections_javascript {
                     accr => 'A course coordinator role will be added with access to all sections.',                      accr => 'A course coordinator role will be added with access to all sections.',
                     acor => 'A coordinator role will be added with access to all sections',                      acor => 'A coordinator role will be added with access to all sections',
                     inea => 'In each course, each user may only have one student role at a time.',                      inea => 'In each course, each user may only have one student role at a time.',
                     inec => 'In each community, each user may only have on member role at a time.',                      inec => 'In each community, each user may only have one member role at a time.',
                     youh => 'You had selected ',                      youh => 'You had selected ',
                     secs => 'sections.',                      secs => 'sections.',
                     plmo => 'Please modify your selections so they include no more than one section.',                      plmo => 'Please modify your selections so they include no more than one section.',
Line 4974  function setSections(formname,crstype) { Line 4975  function setSections(formname,crstype) {
                     for (var j=0; j<formname.elements[num].length; j++) {                      for (var j=0; j<formname.elements[num].length; j++) {
                         if (formname.elements[num].options[j].selected == true ) {                          if (formname.elements[num].options[j].selected == true ) {
                             var addsec = formname.elements[num].options[j].value;                              var addsec = formname.elements[num].options[j].value;
                             if (addsec != "") {                              if ((addsec != "") && (addsec != null)) {
                                 fromexisting.push(addsec);                                  fromexisting.push(addsec);
                                 if (numsec == 0) {                                  if (numsec == 0) {
                                     sections = addsec;                                      sections = addsec;

Removed from v.1.118  
changed lines
  Added in v.1.121


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