[LON-CAPA-cvs] cvs: loncom /imspackages imsimport.pm

raeburn raeburn at source.lon-capa.org
Sun Jul 23 09:33:52 EDT 2023


raeburn		Sun Jul 23 13:33:52 2023 EDT

  Modified files:              
    /loncom/imspackages	imsimport.pm 
  Log:
  - Breadcrumbs text when displaying/editing resource in Course Authoring Space.
  
  
Index: loncom/imspackages/imsimport.pm
diff -u loncom/imspackages/imsimport.pm:1.48 loncom/imspackages/imsimport.pm:1.49
--- loncom/imspackages/imsimport.pm:1.48	Sun Nov  5 20:04:30 2017
+++ loncom/imspackages/imsimport.pm	Sun Jul 23 13:33:52 2023
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 # 
-# $Id: imsimport.pm,v 1.48 2017/11/05 20:04:30 raeburn Exp $
+# $Id: imsimport.pm,v 1.49 2023/07/23 13:33:52 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -773,13 +773,25 @@
     }
 
     my $title = 'Upload IMS package to Authoring Space';
+    my $crsauthor;
+    if ($env{'request.course.id'}) {
+        my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'};
+        my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'};
+        if (($udom eq $cdom) && ($uname eq $cnum)) {
+            $title = 'Upload IMS package to Course Authoring Space';
+            $crsauthor = 1;
+        }
+    }
+
     $r->print(&Apache::loncommon::start_page($title, $javascript));
 
-    if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
-        $r->print('<p><span class="LC_info">'
-                  .&mt('Co-Author [_1]',$uname.':'.$udom)
-                  .'</span></p>'
-        );
+    unless ($crsauthor) {
+        if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {
+            $r->print('<p><span class="LC_info">'
+                      .&mt('Co-Author [_1]',$uname.':'.$udom)
+                      .'</span></p>'
+            );
+        }
     }
     if ($env{'form.phase'} eq 'two') {
         my $flag = &Apache::lonupload::phasetwo($r,$fn,'imsimport');




More information about the LON-CAPA-cvs mailing list