From 0f256bc05e3ff99ad2c8b724883dd883de8068e2 Mon Sep 17 00:00:00 2001 From: Stephen Bourget Date: Fri, 15 Jul 2016 16:13:06 -0400 Subject: [PATCH] MDL-55251 mod_chat: Add view permissions --- mod/chat/db/access.php | 8 ++++++++ mod/chat/lang/en/chat.php | 1 + mod/chat/version.php | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/mod/chat/db/access.php b/mod/chat/db/access.php index 89af1a6554b0a..9c4e6801dbd45 100644 --- a/mod/chat/db/access.php +++ b/mod/chat/db/access.php @@ -103,4 +103,12 @@ ), ), + 'mod/chat:view' => array( + 'captype' => 'read', + 'contextlevel' => CONTEXT_MODULE, + 'archetypes' => array( + 'user' => CAP_ALLOW, + 'guest' => CAP_ALLOW + ) + ) ); diff --git a/mod/chat/lang/en/chat.php b/mod/chat/lang/en/chat.php index 75deced78ca82..91545ba9e49be 100644 --- a/mod/chat/lang/en/chat.php +++ b/mod/chat/lang/en/chat.php @@ -62,6 +62,7 @@ $string['chatreport'] = 'Chat sessions'; $string['chat:talk'] = 'Talk in a chat'; $string['chattime'] = 'Next chat time'; +$string['chat:view'] = 'View chat activity'; $string['entermessage'] = "Enter your message"; $string['eventmessagesent'] = 'Message sent'; $string['eventsessionsviewed'] = 'Sessions viewed'; diff --git a/mod/chat/version.php b/mod/chat/version.php index 507c4cbb4d401..8a0c088800f8a 100644 --- a/mod/chat/version.php +++ b/mod/chat/version.php @@ -24,7 +24,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2016052300; // The current module version (Date: YYYYMMDDXX). +$plugin->version = 2016071500; // The current module version (Date: YYYYMMDDXX). $plugin->requires = 2016051900; // Requires this Moodle version. $plugin->component = 'mod_chat'; // Full name of the plugin (used for diagnostics). $plugin->cron = 300;