From 03edbea9931c0f67e16b8536c437d2cc1d603c35 Mon Sep 17 00:00:00 2001 From: Anindra Das Bivas Date: Thu, 16 Apr 2026 12:59:06 +0600 Subject: [PATCH 1/2] Moved assignment css and update FileUploader --- .../learning-area/components/_assignment.scss | 286 ------------------ .../learning-area/components/_index.scss | 3 +- components/FileUploader.php | 6 +- 3 files changed, 4 insertions(+), 291 deletions(-) delete mode 100644 assets/src/scss/frontend/learning-area/components/_assignment.scss diff --git a/assets/src/scss/frontend/learning-area/components/_assignment.scss b/assets/src/scss/frontend/learning-area/components/_assignment.scss deleted file mode 100644 index 2e335dc53c..0000000000 --- a/assets/src/scss/frontend/learning-area/components/_assignment.scss +++ /dev/null @@ -1,286 +0,0 @@ -@use '@Core/scss/mixins' as *; -@use '@Core/scss/tokens' as *; - -.tutor-assignment { - @include tutor-container(780px); - margin-top: $tutor-spacing-4; - - &-overview { - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-5; - } - - &-info { - @include tutor-card-base(); - @include tutor-card-padding(medium); - @include tutor-card-radius(2xl); - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-5; - - @include tutor-breakpoint-down(sm) { - padding: $tutor-spacing-5; - gap: $tutor-spacing-3; - - .tutor-table-wrapper table { - min-width: min-content; - } - } - - &-table { - td:first-child { - width: 32.25%; - } - - td:last-child { - width: 67.75%; - } - } - } - - &-description { - @include tutor-card-base(); - @include tutor-card-padding(medium); - @include tutor-card-radius(2xl); - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-4; - - @include tutor-breakpoint-down(sm) { - padding: $tutor-spacing-5; - } - } - - &-attachments { - @include tutor-card-base(); - @include tutor-card-padding(medium); - @include tutor-card-radius(2xl); - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-4; - - &-cards { - @include tutor-grid(2, auto); - gap: $tutor-spacing-4; - - .tutor-attachment-card-title { - max-width: 100px; - } - - @include tutor-breakpoint-down(sm) { - @include tutor-grid(1, 1fr); - } - } - - @include tutor-breakpoint-down(sm) { - padding: $tutor-spacing-5; - } - } - - &-actions { - @include tutor-flex(row, stretch, flex-end); - gap: $tutor-spacing-4; - - @include tutor-breakpoint-down(sm) { - justify-content: space-between; - - button, - a { - @include tutor-button-size(large); - flex-basis: 50%; - - &:is(:only-child) { - flex-basis: 100%; - } - } - } - } - - &-edit { - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-6; - - @include tutor-breakpoint-down(sm) { - @include tutor-card-base(); - @include tutor-card-radius(2xl); - padding: $tutor-spacing-5; - gap: $tutor-spacing-5; - } - } - - &-form { - @include tutor-card-base(); - @include tutor-card-padding(medium); - @include tutor-card-radius(2xl); - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-3; - - @include tutor-breakpoint-down(sm) { - @include tutor-reset; - gap: $tutor-spacing-1; - } - } - - &-file-uploader { - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-6; - margin-top: $tutor-spacing-4; - - @include tutor-breakpoint-down(sm) { - margin-top: 10px; // this is outside of design system - gap: $tutor-spacing-3; - } - } - - &-attempts { - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-5; - - &-header { - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-5; - - @include tutor-breakpoint-down(sm) { - @include tutor-card-base(); - @include tutor-card-radius(2xl); - padding: $tutor-spacing-5; - } - } - - &-table { - @include tutor-card-radius(2xl); - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-6; - - .tutor-table { - table-layout: fixed; - - thead { - th { - @include tutor-typography('tiny', 'regular'); - width: 14.3%; - - &:first-of-type { - width: 42.5%; - } - - &:nth-child(4) { - width: 18%; - } - } - } - - tbody { - tr { - height: $tutor-spacing-13; - &:hover { - td { - .attempt-list-badge { - .tutor-badge { - display: none; - } - } - button { - display: block; - } - } - } - } - td { - @include tutor-typography('small', 'regular', 'secondary'); - width: 14.3%; - - &:first-of-type { - color: $tutor-text-brand; - font-weight: $tutor-font-weight-medium; - width: 42.5%; - } - - &:nth-child(4) { - width: 18%; - } - - button { - display: none; - } - } - } - } - - @include tutor-breakpoint-down(sm) { - gap: $tutor-spacing-4; - } - } - - &-list { - @include tutor-card-base(); - @include tutor-card-radius(lg); - - &-item { - @include tutor-flex(column); - gap: $tutor-spacing-4; - padding: $tutor-spacing-5; - border-bottom: 1px solid $tutor-border-idle; - - &:last-child { - border-bottom: none; - } - } - - &-card { - @include tutor-grid(3, 1fr); - padding: $tutor-spacing-5; - gap: $tutor-spacing-2; - background-color: $tutor-surface-base; - border-radius: $tutor-radius-lg; - } - } - - &-details { - .tutor-assignment-attempts-table { - @include tutor-breakpoint-down(sm) { - @include tutor-reset; - } - } - } - } - - &-submission { - @include tutor-card-base(); - @include tutor-card-padding(medium); - @include tutor-card-radius(2xl); - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-4; - - @include tutor-breakpoint-down(sm) { - padding: $tutor-spacing-5; - gap: $tutor-spacing-3; - } - } - - &-feedback { - @include tutor-card-base(); - @include tutor-card-padding(medium); - @include tutor-card-radius(2xl); - @include tutor-flex(column, stretch, flex-start); - gap: $tutor-spacing-4; - border: 1px solid $tutor-border-brand-secondary; - background-color: $tutor-surface-brand-tertiary; - - @include tutor-breakpoint-down(sm) { - padding: $tutor-spacing-5; - gap: $tutor-spacing-3; - } - } -} - -.tutor-assignment-pending-warning { - display: flex; - padding-top: 7px; - padding-bottom: 7px; - padding-left: $tutor-spacing-4; - padding-right: $tutor-spacing-5; - border-radius: $tutor-radius-md; - gap: $tutor-spacing-3; - - @include tutor-breakpoint-up(sm) { - max-width: max-content; - } -} diff --git a/assets/src/scss/frontend/learning-area/components/_index.scss b/assets/src/scss/frontend/learning-area/components/_index.scss index f1a8a90957..860fd8e62a 100644 --- a/assets/src/scss/frontend/learning-area/components/_index.scss +++ b/assets/src/scss/frontend/learning-area/components/_index.scss @@ -1,2 +1 @@ -@forward 'quiz'; -@forward 'assignment'; +@forward 'quiz'; \ No newline at end of file diff --git a/components/FileUploader.php b/components/FileUploader.php index 7e7977ec46..4c3eb3d1d3 100644 --- a/components/FileUploader.php +++ b/components/FileUploader.php @@ -599,8 +599,8 @@ class="tutor-file-uploader-wrapper"