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

fixes #7

parent 5c5f4c6b
No related branches found
No related tags found
No related merge requests found
......@@ -61,22 +61,6 @@ class Coursehistory extends StudIPPlugin implements SystemPlugin, AdminCourseAct
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
* @param $event
......
......@@ -4,37 +4,25 @@
* @author David Siegfried <david.siegfried@uni-vechta.de>
* @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;
}
public function before_filter(&$action, &$args)
{
parent::before_filter($action, $args);
PageLayout::setTitle(htmlReady($this->course->getFullname()) . ' - ' . $this->plugin->getPluginName());
if (Navigation::hasItem('/course/main/coursehistory')) {
Navigation::activateItem('/course/main/coursehistory');
}
}
/**
* Index
*/
public function index_action()
{
$this->log_actions = $this->getLogEvents();
}
/**
* Returns all log-events for given course
*/
protected function getLogEvents()
protected function getLogEvents(): array
{
$query = "SELECT la.`description`, le.`event_id`
FROM `log_events` le
......
pluginname=CourseHistory
pluginclassname=Coursehistory
origin=Vec
version=3.2
version=3.3
studipMinVersion=4.3
studipMaxVersion=4.4.99
studipMaxVersion=5.0.99
......@@ -2,5 +2,5 @@
\Studip\LinkButton::createEdit(
$plugin->getPluginName(),
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