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

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 26 Sep 2002 15:19:39 -0000


matthew		Thu Sep 26 11:19:39 2002 EDT

  Modified files:              
    /loncom/interface	loncreatecourse.pm 
  Log:
  Fixes Bug 690 - default server for the course is now set to current server
  if the user is logged into a library.
  
  
Index: loncom/interface/loncreatecourse.pm
diff -u loncom/interface/loncreatecourse.pm:1.13 loncom/interface/loncreatecourse.pm:1.14
--- loncom/interface/loncreatecourse.pm:1.13	Thu Sep  5 15:37:00 2002
+++ loncom/interface/loncreatecourse.pm	Thu Sep 26 11:19:39 2002
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Create a course
 #
-# $Id: loncreatecourse.pm,v 1.13 2002/09/05 19:37:00 www Exp $
+# $Id: loncreatecourse.pm,v 1.14 2002/09/26 15:19:39 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -56,8 +56,11 @@
     my %host_servers = &Apache::loncommon::get_library_servers($defdom);
     my $course_home = '<select name="course_home" size="1">'."\n";
     foreach my $server (sort(keys(%host_servers))) {
-        $course_home .= 
-          qq{<option value="$server">$server $host_servers{$server}</option>};
+        $course_home .= qq{<option value="$server"};
+        if ($server eq $Apache::lonnet::perlvar{'lonHostID'}) {
+            $course_home .= " selected ";
+        }
+        $course_home .= qq{>$server $host_servers{$server}</option>};
     }
     $course_home .= "\n</select>\n";
     my $domform = &Apache::loncommon::select_dom_form($defdom,'ccdomain');