Diff for /loncom/interface/lonuserutils.pm between versions 1.184.4.2 and 1.184.4.3

version 1.184.4.2, 2019/07/07 19:00:53 version 1.184.4.3, 2019/07/26 18:37:16
Line 2287  sub build_user_record { Line 2287  sub build_user_record {
   
 sub courses_selector {  sub courses_selector {
     my ($cdom,$formname) = @_;      my ($cdom,$formname) = @_;
     my %coursecodes = ();  
     my %codes = ();      my %codes = ();
     my @codetitles = ();      my @codetitles = ();
     my %cat_titles = ();      my %cat_titles = ();
Line 2300  sub courses_selector { Line 2299  sub courses_selector {
     my $jscript = '';      my $jscript = '';
   
     my $totcodes = 0;      my $totcodes = 0;
     $totcodes =      my $instcats = &Apache::lonnet::get_dom_instcats($cdom);
         &Apache::courseclassifier::retrieve_instcodes(\%coursecodes,      if (ref($instcats) eq 'HASH') {
                                                       $cdom,$totcodes);          if ((ref($instcats->{'codetitles'}) eq 'ARRAY') && (ref($instcats->{'codes'}) eq 'HASH') &&
     if ($totcodes > 0) {              (ref($instcats->{'cat_titles'}) eq 'HASH') && (ref($instcats->{'cat_order'}) eq 'HASH')) {
         $format_reply =              %codes = %{$instcats->{'codes'}};
              &Apache::lonnet::auto_instcode_format($caller,$cdom,\%coursecodes,              @codetitles = @{$instcats->{'codetitles'}};
                                 \%codes,\@codetitles,\%cat_titles,\%cat_order);              %cat_titles = %{$instcats->{'cat_titles'}};
         if ($format_reply eq 'ok') {              %cat_order = %{$instcats->{'cat_order'}};
               $totcodes = scalar(keys(%codes));
             my $numtypes = @codetitles;              my $numtypes = @codetitles;
             &Apache::courseclassifier::build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles);              &Apache::courseclassifier::build_code_selections(\%codes,\@codetitles,\%cat_titles,\%cat_order,\%idlist,\%idnums,\%idlist_titles);
             my ($scripttext,$longtitles) = &Apache::courseclassifier::javascript_definitions(\@codetitles,\%idlist,\%idlist_titles,\%idnums,\%cat_titles);              my ($scripttext,$longtitles) = &Apache::courseclassifier::javascript_definitions(\@codetitles,\%idlist,\%idlist_titles,\%idnums,\%cat_titles);
Line 2344  function setCourseCat(formname) { Line 2344  function setCourseCat(formname) {
     }      }
     courseSet('$codetitles[1]');      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;
         }          }
     }      }
     if (formname.Department.options[formname.Department.selectedIndex].value == -1) {      if (formname.Department.options[formname.Department.selectedIndex].value == -1) {

Removed from v.1.184.4.2  
changed lines
  Added in v.1.184.4.3


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