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

raeburn raeburn at source.lon-capa.org
Fri Jun 7 10:37:56 EDT 2024


raeburn		Fri Jun  7 14:37:56 2024 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - Availability of "Course Authoring Space" set in Course Community defaults
    in domain (by container type), can be overridden for specific course(s).
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.709 loncom/interface/londocs.pm:1.710
--- loncom/interface/londocs.pm:1.709	Wed Jan 10 20:07:37 2024
+++ loncom/interface/londocs.pm	Fri Jun  7 14:37:55 2024
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.709 2024/01/10 20:07:37 raeburn Exp $
+# $Id: londocs.pm,v 1.710 2024/06/07 14:37:55 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -6694,7 +6694,18 @@
             $checkcrsres = 1;
         } elsif ($env{'course.'.$coursedom.'_'.$coursenum.'.internal.crsauthor'} ne '0') {
             my %domdefs=&Apache::lonnet::get_domain_defaults($coursedom);
-            if ($domdefs{'crsauthor'}) {
+            my $type = lc($env{'course.'.$env{'request.course.id'}.'.type'});
+            unless (($type eq 'community') || ($type eq 'placement')) {
+                $type = 'unofficial';
+                if ($env{'course.'.$env{'request.course.id'}.'internal.coursecode'} ne '') {
+                    $type = 'official';
+                } elsif ($env{'course.'.$env{'request.course.id'}.'internal.textbook'} ne '') {
+                    $type = 'textbook';
+                } else {
+                    $type = 'unofficial';
+                }
+            }
+            if ($domdefs{$type.'crsauthor'}) {
                 $checkcrsres = 1;
             }
         }




More information about the LON-CAPA-cvs mailing list