Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

MDL-31835 message: added a view conversation type link after each con…

…versation on the recent conversation screen
  • Loading branch information...
commit 178ba8bc365be4b44896058b7e23a3a926794396 1 parent a2b30aa
Andrew Davis authored March 03, 2012
1  lang/en/message.php
@@ -128,6 +128,7 @@
128 128
 $string['settingssaved'] = 'Your settings have been saved';
129 129
 $string['showmessagewindow'] = 'Popup window on new message';
130 130
 $string['strftimedaydatetime'] = '%A, %d %B %Y, %I:%M %p';
  131
+$string['thisconversation'] = 'this conversation';
131 132
 $string['timenosee'] = 'Minutes since I was last seen online';
132 133
 $string['timesent'] = 'Time sent';
133 134
 $string['touserdoesntexist'] = 'You can not send a message to a user id ({$a}) that doesn\'t exist';
6  message/lib.php
@@ -813,6 +813,12 @@ function message_print_recent_conversations($user=null, $showicontext=false) {
813 813
 
814 814
     $conversations = message_get_recent_conversations($user);
815 815
 
  816
+    // Attach context url information to create the "View this conversation" type links
  817
+    foreach($conversations as $conversation) {
  818
+        $conversation->contexturl = new moodle_url("/message/index.php?user2={$conversation->id}");
  819
+        $conversation->contexturlname = get_string('thisconversation', 'message');
  820
+    }
  821
+
816 822
     $showotheruser = true;
817 823
     message_print_recent_messages_table($conversations, $user, $showotheruser, $showicontext);
818 824
 }

0 notes on commit 178ba8b

Please sign in to comment.
Something went wrong with that request. Please try again.