[LON-CAPA-cvs] cvs: loncom /interface courseclassifier.pm lonsupportreq.pm
raeburn
raeburn@source.lon-capa.org
Thu, 03 Mar 2011 00:06:39 -0000
raeburn Thu Mar 3 00:06:39 2011 EDT
Modified files:
/loncom/interface lonsupportreq.pm courseclassifier.pm
Log:
- Institutional code compiled from selections in linked select boxes does
not need regular expressions used in search of nohist_courseids.db when
usd for helpdesk e-mail.
Index: loncom/interface/lonsupportreq.pm
diff -u loncom/interface/lonsupportreq.pm:1.63 loncom/interface/lonsupportreq.pm:1.64
--- loncom/interface/lonsupportreq.pm:1.63 Wed Mar 2 22:43:42 2011
+++ loncom/interface/lonsupportreq.pm Thu Mar 3 00:06:38 2011
@@ -1,5 +1,5 @@
#
-# $Id: lonsupportreq.pm,v 1.63 2011/03/02 22:43:42 raeburn Exp $
+# $Id: lonsupportreq.pm,v 1.64 2011/03/03 00:06:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -534,7 +534,9 @@
$totcodes = &Apache::courseclassifier::retrieve_instcodes(\%coursecodes,$defdom,$totcodes);
my @standardnames = &Apache::loncommon::get_standard_codeitems();
if ($totcodes > 0) {
- $coursecode = &Apache::courseclassifier::instcode_from_selectors($defdom);
+ my $noregexps = 1;
+ $coursecode =
+ &Apache::courseclassifier::instcode_from_selectors($defdom,$noregexps);
}
if ($coursecode eq '') {
foreach my $item (@standardnames) {
Index: loncom/interface/courseclassifier.pm
diff -u loncom/interface/courseclassifier.pm:1.13 loncom/interface/courseclassifier.pm:1.14
--- loncom/interface/courseclassifier.pm:1.13 Fri Feb 25 02:40:42 2011
+++ loncom/interface/courseclassifier.pm Thu Mar 3 00:06:38 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Utilities for classifying courses based on institutional code
#
-# $Id: courseclassifier.pm,v 1.13 2011/02/25 02:40:42 raeburn Exp $
+# $Id: courseclassifier.pm,v 1.14 2011/03/03 00:06:38 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -869,7 +869,7 @@
}
sub instcode_from_selectors {
- my ($cdom) = @_;
+ my ($cdom,$noregexps) = @_;
my $instcode;
my $caller = 'global';
my (%coursecodes,%codes,@codetitles,%cat_titles,%cat_order,
@@ -890,7 +890,11 @@
my $category = $local_to_standard{$loctitle};
if ($category ne '') {
if ($env{'form.'.$category} eq '-1' ) {
- $instcode .= $codedefaults{$category};
+ if ($noregexps) {
+ $instcode .= ' ';
+ } else {
+ $instcode .= $codedefaults{$category};
+ }
} else {
$instcode .= $env{'form.'.$category};
}