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

raeburn raeburn at source.lon-capa.org
Sat Mar 11 16:58:18 EST 2023


raeburn		Sat Mar 11 21:58:18 2023 EDT

  Modified files:              
    /loncom/interface	londocs.pm loncommon.pm 
  Log:
  - Bug 6975
    If timestamp/name prefix was present in title for resource in supplemental
    content for which hidden parameter was set or unset, parse it before 
    displaying in change log.
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.694 loncom/interface/londocs.pm:1.695
--- loncom/interface/londocs.pm:1.694	Fri Jan 20 16:19:56 2023
+++ loncom/interface/londocs.pm	Sat Mar 11 21:58:18 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.694 2023/01/20 16:19:56 raeburn Exp $
+# $Id: londocs.pm,v 1.695 2023/03/11 21:58:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1210,6 +1210,8 @@
             my ($title,$url) = split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'},3);
             if ($title eq '') {
                 ($title) = ($url =~ m{/([^/]+)$});
+            } elsif ($is_supp) {
+                $title = &Apache::loncommon::parse_supplemental_title($title);
             }
             $r->print(&LONCAPA::map::qtescape($title).':<ul>');
 	    foreach my $parameter ('randompick','hiddenresource','encrypturl','randomorder','gradable') {
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1400 loncom/interface/loncommon.pm:1.1401
--- loncom/interface/loncommon.pm:1.1400	Sat Dec 31 14:08:58 2022
+++ loncom/interface/loncommon.pm	Sat Mar 11 21:58:18 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1400 2022/12/31 14:08:58 raeburn Exp $
+# $Id: loncommon.pm,v 1.1401 2023/03/11 21:58:18 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -18599,8 +18599,10 @@
         my $name =  &plainname($uname,$udom);
         $name = &HTML::Entities::encode($name,'"<>&\'');
         $renametitle = &HTML::Entities::encode($renametitle,'"<>&\'');
-        $title='<i>'.&Apache::lonlocal::locallocaltime($time).'</i> '.
-            $name.': <br />'.$foldertitle;
+        $title='<i>'.&Apache::lonlocal::locallocaltime($time).'</i> '.$name;
+        if ($foldertitle ne '') { 
+            $title .= ': <br />'.$foldertitle;
+        }
     }
     if (wantarray) {
         return ($title,$foldertitle,$renametitle);




More information about the LON-CAPA-cvs mailing list