Skip to content

Commit

Permalink
Code style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
annda committed Oct 18, 2023
1 parent db93d57 commit a50c193
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion action.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
class action_plugin_lms extends \dokuwiki\Extension\ActionPlugin
{

/** @inheritDoc */
public function register(Doku_Event_Handler $controller)
{
Expand Down
10 changes: 5 additions & 5 deletions admin.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* DokuWiki Plugin lms (Admin Component)
*
Expand All @@ -13,7 +14,6 @@ public function forAdminOnly()
return false;
}


/** @inheritDoc */
public function handle()
{
Expand All @@ -30,23 +30,23 @@ public function html()
$form = new dokuwiki\Form\Form(['method' => 'POST', 'id' => 'lms__admin-autocomplete']);
$form->addTextInput('user', $this->getLang('username'));
$form->addButton('submit', '🔍');
echo '<p>'. $form->toHTML() .'</p>';
echo '<p>' . $form->toHTML() . '</p>';

if(!$INPUT->str('user')) return;
if (!$INPUT->str('user')) return;

/** @var helper_plugin_lms $hlp */
$hlp = $this->loadHelper('lms');
$list = $hlp->getLessons($INPUT->str('user'));

echo sprintf('<h2>'.$this->getLang('status').'</h2>', hsc($INPUT->str('user')));
echo sprintf('<h2>' . $this->getLang('status') . '</h2>', hsc($INPUT->str('user')));
echo '<table class="inline">';
foreach ($list as $id => $dt) {
echo '<tr>';
echo '<td>';
echo html_wikilink($id);
echo '</td>';
echo '<td>';
if ($dt){
if ($dt) {
echo dformat($dt);
} else {
echo '---';
Expand Down
2 changes: 1 addition & 1 deletion conf/default.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

/**
* Default settings for the lms plugin
*
* @author Andreas Gohr <[email protected]>
*/

$conf['controlpage'] = 'lms';

3 changes: 1 addition & 2 deletions conf/metadata.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?php

/**
* Options for the lms plugin
*
* @author Andreas Gohr <[email protected]>
*/


$meta['controlpage'] = array('string');

2 changes: 0 additions & 2 deletions helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/
class helper_plugin_lms extends \dokuwiki\Extension\Plugin
{

/**
* Return all lessons and info about the user's current completion status
*
Expand Down Expand Up @@ -224,4 +223,3 @@ protected function parseControlPage($cp)
return $pages;
}
}

0 comments on commit a50c193

Please sign in to comment.