diff --git a/assets/src/scss/frontend/kids/_learning-area.scss b/assets/src/scss/frontend/kids/_learning-area.scss index 395745f437..cc00a7462d 100644 --- a/assets/src/scss/frontend/kids/_learning-area.scss +++ b/assets/src/scss/frontend/kids/_learning-area.scss @@ -73,6 +73,10 @@ border-bottom-right-radius: $tutor-radius-md; } + .tutor-lesson-content .tutor-lesson-content-tab { + margin-bottom: $tutor-spacing-2; + } + .tutor-quiz-submission[data-question-layout-view='single_question'], .tutor-quiz-submission[data-question-layout-view='question_pagination'] { .tutor-quiz-question { @@ -81,6 +85,10 @@ } } + .tutor-learning-area-resources .tutor-resources-wrapper { + gap: $tutor-spacing-5; + } + .tutor-quiz-summary-page .tutor-quiz-review-dnd-rows { gap: $tutor-spacing-4; } @@ -238,8 +246,7 @@ .tutor-meeting, .tutor-quiz-intro, .tutor-lesson-content .tutor-lesson-content-tab, - .tutor-quiz-summary .tutor-quiz-result, - .tutor-learning-area-resources .tutor-resources-wrapper { + .tutor-quiz-summary .tutor-quiz-result { box-shadow: none; } diff --git a/assets/src/scss/frontend/learning-area/pages/_course-info.scss b/assets/src/scss/frontend/learning-area/pages/_course-info.scss index eaa327e6c3..50a75c76ee 100644 --- a/assets/src/scss/frontend/learning-area/pages/_course-info.scss +++ b/assets/src/scss/frontend/learning-area/pages/_course-info.scss @@ -34,78 +34,29 @@ margin-top: $tutor-spacing-8; } - .tutor-course-accordion { + .tutor-course-info-cards { @include tutor-flex(column); - gap: $tutor-spacing-2; - margin-top: $tutor-spacing-9; - - &-item { - background-color: $tutor-surface-l1; - outline: 1px solid $tutor-border-idle; - border-radius: $tutor-radius-lg; - padding: $tutor-spacing-5 $tutor-spacing-6; - - &:focus-within { - @include tutor-focus-ring(); - } - - .tutor-course-accordion-header { - @include tutor-flex(row, center, space-between); - cursor: pointer; - outline: none; - - &-title { - @include tutor-typography(medium, medium); - - @include tutor-breakpoint-down(sm) { - font-size: $tutor-font-size-small; - line-height: $tutor-font-size-small; - } - } - - &-icon { - @include tutor-flex-center(); - - svg { - @include tutor-transition(transform); - - @include tutor-breakpoint-down(sm) { - height: 20px; - width: 20px; - } - } + gap: $tutor-spacing-4; + } - &.is-expanded svg { - transform: rotate(180deg); - } - } - } + .tutor-course-info-list { + @include tutor-grid(2, $tutor-spacing-6); - .tutor-course-accordion-body { - @include tutor-typography(p3); - margin-top: $tutor-spacing-5; - } + @include tutor-breakpoint-down(sm) { + grid-template-columns: 1fr; } - .tutor-course-accordion-list { - @include tutor-grid(2, $tutor-spacing-6); - - @include tutor-breakpoint-down(sm) { - grid-template-columns: 1fr; - } - - &-item { - @include tutor-flex(row); - gap: $tutor-spacing-4; + &-item { + @include tutor-flex(row); + gap: $tutor-spacing-4; - svg { - flex-shrink: 0; - } + svg { + flex-shrink: 0; } + } - &-content { - @include tutor-typography(p3); - } + &-content { + @include tutor-typography(p3); } } diff --git a/assets/src/scss/frontend/learning-area/pages/_index.scss b/assets/src/scss/frontend/learning-area/pages/_index.scss index 29eec60fce..95c73e2e9e 100644 --- a/assets/src/scss/frontend/learning-area/pages/_index.scss +++ b/assets/src/scss/frontend/learning-area/pages/_index.scss @@ -4,5 +4,4 @@ @forward './course-info'; @forward './qna'; @forward './quiz-intro'; -@forward './resources'; @forward './announcements'; diff --git a/assets/src/scss/frontend/learning-area/pages/_resources.scss b/assets/src/scss/frontend/learning-area/pages/_resources.scss deleted file mode 100644 index 31adc095ee..0000000000 --- a/assets/src/scss/frontend/learning-area/pages/_resources.scss +++ /dev/null @@ -1,64 +0,0 @@ -// Learning Area Resources Styles -@use '@Core/scss/mixins' as *; -@use '@Core/scss/tokens' as *; - -.tutor-learning-area-resources { - padding-block: $tutor-spacing-8; - - .tutor-resources-list { - @include tutor-flex(column); - } - - @include tutor-breakpoint-up(sm) { - .tutor-resources-wrapper { - background-color: $tutor-surface-l1; - border: 1px solid $tutor-border-idle; - border-radius: $tutor-radius-2xl; - } - - .tutor-tabs-nav { - padding: $tutor-spacing-5 $tutor-spacing-6; - } - - .tutor-tabs-content { - border-top: 1px solid $tutor-border-idle; - padding: $tutor-spacing-6; - } - - .tutor-resources-list { - gap: $tutor-spacing-4; - } - } - - @include tutor-breakpoint-down(sm) { - margin-top: $tutor-spacing-2; - - .tutor-tabs-nav { - background-color: $tutor-surface-l1; - border: 1px solid $tutor-border-idle; - border-radius: $tutor-radius-2xl; - padding: $tutor-spacing-2; - margin-bottom: $tutor-spacing-4; - } - - .tutor-tabs-tab { - flex: 1; - } - - .tutor-tabs-content { - background-color: $tutor-surface-l1; - border: 1px solid $tutor-border-idle; - border-radius: $tutor-radius-2xl; - overflow: hidden; - } - - .tutor-attachment-card { - border: none; - border-radius: $tutor-radius-none; - - &:not(:last-of-type) { - border-bottom: 1px solid $tutor-border-idle; - } - } - } -} diff --git a/classes/User.php b/classes/User.php index e4dbab73df..6bf7d2dd63 100644 --- a/classes/User.php +++ b/classes/User.php @@ -767,7 +767,7 @@ public static function is_student_view(): bool { * * @return boolean */ - public static function can_switch_mode( int $user_id = 0 ) : bool { + public static function can_switch_mode( int $user_id = 0 ): bool { $user_id = tutor_utils()->get_user_id( $user_id ); return self::is_instructor( $user_id ) || self::is_admin( $user_id ); diff --git a/templates/learning-area/subpages/course-info.php b/templates/learning-area/subpages/course-info.php index ea57a5a83b..dceaa3c633 100644 --- a/templates/learning-area/subpages/course-info.php +++ b/templates/learning-area/subpages/course-info.php @@ -221,68 +221,40 @@ --> - -
+
+ -
-
-
- -
-
- name( Icon::CHEVRON_DOWN_2 )->size( 24 )->render(); ?> -
+
+
+
-
+
-
-
-
- -
-
- name( Icon::CHEVRON_DOWN_2 )->size( 24 )->render(); ?> -
+
+
+
-
-
- -
- name( Icon::CHECK_2 )->render(); ?> -
- -
+
+ +
+ name( Icon::CHECK_2 )->render(); ?> +
+
- -
+
+
-
- + +
-
+