Skip to content

Commit

Permalink
Merge pull request #11 from kialo/PM-46537-apply-feedback
Browse files Browse the repository at this point in the history
PM-46537 work on reivews from moodle
  • Loading branch information
Clemens-Kialo authored Sep 12, 2024
2 parents 9708311 + b64214c commit 556c34d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 25 deletions.
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
require_course_login($course);

$coursecontext = context_course::instance($course->id);
require_capability('mod/kialo:view', $coursecontext);

$PAGE->set_url('/mod/kialo/index.php', ['id' => $id]);
$PAGE->set_title(format_string($course->fullname));
Expand All @@ -46,7 +47,7 @@
$kialos = get_all_instances_in_course('kialo', $course);

if (empty($kialos)) {
notice(get_string('no$kialoinstances', 'mod_kialo'), new moodle_url('/course/view.php', ['id' => $course->id]));
notice(new lang_string('noinstances', 'error', 'Kialo'), new moodle_url('/course/view.php', ['id' => $course->id]));
}

$table = new html_table();
Expand Down
25 changes: 1 addition & 24 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,9 @@
format('woff2');
}

body,
div,
html,
iframe,
p,
span {
border: 0;
font: inherit;
font-size: 100%;
margin: 0;
padding: 0;
vertical-align: baseline;
}

body,
html {
height: 100%;
}

html {
-webkit-text-size-adjust: 100%;
}

.kialo-loading-text {
display: flex;
height: 100%;
min-height: 100vh;
align-items: center;
flex-direction: column;
justify-content: center;
Expand Down
8 changes: 8 additions & 0 deletions tests/classes/kialo_view_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

namespace mod_kialo;

use stdClass;

defined('MOODLE_INTERNAL') || die();

require_once(__DIR__ . '/../../vendor/autoload.php');
Expand All @@ -33,6 +35,12 @@
* Tests the view helpers.
*/
final class kialo_view_test extends \advanced_testcase {
/**
* The test user the tests are run as.
*
* @var stdClass
*/
private stdClass $user;

protected function setUp(): void {
parent::setUp();
Expand Down

0 comments on commit 556c34d

Please sign in to comment.