--- loncom/interface/lonpickcourse.pm 2006/11/14 16:51:42 1.57
+++ loncom/interface/lonpickcourse.pm 2006/12/11 21:41:40 1.60.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Pick a course
#
-# $Id: lonpickcourse.pm,v 1.57 2006/11/14 16:51:42 raeburn Exp $
+# $Id: lonpickcourse.pm,v 1.60.2.1 2006/12/11 21:41:40 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -79,7 +79,7 @@ sub handler {
my $onlyown = 0;
# if called to assign course-based portfolio access control
- if ((($env{'form.form'} eq 'portform') && ($env{'user.adv'}))) {
+ if ((($env{'form.form'} eq 'portform') && (!$env{'user.adv'}))) {
$onlyown = 1;
}
@@ -108,7 +108,7 @@ sub handler {
# print javascript functions for choosing a course
if ($env{'form.gosearch'} || $onlyown) {
- $r->print(&gochoose_javascript($type,$autosubmit,$lastaction));
+ $r->print(&gochoose_javascript($type,$multiple,$autosubmit,$lastaction));
}
$r->print('');
$r->print($submitopener);
@@ -339,6 +339,9 @@ $name_input
$roleelement
$multelement
|;
+ if ($formname eq 'portform') {
+ $output .= '';
+ }
}
if ($sincefilterform) {
$output .= $lt{'cac'}.': '.$sincefilterform.'
'."\n";
@@ -346,9 +349,9 @@ $multelement
if ($domainselectform) {
$output .= $lt{'cdo'}.': '.$domainselectform.'
'."\n";
}
- if ($typeselectform) {
- $output .= $lt{'cog'}.': '.$typeselectform.'
'."\n";
- }
+# if ($typeselectform) {
+# $output .= $lt{'cog'}.': '.$typeselectform.'
'."\n";
+# }
if ($instcodeform) {
$output .= $lt{'cin'}.': '.$instcodeform.'
'."\n";
}
@@ -406,7 +409,8 @@ sub search_courses {
undef,undef,$type);
} else {
$r->print('
');
- foreach my $cid (sort(&Apache::loncommon::findallcourses())) {
+ my %coursehash = &Apache::loncommon::findallcourses();
+ foreach my $cid (sort(keys(%coursehash))) {
$courses{$cid} = $env{'course.'.$cid.'.description'};
}
}