version 1.80, 2009/05/05 05:30:00
|
version 1.83, 2009/07/25 23:16:04
|
Line 51 sub handler {
|
Line 51 sub handler {
|
($ENV{'QUERY_STRING'},['domainfilter','form','cnumelement', |
($ENV{'QUERY_STRING'},['domainfilter','form','cnumelement', |
'cdomelement','cnameelement','roleelement', |
'cdomelement','cnameelement','roleelement', |
'multiple','type','setroles','fixeddom']); |
'multiple','type','setroles','fixeddom']); |
|
|
my ($type,$title,$jscript,$multelement,$multiple,$roleelement, |
my ($type,$title,$jscript,$multelement,$multiple,$roleelement, |
$lastaction,$autosubmit,$submitopener); |
$lastaction,$autosubmit,$submitopener); |
|
|
# Get course type - Course or Non-standard Course. |
# Get course type - Course or Community. |
$type = $env{'form.type'}; |
$type = $env{'form.type'}; |
if (!defined($env{'form.type'})) { |
if (!defined($env{'form.type'})) { |
$type = 'Course'; |
$type = 'Course'; |
} |
} |
$title = &mt('Selecting a [_1]',$type); |
$title = 'Selecting a '.$type; |
|
|
# Setup for multiple course selections, if flag for multiples set. |
# Setup for multiple course selections, if flag for multiples set. |
$multiple = $env{'form.multiple'}; |
$multiple = $env{'form.multiple'}; |
if ($multiple) { |
if ($multiple) { |
($jscript,$multelement) = &multiples_tag(); |
($jscript,$multelement) = &multiples_tag(); |
$title = &mt('Selecting [_1](s)',lc($type)); |
$title = 'Selecting '.$type.'(s)'; |
} |
} |
|
|
# if called when a DC is selecting a course |
# if called when a DC is selecting a course |
Line 423 sub multiples_tag {
|
Line 422 sub multiples_tag {
|
|
|
sub build_filters { |
sub build_filters { |
my ($filterlist,$type,$roleelement,$multelement,$filter,$action, |
my ($filterlist,$type,$roleelement,$multelement,$filter,$action, |
$numtitlesref) = @_; |
$numtitlesref,$caller) = @_; |
my $list; |
my $list; |
my $formname; |
my $formname; |
my ($fixeddom,$codedom,$jscript); |
my ($fixeddom,$codedom,$jscript); |
if (defined($env{'form.form'})) { |
if (defined($env{'form.form'})) { |
$formname = $env{'form.form'}; |
$formname = $env{'form.form'}; |
|
} else { |
|
$formname = $caller; |
} |
} |
my ($domainselectform,$sincefilterform,$ownerdomselectform,$persondomselectform, |
my ($domainselectform,$sincefilterform,$ownerdomselectform,$persondomselectform, |
$instcodeform,$typeselectform,$instcodetitle); |
$instcodeform,$typeselectform,$instcodetitle); |
Line 544 sub build_filters {
|
Line 545 sub build_filters {
|
'</script>'."\n"; |
'</script>'."\n"; |
} |
} |
} |
} |
foreach my $posstype ('Course','Non-standard Course') { |
foreach my $posstype ('Course','Community') { |
$typeselectform.='<option value="'.$posstype.'"'. |
$typeselectform.='<option value="'.$posstype.'"'. |
($posstype eq $type ? ' selected="selected" ' : ''). ">".&mt($posstype)."</option>\n"; |
($posstype eq $type ? ' selected="selected" ' : ''). ">".&mt($posstype)."</option>\n"; |
} |
} |
Line 752 sub gochoose_javascript {
|
Line 753 sub gochoose_javascript {
|
total => 'coursetotal', |
total => 'coursetotal', |
list => 'courselist', |
list => 'courselist', |
}, |
}, |
'Non-standard Course' => { |
'Community' => { |
name => 'grouppick', |
name => 'grouppick', |
total => 'grouptotal', |
total => 'grouptotal', |
list => 'grouplist', |
list => 'grouplist', |
Line 869 Course Activity - how recently was cours
|
Line 870 Course Activity - how recently was cours
|
Course Domain - the domain of the course |
Course Domain - the domain of the course |
|
|
=item * |
=item * |
Course Type - Course or Non-standard Course |
Course Type - Course or Community |
|
|
=item * |
=item * |
Course Institutional Code - the institutional identifier assigned to the course |
Course Institutional Code - the institutional identifier assigned to the course |
Line 922 Following selection, and/or submission,
|
Line 923 Following selection, and/or submission,
|
X<create_user_javascript()> |
X<create_user_javascript()> |
B<create_user_javascript($type)>: |
B<create_user_javascript($type)>: |
|
|
Input: 1 - $type - the course type - Course or Non-standard Course |
Input: 1 - $type - the course type - Course or Community |
|
|
Output: 1 - $output - javascript wrapped in E<lt>scriptE<gt>E<lt>/scriptE<gt> tags |
Output: 1 - $output - javascript wrapped in E<lt>scriptE<gt>E<lt>/scriptE<gt> tags |
|
|
Line 954 Side Effects: None
|
Line 955 Side Effects: None
|
|
|
=item * |
=item * |
X<build_filters()> |
X<build_filters()> |
B<build_filters($filterlist,$type,$roleelement,$multelement,$filter,$action,$numfiltersref)>: |
B<build_filters($filterlist,$type,$roleelement,$multelement,$filter,$action,$numfiltersref,$caller)>: |
|
|
|
|
Input: 7 - anonymous array of search criteria; course type; $roleelement ; $multelement ; anonymous hash of criteria and their values; form action; ref to scalar (count of number of elements in institutional codes -- e.g., 4 for year, semester, department, and number). |
Input: 7 - anonymous array of search criteria; course type; $roleelement ; $multelement ; anonymous hash of criteria and their values; form action; ref to scalar (count of number of elements in institutional codes -- e.g., 4 for year, semester, department, and number); caller context (e.g., set to 'modifycourse' when routine is called from lonmodifycourse.pm). |
|
|
Output: 1 - $output - HTML for display of search criteria, and hidden form elements. |
Output: 1 - $output - HTML for display of search criteria, and hidden form elements. |
|
|