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

raeburn raeburn at source.lon-capa.org
Wed Apr 11 11:53:22 EDT 2012


raeburn		Wed Apr 11 15:53:22 2012 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - Additional arg for &aboutmewrapper (optional class to include in <a> tag).
  - Fix quoting change from rev 1.200, so $target is interpolated. 
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1069 loncom/interface/loncommon.pm:1.1070
--- loncom/interface/loncommon.pm:1.1069	Wed Apr 11 15:21:43 2012
+++ loncom/interface/loncommon.pm	Wed Apr 11 15:53:22 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1069 2012/04/11 15:21:43 raeburn Exp $
+# $Id: loncommon.pm,v 1.1070 2012/04/11 15:53:22 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3129,12 +3129,12 @@
 # ------------------------------------------------------------- Aboutme Wrapper
 
 sub aboutmewrapper {
-    my ($link,$username,$domain,$target)=@_;
+    my ($link,$username,$domain,$target,$class)=@_;
     if (!defined($username)  && !defined($domain)) {
         return;
     }
     return '<a href="/adm/'.$domain.'/'.$username.'/aboutme?forcestudent=1"'.
-	($target?' target="$target"':'').' title="'.&mt("View this user's personal information page").'">'.$link.'</a>';
+	($target?' target="'.$target.'"':'').($class?' class="'.$class.'"':'').' title="'.&mt("View this user's personal information page").'">'.$link.'</a>';
 }
 
 # ------------------------------------------------------------ Syllabus Wrapper
@@ -4937,7 +4937,8 @@
     if ($public) {
 	undef($role);
     } else {
-	$name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'});
+	$name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'},
+                                undef,'LC_menubuttons_link');
     }
     
     my $titleinfo = '<h1>'.$title.'</h1>';




More information about the LON-CAPA-cvs mailing list