discussions in class
This commit is contained in:
@@ -43,7 +43,7 @@ body {
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.frappe-control .ql-editor:not(.read-mode) {
|
||||
.field-group .frappe-control .ql-editor:not(.read-mode) {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
@@ -321,11 +321,12 @@ input[type=checkbox] {
|
||||
}
|
||||
|
||||
.common-card-style {
|
||||
display: flex;
|
||||
background: #FFFFFF;
|
||||
border-radius: var(--border-radius-md);
|
||||
position: relative;
|
||||
border: 1px solid var(--gray-300)
|
||||
display: flex;
|
||||
background: #FFFFFF;
|
||||
border-radius: var(--border-radius-md);
|
||||
position: relative;
|
||||
border: 1px solid var(--gray-300);
|
||||
box-shadow: var(--card-shadow);
|
||||
}
|
||||
|
||||
.course-card {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import "./profile.js";
|
||||
import "./common_functions.js";
|
||||
import "../../../../frappe/frappe/public/js/frappe/ui/chart.js";
|
||||
import "../../../../frappe/frappe/public/js/frappe/ui/keyboard.js";
|
||||
|
||||
@@ -118,7 +118,9 @@
|
||||
{% endif %}
|
||||
</span>
|
||||
</a>
|
||||
<div class="ml-5 course-meta"> {{ frappe.utils.format_date(lesson.creation, "medium") }} </div>
|
||||
<div class="ml-5 course-meta">
|
||||
{{ frappe.utils.format_date(lesson.creation, "medium") }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Lesson Content -->
|
||||
@@ -240,9 +242,9 @@
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
<!-- Scripts -->
|
||||
{%- block script %}
|
||||
{{ super() }}
|
||||
{{ include_script('controls.bundle.js') }}
|
||||
<script type="text/javascript">
|
||||
var page_context = {{ page_context | tojson }};
|
||||
{% include "lms/templates/quiz/quiz.js" %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "lms/templates/lms_base.html" %}
|
||||
{% block title %}
|
||||
{{ _(class_info.title) }}
|
||||
{{ _(class_info.title) }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
<!-- BreadCrumb -->
|
||||
{% macro BreadCrumb(class_info) %}
|
||||
<div class="breadcrumb">
|
||||
<a class="dark-links" href="/classes">{{ _("All Classes") }}</a>
|
||||
<img class="ml-1 mr-1" src="/assets/lms/icons/chevron-right.svg">
|
||||
<span class="breadcrumb-destination">{{ class_info.title }}</span>
|
||||
<a class="dark-links" href="/classes">{{ _("All Classes") }}</a>
|
||||
<img class="ml-1 mr-1" src="/assets/lms/icons/chevron-right.svg">
|
||||
<span class="breadcrumb-destination">{{ class_info.title }}</span>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -93,7 +93,13 @@
|
||||
|
||||
<ul class="nav lms-nav" id="classes-tab">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-toggle="tab" href="#courses">
|
||||
<a class="nav-link active" data-toggle="tab" href="#dashboard">
|
||||
{{ _("Dashboard") }}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-toggle="tab" href="#courses">
|
||||
{{ _("Courses") }}
|
||||
<span class="course-list-count">
|
||||
{{ class_courses | length }}
|
||||
@@ -137,7 +143,11 @@
|
||||
<div class="border-bottom mb-4"></div>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="courses" role="tabpanel" aria-labelledby="courses">
|
||||
<div class="tab-pane active" id="dashboard" role="tabpanel" aria-labelledby="dashboard">
|
||||
{{ Dashboard(class_info) }}
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="courses" role="tabpanel" aria-labelledby="courses">
|
||||
{{ CoursesSection(class_info, class_courses, published_courses) }}
|
||||
</div>
|
||||
|
||||
@@ -161,6 +171,20 @@
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro Dashboard(class_info) %}
|
||||
<article class="class-discussion">
|
||||
{% set condition = is_moderator or is_student %}
|
||||
{% set doctype, docname = _("LMS Class"), class_info.name %}
|
||||
{% set single_thread = True %}
|
||||
{% set title = "Announcements" %}
|
||||
{% set cta_title = "Post" %}
|
||||
{% set button_name = _("Start Learning") %}
|
||||
{% set redirect_to = "/classes/" + class_info.name %}
|
||||
{% set empty_state_title = _("Have a doubt?") %}
|
||||
{% set empty_state_subtitle = _("Post it here, our mentors will help you out.") %}
|
||||
{% include "frappe/templates/discussions/discussions_section.html" %}
|
||||
</article>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro CoursesSection(class_info, class_courses, published_courses) %}
|
||||
<article>
|
||||
|
||||
@@ -34,6 +34,9 @@ def get_context(context):
|
||||
as_dict=True,
|
||||
)
|
||||
|
||||
context.reference_doctype = "LMS Class"
|
||||
context.reference_name = class_name
|
||||
|
||||
context.published_courses = frappe.get_all(
|
||||
"LMS Course", {"published": 1}, ["name", "title"]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user