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

raeburn raeburn@source.lon-capa.org
Tue, 16 Mar 2010 22:40:12 -0000


raeburn		Tue Mar 16 22:40:12 2010 EDT

  Modified files:              
    /loncom/interface	lonrequestcourse.pm 
  Log:
  - Include course type (Course or Community) as second arg in call to &generate_coursenum().
  
  
Index: loncom/interface/lonrequestcourse.pm
diff -u loncom/interface/lonrequestcourse.pm:1.46 loncom/interface/lonrequestcourse.pm:1.47
--- loncom/interface/lonrequestcourse.pm:1.46	Mon Mar  8 13:42:18 2010
+++ loncom/interface/lonrequestcourse.pm	Tue Mar 16 22:40:12 2010
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Request a course
 #
-# $Id: lonrequestcourse.pm,v 1.46 2010/03/08 13:42:18 wenzelju Exp $
+# $Id: lonrequestcourse.pm,v 1.47 2010/03/16 22:40:12 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1364,7 +1364,11 @@
         if ($env{'form.origcnum'} =~ /^($match_courseid)$/) {
             $cnum = $env{'form.origcnum'};
         } else {
-            $cnum = &Apache::lonnet::generate_coursenum($dom);
+            my $gentype = 'Course';
+            if ($crstype eq 'community') {
+                $gentype = 'Community';
+            }
+            $cnum = &Apache::lonnet::generate_coursenum($dom,$gentype);
         }
         &Apache::lonnet::auto_possible_instcodes($dom,\@codetitles,\%cat_titles,
                                                  \%cat_order,\@code_order);