Skip to content
Snippets Groups Projects
Commit 7b26c82c authored by David Siegfried's avatar David Siegfried
Browse files

fixes #7

parent 5c5f4c6b
Branches master
No related tags found
No related merge requests found
...@@ -61,22 +61,6 @@ class Coursehistory extends StudIPPlugin implements SystemPlugin, AdminCourseAct ...@@ -61,22 +61,6 @@ class Coursehistory extends StudIPPlugin implements SystemPlugin, AdminCourseAct
return $template; return $template;
} }
/**
* Run action
* @param $unconsumed_path
*/
public function perform($unconsumed_path)
{
$dispatcher = new Trails_Dispatcher(
$this->getPluginPath(),
rtrim(PluginEngine::getLink($this, [], null), '/'),
'show'
);
$dispatcher->plugin = $this;
$dispatcher->dispatch($unconsumed_path);
}
/** /**
* Helper function to cleanup output * Helper function to cleanup output
* @param $event * @param $event
......
...@@ -4,37 +4,25 @@ ...@@ -4,37 +4,25 @@
* @author David Siegfried <david.siegfried@uni-vechta.de> * @author David Siegfried <david.siegfried@uni-vechta.de>
* @license GPL2 or any later version * @license GPL2 or any later version
*/ */
class ShowController extends StudipController class ShowController extends PluginController
{ {
public function __construct($dispatcher) /**
* Index
*/
public function index_action()
{ {
parent::__construct($dispatcher);
$this->plugin = $dispatcher->plugin;
$this->course = $this->plugin->course; $this->course = $this->plugin->course;
}
public function before_filter(&$action, &$args)
{
parent::before_filter($action, $args);
PageLayout::setTitle(htmlReady($this->course->getFullname()) . ' - ' . $this->plugin->getPluginName()); PageLayout::setTitle(htmlReady($this->course->getFullname()) . ' - ' . $this->plugin->getPluginName());
if (Navigation::hasItem('/course/main/coursehistory')) { if (Navigation::hasItem('/course/main/coursehistory')) {
Navigation::activateItem('/course/main/coursehistory'); Navigation::activateItem('/course/main/coursehistory');
} }
}
/**
* Index
*/
public function index_action()
{
$this->log_actions = $this->getLogEvents(); $this->log_actions = $this->getLogEvents();
} }
/** /**
* Returns all log-events for given course * Returns all log-events for given course
*/ */
protected function getLogEvents() protected function getLogEvents(): array
{ {
$query = "SELECT la.`description`, le.`event_id` $query = "SELECT la.`description`, le.`event_id`
FROM `log_events` le FROM `log_events` le
......
pluginname=CourseHistory pluginname=CourseHistory
pluginclassname=Coursehistory pluginclassname=Coursehistory
origin=Vec origin=Vec
version=3.2 version=3.3
studipMinVersion=4.3 studipMinVersion=4.3
studipMaxVersion=4.4.99 studipMaxVersion=5.0.99
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
\Studip\LinkButton::createEdit( \Studip\LinkButton::createEdit(
$plugin->getPluginName(), $plugin->getPluginName(),
PluginEngine::getLink($plugin, ['cid' => $course_id], 'show/index'), PluginEngine::getLink($plugin, ['cid' => $course_id], 'show/index'),
['data-dialog' => 'size=100%']) ['data-dialog' => 'size=auto'])
?> ?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment