MDL-22320 Added a 'Send a message' link to the main profile page, linking to messaging
This commit is contained in:
+3
-3
@@ -989,8 +989,8 @@ $string['messageprovider:notices'] = 'Notices about minor problems';
|
||||
$string['messageprovider:notices_help'] = 'These are notices that an administrator might be interested in seeing.';
|
||||
$string['messageprovider:instantmessage'] = 'Personal messages between users';
|
||||
$string['messageprovider:instantmessage_help'] = 'This section configures what happens to messages that are sent to you directly from other users on this site.';
|
||||
$string['messageselect'] = 'Select this user as an email recipient';
|
||||
$string['messageselectadd'] = 'Add / send message';
|
||||
$string['messageselect'] = 'Select this user as a message recipient';
|
||||
$string['messageselectadd'] = 'Send a message';
|
||||
$string['migratinggrades'] = 'Migrating grades';
|
||||
$string['min'] = 'min';
|
||||
$string['mins'] = 'mins';
|
||||
@@ -1766,7 +1766,7 @@ $string['windowclosing'] = 'This window should close automatically. If not, plea
|
||||
$string['withchosenfiles'] = 'With chosen files';
|
||||
$string['withoutuserdata'] = 'without user data';
|
||||
$string['withselectedusers'] = 'With selected users...';
|
||||
$string['withselectedusers_help'] = '* Add / send message - For sending a message to one or more participants
|
||||
$string['withselectedusers_help'] = '* Send message - For sending a message to one or more participants
|
||||
* Add a new note - For adding a note to a selected participant
|
||||
* Add a common note - For adding the same note to more than one participant
|
||||
* Extend enrolment (individual) - For extending a selected student\'s access to the course, even when an enrolment period is set
|
||||
|
||||
@@ -40,3 +40,4 @@
|
||||
.userselector div label {margin-right: 0.3em;}
|
||||
#userselector_options .collapsibleregioncaption {font-weight: bold;}
|
||||
#userselector_options p {margin:0.2em 0;text-align:left;}
|
||||
#page-user-profile .messagebox {text-align:center;margin-left:auto;margin-right:auto;}
|
||||
|
||||
@@ -201,6 +201,7 @@ form.popupform label {margin-right: 0.5em;}
|
||||
#page-user-index #longtimenosee,
|
||||
#page-user-index #showall {text-align: center;}
|
||||
#page-user-profile .remoteuserinfo, #page-user-view .remoteuserinfo{background-color:#D2EBFF;text-align:center;padding:3px;}
|
||||
#page-user-profile .messagebox {text-align:center;margin-left:auto;margin-right:auto;padding:5px;}
|
||||
|
||||
/**
|
||||
* Moodle Forms
|
||||
@@ -441,4 +442,4 @@ table#tag-management-list {margin: 10px auto;width: 80%;}
|
||||
.path-enrol .enrolusersbutton,
|
||||
.path-enrol .enrolcohortbutton {float:left;}
|
||||
.path-enrol .enrolusersbutton.instance1,
|
||||
.path-enrol .enrolcohortbutton.instance1 {float:right;}
|
||||
.path-enrol .enrolcohortbutton.instance1 {float:right;}
|
||||
|
||||
@@ -215,6 +215,7 @@ if ($user->description && !isset($hiddenfields['description'])) {
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
|
||||
// Print all the little details in a list
|
||||
|
||||
echo '<table class="list" summary="">';
|
||||
@@ -371,6 +372,14 @@ echo "</table></div></div>";
|
||||
|
||||
echo $OUTPUT->blocks_for_region('content');
|
||||
|
||||
// Print messaging link if allowed
|
||||
if (isloggedin() && has_capability('moodle/site:sendmessage', $context)
|
||||
&& !empty($CFG->messaging) && !isguestuser() && ($user->username != 'guest') && ($USER->id != $user->id)) {
|
||||
echo '<div class="messagebox">';
|
||||
echo '<a href="'.$CFG->wwwroot.'/message/index.php?id='.$user->id.'">'.get_string('messageselectadd').'</a>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
if ($CFG->debugdisplay && debugging('', DEBUG_DEVELOPER) && $currentuser) { // Show user object
|
||||
echo '<br /><br /><hr />';
|
||||
echo $OUTPUT->heading('DEBUG MODE: User session variables');
|
||||
|
||||
Reference in New Issue
Block a user