Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions block_quickmail.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function set_user() {
* @return context
*/
private function set_system_context() {
$this->system_context = context_system::instance();
$this->systemcontext = context_system::instance();
}

/**
Expand All @@ -70,7 +70,7 @@ private function set_system_context() {
* @return context
*/
private function set_course_context() {
$this->course_context = context_course::instance($this->course->id);
$this->coursecontext = context_course::instance($this->course->id);
}

/**
Expand All @@ -84,7 +84,7 @@ public function applicable_formats() {
'mod-scorm-view' => true
];

if (block_quickmail_plugin::user_can_send('broadcast', $this->user, $this->system_context)) {
if (block_quickmail_plugin::user_can_send('broadcast', $this->user, $this->systemcontext)) {
return array_merge($formats, [
'site' => true,
'my' => true,
Expand Down Expand Up @@ -123,7 +123,7 @@ public function get_content() {
$systemcontext = context_system::instance();

// Course-level Features (compose).
if (!$this->is_site_course() && block_quickmail_plugin::user_can_send('compose', $this->user, $this->course_context)) {
if (!$this->is_site_course() && block_quickmail_plugin::user_can_send('compose', $this->user, $this->coursecontext)) {
// COMPOSE (course-scoped message).
$this->add_item_to_content([
'lang_key' => block_quickmail_string::get('compose'),
Expand Down Expand Up @@ -165,7 +165,7 @@ public function get_content() {
]);

// ALTERNATES (manage your alternate send-from emails).
if (block_quickmail_plugin::user_has_capability('allowalternate', $this->user, $this->course_context)) {
if (block_quickmail_plugin::user_has_capability('allowalternate', $this->user, $this->coursecontext)) {
$this->add_item_to_content([
'lang_key' => block_quickmail_string::get('manage_alternates'),
'icon_key' => 't/add',
Expand All @@ -175,7 +175,7 @@ public function get_content() {
}

// CONFIGURATION (settings for course-level messaging preferences).
if (block_quickmail_plugin::user_has_capability('canconfig', $this->user, $this->course_context)) {
if (block_quickmail_plugin::user_has_capability('canconfig', $this->user, $this->coursecontext)) {
$this->add_item_to_content([
'lang_key' => get_string('configuration'),
'icon_key' => 'i/settings',
Expand All @@ -185,7 +185,7 @@ public function get_content() {
}

// NOTIFICATIONS.
if (block_quickmail_plugin::user_can_create_notifications($this->user, $this->course_context)) {
if (block_quickmail_plugin::user_can_create_notifications($this->user, $this->coursecontext)) {
$this->add_item_to_content([
'lang_key' => block_quickmail_string::get('notifications'),
'icon_key' => 'e/insert_time',
Expand All @@ -205,7 +205,7 @@ public function get_content() {
} else if ($this->is_site_course() && block_quickmail_plugin::user_can_send(
'broadcast',
$this->user,
$this->system_context)) {
$this->systemcontext)) {
// BROADCAST (site-scoped admin message).
$this->add_item_to_content([
'lang_key' => block_quickmail_string::get('open_broadcast'),
Expand Down