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

raeburn raeburn at source.lon-capa.org
Thu Jan 19 11:43:49 EST 2023


raeburn		Thu Jan 19 16:43:49 2023 EDT

  Modified files:              
    /loncom/interface	londocs.pm 
  Log:
  - If no title attribute is assigned to a resource, display filename instead in
    "After" column when showing a parameter change (hidden, urlhidden, randompick
    or randomorder) in Course Editor History. 
  
  
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.692 loncom/interface/londocs.pm:1.693
--- loncom/interface/londocs.pm:1.692	Wed Jan 18 18:10:26 2023
+++ loncom/interface/londocs.pm	Thu Jan 19 16:43:49 2023
@@ -1,7 +1,7 @@
 # The LearningOnline Network
 # Documents
 #
-# $Id: londocs.pm,v 1.692 2023/01/18 18:10:26 raeburn Exp $
+# $Id: londocs.pm,v 1.693 2023/01/19 16:43:49 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1207,7 +1207,11 @@
 	}
 	$r->print('</ul>');
 	if ($docslog{$id}{'logentry'}{'parameter_res'}) {
-	    $r->print(&LONCAPA::map::qtescape((split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'}))[0]).':<ul>');
+            my ($title,$url) = split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'},3);
+            if ($title eq '') {
+                ($title) = ($url =~ m{/([^/]+)$});
+            }
+            $r->print(&LONCAPA::map::qtescape($title).':<ul>');
 	    foreach my $parameter ('randompick','hiddenresource','encrypturl','randomorder','gradable') {
 		if ($docslog{$id}{'logentry'}{'parameter_action_'.$parameter}) {
 # FIXME: internationalization seems wrong here




More information about the LON-CAPA-cvs mailing list