--- loncom/interface/lonpickcourse.pm 2004/11/23 18:03:04 1.19
+++ loncom/interface/lonpickcourse.pm 2005/01/27 19:20:55 1.24
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Pick a course
#
-# $Id: lonpickcourse.pm,v 1.19 2004/11/23 18:03:04 raeburn Exp $
+# $Id: lonpickcourse.pm,v 1.24 2005/01/27 19:20:55 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -53,7 +53,7 @@ ENDDOCUMENT
($ENV{'QUERY_STRING'},['domainfilter','descriptfilter',
'sincefilter','form','cnumelement',
'cdomelement','cnameelement','roleelement',
- 'pickedcourse']);
+ 'pickedcourse','instcodefilter','ownerfilter']);
# domain filter and selection
my $domainfilter=$ENV{'form.domainfilter'};
$domainfilter=~s/\W//g;
@@ -64,6 +64,14 @@ ENDDOCUMENT
my $descriptfilter=$ENV{'form.descriptfilter'};
unless ($descriptfilter) { $descriptfilter=''; }
my $listdescript=&HTML::Entities::encode($descriptfilter,'<>&"');
+# institutional code filter
+ my $instcodefilter=$ENV{'form.instcodefilter'};
+ unless ($instcodefilter) { $instcodefilter=''; }
+ my $listinstcode=&HTML::Entities::encode($instcodefilter,'<>&"');
+# course owner filter
+ my $ownerfilter=$ENV{'form.ownerfilter'};
+ unless ($ownerfilter) { $ownerfilter=''; }
+ my $listowner=&HTML::Entities::encode($ownerfilter,'<>&"');
# last course activity filter and selection
my $sincefilter=$ENV{'form.sincefilter'};
$sincefilter=~s/[^\d-]//g;
@@ -82,7 +90,6 @@ ENDDOCUMENT
# if called from loncreateuser, report sections, then close
my ($loaditem,$seclist);
my $num_sections = 0;
- my @sections = ();
if ($ENV{'form.form'} eq 'cu' && $ENV{'form.pickedcourse'}) {
$loaditem = 'onLoad="setSections()"';
my ($cdom,$cnum) = split/_/,$ENV{'form.pickedcourse'};
@@ -98,7 +105,9 @@ ENDDOCUMENT
my %lt=&Apache::lonlocal::texthash(
'cac' => 'Course Activity',
'cde' => 'Course Description',
- 'cdo' => 'Course Domain');
+ 'cdo' => 'Course Domain',
+ 'cin' => 'Course Institutional Code',
+ 'cow' => "Course Owner's usename");
my ($name_code,$name_input);
if (defined($ENV{'form.cnameelement'}) && $ENV{'form.cnameelement'} ne '') {
$name_code = "opener.document.$ENV{'form.form'}.$ENV{'form.cnameelement'}.value=cdesc;";
@@ -144,20 +153,31 @@ function setSections() {
var sectionsArray = new Array("$seclist")
opener.document.$ENV{"form.form"}.currsec.length = 0
if (numSections == 0) {
- opener.document.$ENV{"form.form"}.currsec.options[0] = new Option('No existing sections','-1',false,false)
+ opener.document.$ENV{"form.form"}.currsec.multiple=false
+ opener.document.$ENV{"form.form"}.currsec.size=1;
+ opener.document.$ENV{"form.form"}.currsec.options[0] = new Option('No existing sections','',false,false)
}
else {
- for (var i=0; i
+$lt{'cin'}:
+
+
+$lt{'cow'}:
+
+
$lt{'cde'}: