version 1.101, 2019/07/23 01:30:35
|
version 1.102, 2019/07/23 13:58:53
|
Line 281 function setCatDepth(depth) {
|
Line 281 function setCatDepth(depth) {
|
} |
} |
document.coursecats.catalog_maxdepth.value = depth; |
document.coursecats.catalog_maxdepth.value = depth; |
} else { |
} else { |
document.coursecats.currcat_0.value = ''; |
document.coursecats.currcat_0.value = ''; |
document.coursecats.catalog_maxdepth.value = ''; |
document.coursecats.catalog_maxdepth.value = ''; |
} |
} |
document.coursecats.submit(); |
document.coursecats.submit(); |
Line 623 sub validate_input {
|
Line 623 sub validate_input {
|
} elsif (ref($crscatsref) eq 'HASH') { |
} elsif (ref($crscatsref) eq 'HASH') { |
unless (exists($crscatsref->{$env{'form.'.$key}})) { |
unless (exists($crscatsref->{$env{'form.'.$key}})) { |
delete($env{'form.'.$key}); |
delete($env{'form.'.$key}); |
} else { |
|
delete($env{'form.'.$key}); |
|
} |
} |
} else { |
} else { |
delete($env{'form.'.$key}); |
delete($env{'form.'.$key}); |
Line 637 sub validate_input {
|
Line 635 sub validate_input {
|
sub get_instcode_allowable { |
sub get_instcode_allowable { |
my ($codedom,$possvalref) = @_; |
my ($codedom,$possvalref) = @_; |
return 1 unless (ref($possvalref) eq 'HASH'); |
return 1 unless (ref($possvalref) eq 'HASH'); |
my $caller = 'global'; |
my $instcats = &Apache::lonnet::get_dom_instcats($codedom); |
my %coursecodes = (); |
if (ref($instcats) eq 'HASH') { |
my %codes = (); |
if ((ref($instcats->{'codetitles'}) eq 'ARRAY') && (ref($instcats->{'codes'}) eq 'HASH')) { |
my @codetitles = (); |
my %codes = %{$instcats->{'codes'}}; |
my %cat_titles = (); |
my @codetitles = @{$instcats->{'codetitles'}}; |
my %cat_order = (); |
|
my $totcodes = &Apache::courseclassifier::retrieve_instcodes(\%coursecodes,$codedom); |
|
if ($totcodes > 0) { |
|
if (&Apache::lonnet::auto_instcode_format($caller,$codedom,\%coursecodes, |
|
\%codes,\@codetitles,\%cat_titles,\%cat_order) eq 'ok') { |
|
my @standardnames = &Apache::loncommon::get_standard_codeitems(); |
my @standardnames = &Apache::loncommon::get_standard_codeitems(); |
my %local_to_standard; |
my %local_to_standard; |
for (my $i=0; $i<@codetitles; $i++) { |
for (my $i=0; $i<@codetitles; $i++) { |
Line 771 END
|
Line 764 END
|
|
|
sub instcode_course_selector { |
sub instcode_course_selector { |
my ($r,$codedom,$formname,$domdesc,$catlinks,$catjs,$codetitles,$cattype,$canviewall) = @_; |
my ($r,$codedom,$formname,$domdesc,$catlinks,$catjs,$codetitles,$cattype,$canviewall) = @_; |
my %coursecodes = (); |
|
my %codes = (); |
|
my %cat_titles = (); |
my %cat_titles = (); |
my %cat_order = (); |
my %cat_order = (); |
my %cat_items; |
my %cat_items = (); |
my $caller = 'global'; |
|
my $format_reply; |
|
my %add_entries = (topmargin => "0", |
my %add_entries = (topmargin => "0", |
marginheight => "0",); |
marginheight => "0",); |
my ($jscript,$totcodes,$numtitles,$lasttitle) = |
my ($jscript,$totcodes,$numtitles,$lasttitle) = |