Minor - flint fixes

pull/2990/head
Julio 7 years ago
parent c4d2803de8
commit 2ec5cc16ef
  1. 52
      plugin/coursehomenotify/CourseHomeNotifyPlugin.php
  2. 2
      plugin/coursehomenotify/Entity/NotificationRelUser.php

@ -28,32 +28,6 @@ class CourseHomeNotifyPlugin extends Plugin
$this->setCourseSettings();
}
/**
* Set the course settings
*/
private function setCourseSettings()
{
if ('true' !== $this->get(self::SETTING_ENABLED)) {
return;
}
$name = $this->get_name();
$button = Display::toolbarButton(
$this->get_lang('SetNotification'),
api_get_path(WEB_PLUGIN_PATH).$name.'/configure.php?'.api_get_cidreq(),
'cog',
'primary'
);
$this->course_settings = [
[
'name' => '<p>'.$this->get_comment().'</p>'.$button.'<hr>',
'type' => 'html',
],
];
}
/**
* @return CourseHomeNotifyPlugin|null
*/
@ -225,4 +199,30 @@ class CourseHomeNotifyPlugin extends Plugin
return $modal;
}
/**
* Set the course settings.
*/
private function setCourseSettings()
{
if ('true' !== $this->get(self::SETTING_ENABLED)) {
return;
}
$name = $this->get_name();
$button = Display::toolbarButton(
$this->get_lang('SetNotification'),
api_get_path(WEB_PLUGIN_PATH).$name.'/configure.php?'.api_get_cidreq(),
'cog',
'primary'
);
$this->course_settings = [
[
'name' => '<p>'.$this->get_comment().'</p>'.$button.'<hr>',
'type' => 'html',
],
];
}
}

@ -98,4 +98,4 @@ class NotificationRelUser
return $this;
}
}
}

Loading…
Cancel
Save