Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PM-46537 work on reivews from moodle #11

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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