[LON-CAPA-cvs] cvs: loncom /interface lonmodifycourse.pm

raeburn lon-capa-cvs@mail.lon-capa.org
Fri, 29 Dec 2006 17:30:11 -0000


raeburn		Fri Dec 29 12:30:11 2006 EDT

  Modified files:              
    /loncom/interface	lonmodifycourse.pm 
  Log:
  Set default $type to 'Course', in case the version of lonpickcourse.pm being used has no Course/Non-standard course selector.
  
  
Index: loncom/interface/lonmodifycourse.pm
diff -u loncom/interface/lonmodifycourse.pm:1.28 loncom/interface/lonmodifycourse.pm:1.29
--- loncom/interface/lonmodifycourse.pm:1.28	Tue Nov 14 15:38:21 2006
+++ loncom/interface/lonmodifycourse.pm	Fri Dec 29 12:30:11 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # handler for DC-only modifiable course settings
 #
-# $Id: lonmodifycourse.pm,v 1.28 2006/11/14 20:38:21 raeburn Exp $
+# $Id: lonmodifycourse.pm,v 1.29 2006/12/29 17:30:11 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -138,6 +138,9 @@
                       'ownerdomfilter','coursefilter'];
     my %filter;
     my $type = $env{'form.type'};
+    if ($type eq '') {
+        $type = 'Course';
+    }
     my $action = '/adm/modifycourse';
     my $dctitle = &Apache::lonnet::plaintext('dc');
     $r->print(&mt('Revise your search criteria for this domain').' ('.$domdesc.').<br /><br />');
@@ -421,6 +424,9 @@
     }
     &print_header($r,$cdesc,$javascript_validations);
     my $type = $env{'form.type'};
+    if ($type eq '') {
+        $type = 'Course';
+    }
     my $dctitle = &Apache::lonnet::plaintext('dc');
     my $cctitle = &Apache::lonnet::plaintext('cc',$type);
     my $mainheader = &mt('Course settings modifiable by [_1] only.',$dctitle);
@@ -878,6 +884,9 @@
                   text=>"Pick action"});
                 my ($checked,$cdesc) = &check_course($r,$dom,$domdesc);
                 my $type = $env{'form.type'};
+                if ($type eq '') {
+                    $type = 'Course';
+                }
                 if ($checked eq 'ok') {
                     if ($phase eq 'menu') {
                         &print_modification_menu($r,$cdesc);