From 979c228e054e0e9fbd15cf8ac838bcd66c85600e Mon Sep 17 00:00:00 2001 From: Not-Brundle <113098403+Not-Brundle@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:27:50 +0100 Subject: [PATCH] Made changes to styles.css and edit.php Make the edit modal look like the view modal --- server/moodle/mod/homework/edit.php | 32 +++++++++++++++++---------- server/moodle/mod/homework/styles.css | 8 +++++++ 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/server/moodle/mod/homework/edit.php b/server/moodle/mod/homework/edit.php index b82f8f2f..c197ae90 100644 --- a/server/moodle/mod/homework/edit.php +++ b/server/moodle/mod/homework/edit.php @@ -66,7 +66,6 @@ // Output the header - REQUIRED. echo $OUTPUT->header(); -echo html_writer::tag('div', 'This is the homework edit page', ['class' => 'content']); $homeworkmaterials = $DB->get_records_sql( "SELECT hm.*, f.filename @@ -85,6 +84,9 @@ * @copyright 2024, cs-24-sw-5-01 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ + +echo '
'; + foreach ($homeworkmaterials as $materials) : // Generate the preview URL for the file if it exists. if ($materials->file_id !== null) { @@ -104,16 +106,20 @@ } ?> -
+
+ + startpage != null): + echo ''; + elseif ($materials->link != null): + echo ''; + elseif ($materials->starttime != null): + echo ''; + elseif ($materials->file_id != null): + echo ''; + endif; ?> + +
+

description) ?>

startpage !== null && $materials->endpage !== null) : ?>

file_id !== null && isset($previewurl)) : ?> filename, PATHINFO_EXTENSION)) === 'mp4') : ?> -

+
+ *:first-child { font-size: 20px; font-weight: bold; +} + +.homework-action-buttons button { + margin-right: 10px; +} + +.homework-action-buttons button:last-child { + margin-right: 0; } \ No newline at end of file