Student Review
{% if course.is_eligible_to_review(membership) %}
diff --git a/community/public/css/style.css b/community/public/css/style.css
index b94b4a39..ebd7da23 100644
--- a/community/public/css/style.css
+++ b/community/public/css/style.css
@@ -259,11 +259,11 @@ input[type=checkbox] {
.common-page-style {
background: #F4F5F6;
+ padding-bottom: 2rem;
}
.common-card-style {
display: flex;
- align-items: flex-start;
background: #FFFFFF;
border-radius: 8px;
position: relative;
@@ -292,6 +292,12 @@ input[type=checkbox] {
padding: 0px 24px 20px;
}
+@media (max-width: 350px) {
+ .course-card-content {
+ padding: 0px 10px 20px;
+ }
+}
+
.course-card-title {
font-weight: 600;
font-size: 18px;
@@ -308,6 +314,7 @@ input[type=checkbox] {
font-size: 14px;
}
}
+
.card-divider {
border: 1px solid #F4F5F6;
margin-bottom: 16px;
@@ -358,7 +365,7 @@ input[type=checkbox] {
@media (max-width: 767px) {
.cards-parent {
- grid-template-columns: repeat(auto-fill, minmax(300px, 336px));
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
-moz-column-gap: 16px;
column-gap: 16px;
row-gap: 16px;
@@ -367,7 +374,7 @@ input[type=checkbox] {
@media (max-width: 375px) {
.cards-parent {
- grid-template-columns: repeat(auto-fill, minmax(100%, 312px));
+ grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
-moz-column-gap: 24px;
column-gap: 24px;
row-gap: 24px;
@@ -375,7 +382,7 @@ input[type=checkbox] {
}
.courses-header {
- padding: 50px 30px 20px;
+ padding: 50px 20px 20px;
color: var(--text-color);
font-weight: 600;
font-size: 22px;
@@ -383,22 +390,10 @@ input[type=checkbox] {
letter-spacing: -0.0175em
}
-.course-top-section {
- float: none;
- margin: 0 auto;
- max-width: 1150px;
- padding-bottom: 2rem;
-}
-
-@media (max-width: 768px) {
- .course-top-section {
- max-width: 720px;
- }
-}
-
-@media (max-width: 600px) {
- .course-top-section {
- max-width: 342px;
+@media (min-width: 576px) {
+ .container {
+ padding-left: 1rem;
+ padding-right: 1rem;
}
}
@@ -496,7 +491,6 @@ div.custom-checkbox>label>input:checked+img {
}
.course-card-wide {
- height: fit-content;
display: flex;
flex-direction: row;
padding: 24px;
@@ -528,6 +522,7 @@ div.custom-checkbox>label>input:checked+img {
margin-right: 32px;
border-radius: 5px;
flex: 1;
+ align-self: center;
}
@media (max-width: 768px) {
@@ -546,23 +541,10 @@ div.custom-checkbox>label>input:checked+img {
}
}
-.course-home-page {
- max-width: 1150px;
- margin: 0 auto;
- padding-bottom: 2rem;
-}
-
-@media (max-width: 768px) {
+@media (max-width: 500px) {
.course-home-page {
- max-width: 688px;
- }
-}
-
-@media (max-width: 600px) {
- .course-home-page {
- width: 100%;
- padding-left: 0px;
- padding-right: 0px;
+ padding-right: 0;
+ padding-left: 0;
}
}
@@ -570,6 +552,7 @@ div.custom-checkbox>label>input:checked+img {
display: flex;
flex-direction: column;
flex: 2;
+ justify-content: space-between;
}
@media (max-width: 768px) {
@@ -672,6 +655,7 @@ div.custom-checkbox>label>input:checked+img {
.course-home-outline {
margin-top: 3rem;
+ flex: 1;
}
.small-title {
@@ -703,7 +687,19 @@ div.custom-checkbox>label>input:checked+img {
@media (max-width: 600px) {
.course-outline-instructor-parent {
flex-direction: column;
- padding: 0px 9px 0px;
+ padding: 0px 24px 0px;
+ }
+}
+
+
+.profile-parent-section {
+ display: flex;
+ justify-content: space-between;
+}
+
+@media (max-width: 600px) {
+ .profile-parent-section {
+ flex-direction: column;
}
}
@@ -735,6 +731,18 @@ div.custom-checkbox>label>input:checked+img {
margin-top: 3rem;
}
+@media (min-width: 1024px) {
+ .course-overview-section {
+ margin-left: 2rem;
+ }
+}
+
+@media (min-width: 600px) {
+ .course-overview-section {
+ margin-left: 1rem;
+ }
+}
+
.lesson-info {
font-size: 16px;
line-height: 250%;
@@ -897,7 +905,7 @@ div.custom-checkbox>label>input:checked+img {
}
.overview-card {
- padding: 8px 24px 8px;
+ padding: 24px 26px 24px;
width: 256px;
flex-direction: column;
}
@@ -910,7 +918,7 @@ div.custom-checkbox>label>input:checked+img {
@media (max-width: 600px) {
.overview-card {
- padding: 8px 9px 8px;
+ padding: 24px 26px 24px;
width: 100%;
}
}
@@ -995,20 +1003,17 @@ div.custom-checkbox>label>input:checked+img {
}
.breadcrumb {
- padding: 1rem 0.5rem 0;
+ padding: 1rem 0 0;
display: flex;
align-items: center;
+ font-size: 12px;
+ line-height: 135%;
+ color: var(--text-color);
}
.course-details-outline {
- width: 352px;
margin-top: 16px;
-}
-
-@media (max-width: 1025px) {
- .course-details-outline {
- width: 100%;
- }
+ flex: 1;
}
.lesson-content-card {
@@ -1019,11 +1024,11 @@ div.custom-checkbox>label>input:checked+img {
.course-content-parent {
display: flex;
justify-content: space-between;
- flex-wrap: wrap-reverse;
}
-@media (max-width: 375px) {
+@media (max-width: 768px) {
.course-content-parent {
+ flex-direction: column-reverse;
justify-content: center;
}
}
@@ -1039,13 +1044,13 @@ div.custom-checkbox>label>input:checked+img {
}
.lesson-pagination-parent {
- width: 736px;
- margin-top: 16px;
+ margin: 1rem 0px 0px 2rem;
+ flex: 3;
}
-@media (max-width: 1025px) {
+@media (max-width: 768px) {
.lesson-pagination-parent {
- width: 100%;
+ margin-left: 0px;
}
}
@@ -1053,28 +1058,6 @@ div.custom-checkbox>label>input:checked+img {
width: 100%;
}
-.course-details-page {
- padding: 0px 0px 80px;
- display: flex;
- flex-direction: column;
- max-width: 1120px;
- margin: 0 auto;
-}
-
-@media (max-width: 1025px) {
- .course-details-page {
- padding: 24px 0px 24px;
- width: 80%;
- }
-}
-
-@media (max-width: 768px) {
- .course-details-page {
- padding: 24px 0px 24px;
- width: 90%;
- }
-}
-
.active-lesson {
background-color: #EBF5FF;
border-radius: 4px;
@@ -1091,16 +1074,14 @@ div.custom-checkbox>label>input:checked+img {
}
.profile-page {
- max-width: 1150px;
- margin: 0 auto;
padding-top: 1rem;
- padding-bottom: 1rem;
}
.profile-banner {
- width: 100%;
height: 248px;
border-radius: 12px 12px 0px 0px;
+ background-size: cover;
+ background-position: center;
}
@media (max-width: 500px) {
@@ -1109,6 +1090,11 @@ div.custom-checkbox>label>input:checked+img {
}
}
+.profile-about-section {
+ flex: 1;
+ margin-top: 3rem;
+}
+
.profile-info {
height: 68px;
background: #ffffff;
@@ -1220,18 +1206,6 @@ div.custom-checkbox>label>input:checked+img {
margin-top: 3rem;
}
-@media (max-width: 500px) {
- .profile-courses {
- padding: 0px 24px 0px;
- }
-}
-
-@media (max-width: 360px) {
- .profile-courses {
- padding: 0px 10px 0px;
- }
-}
-
.progress-text {
font-size: 12px;
line-height: 165%;
@@ -1242,6 +1216,12 @@ div.custom-checkbox>label>input:checked+img {
flex-direction: column;
}
+@media (min-width: 600px) {
+ .course-creator-progress-parent {
+ margin-left: 2rem;
+ }
+}
+
.course-creator-section {
margin-top: 3rem;
}
diff --git a/community/www/batch/about.html b/community/www/batch/about.html
deleted file mode 100644
index 132bf8a0..00000000
--- a/community/www/batch/about.html
+++ /dev/null
@@ -1,40 +0,0 @@
-{% extends "templates/base.html" %}
-{% block title %}About{% endblock %}
-{% block head_include %}
-
-
-
-
-{% endblock %}
-
-{% block content %}
-
- {{ widgets.BatchTabs(course=course, batch=batch) }}
-
- {{ CourseBasicDetail(course)}}
-
-
-
-{% endblock %}
-
-{% macro CourseBasicDetail(course) %}
-
{{course.title}}
-
- {{course.short_introduction}}
-
-{% if course.video_link %}
-
-
-
-{% endif %}
-
About the Course
-
{{frappe.utils.md_to_html(course.description)}}
-{% endmacro %}
diff --git a/community/www/batch/about.py b/community/www/batch/about.py
deleted file mode 100644
index 48be81c9..00000000
--- a/community/www/batch/about.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import frappe
-from . import utils
-
-def get_context(context):
- utils.get_common_context(context)
diff --git a/community/www/batch/home.html b/community/www/batch/home.html
deleted file mode 100644
index e7542071..00000000
--- a/community/www/batch/home.html
+++ /dev/null
@@ -1,61 +0,0 @@
-{% extends "templates/base.html" %}
-{% block title %} Batch {% endblock %}
-
-{% block head_include %}
-
-
-
-{% endblock %}
-
-{% block content %}
-
- {{ widgets.BatchTabs(course=course, membership=membership) }}
-
- {{ widgets.CourseOutline(course=course, batch=batch, show_link=membership, show_progress=True) }}
-
-
- {% if batch %}
-
-
Batch Schedule
- {{ widgets.RenderBatch(course=course, batch=batch) }}
-
-
- {% if batch.description %}
-
-
Batch Details
- {{ frappe.utils.md_to_html(batch.description) }}
-
- {% endif %}
- {% endif %}
- {% if course.is_mentor(frappe.session.user) %}
- {% set invite_link = frappe.utils.get_url() + "/courses/" + course.name + "/join?batch=" + batch.name %}
-
- {% endif %}
-
-
-
-
-{% endblock %}
diff --git a/community/www/batch/home.py b/community/www/batch/home.py
deleted file mode 100644
index 48be81c9..00000000
--- a/community/www/batch/home.py
+++ /dev/null
@@ -1,5 +0,0 @@
-import frappe
-from . import utils
-
-def get_context(context):
- utils.get_common_context(context)
diff --git a/community/www/batch/learn.html b/community/www/batch/learn.html
index 9daaac0a..73f8f844 100644
--- a/community/www/batch/learn.html
+++ b/community/www/batch/learn.html
@@ -21,7 +21,7 @@
{% block content %}
-
+
{{ widgets.BreadCrumb(course=course, lesson=lesson) }}
@@ -47,7 +47,7 @@
{% if membership or lesson.include_in_preview %}
-
{{ lesson.render_html() }}
+
{{ lesson.render_html() }}
{% else %}
This lesson is not available for Preview. Please join the course to access this lesson.
diff --git a/community/www/batch/members.html b/community/www/batch/members.html
deleted file mode 100644
index b1c9712c..00000000
--- a/community/www/batch/members.html
+++ /dev/null
@@ -1,40 +0,0 @@
-{% extends "templates/base.html" %}
-
-{% block title %}Members{% endblock %}
-{% block head_include %}
-
-
-
-{% endblock %}
-
-{% block content %}
-
-
- {{ widgets.BatchTabs(course=course, membership=membership) }}
- {{ MembersList(members)}}
-
-{% endblock %}
-
-
-{% macro MembersList(members) %}
-
- {% for member in members %}
-
- {{ widgets.Avatar(member=member, avatar_class="avatar-medium") }}
-
-
- {% if loop.index != member_count %}
-
- {% endif %}
- {% endfor %}
-
-{% endmacro %}
diff --git a/community/www/batch/members.py b/community/www/batch/members.py
deleted file mode 100644
index 937af7ea..00000000
--- a/community/www/batch/members.py
+++ /dev/null
@@ -1,7 +0,0 @@
-import frappe
-from . import utils
-
-def get_context(context):
- utils.get_common_context(context)
- if not context.membership:
- utils.redirect_to_lesson(context.course)
diff --git a/community/www/batch/progress.html b/community/www/batch/progress.html
deleted file mode 100644
index 3fa41bfe..00000000
--- a/community/www/batch/progress.html
+++ /dev/null
@@ -1,51 +0,0 @@
-{% extends "templates/base.html" %}
-{% from "www/macros/livecode.html" import LiveCodeEditorJS, LiveCodeEditor with context %}
-{% block title %}{{ course.title }} - Batch Dashboard{% endblock %}
-
-{% block head_include %}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-{% endblock %}
-
-
-{% block content %}
-
-
- {{ widgets.BatchTabs(course=course, membership=membership) }}
-
-
Batch Progress
- {% for exercise in report.exercises %}
-
-
Exercise {{exercise.index_label}}: {{exercise.title}}
- {% for s in report.get_submissions_of_exercise(exercise.name) %}
-
-
-
- {{ LiveCodeEditor(name=s.name, code=s.solution, reset_code=s.solution) }}
-
-
- {% endfor %}
-
- {% endfor %}
-
-
-{% endblock %}
-
-
-{%- block script %}
-{{ super() }}
-{{ LiveCodeEditorJS() }}
-{% endblock %}
diff --git a/community/www/batch/progress.py b/community/www/batch/progress.py
deleted file mode 100644
index 446714e9..00000000
--- a/community/www/batch/progress.py
+++ /dev/null
@@ -1,62 +0,0 @@
-import frappe
-from community.lms.models import Course
-from collections import defaultdict
-from . import utils
-
-def get_context(context):
- utils.get_common_context(context)
-
- exercise_name = frappe.form_dict.get("exercise")
- if exercise_name:
- exercise = frappe.get_doc("Exercise", exercise_name)
- else:
- exercise = None
-
- context.exercise = exercise
- context.report = BatchReport(context.course, context.batch)
-
-class BatchReport:
- def __init__(self, course, batch):
- self.submissions = get_submissions(course, batch)
- self.exercises = self.get_exercises(course.name)
- self.submissions_by_exercise = defaultdict(list)
- for s in self.submissions:
- self.submissions_by_exercise[s.exercise].append(s)
-
- def get_exercises(self, course_name):
- return frappe.get_all("Exercise", {"course": course_name, "lesson": ["!=", ""]}, ["name", "title", "index_label"], order_by="index_label")
-
- def get_submissions_of_exercise(self, exercise_name):
- return self.submissions_by_exercise[exercise_name]
-
-def get_submissions(course, batch):
- students = course.get_students(batch.name)
- if not len(students):
- return []
- students_map = {s.email: s for s in students}
- names, values = nparams("s", students_map.keys())
- sql = """
- select owner, exercise, name, solution, creation, image
- from (
- select owner, exercise, name, solution, creation, image,
- row_number() over (partition by owner, exercise order by creation desc) as ix
- from `tabExercise Submission`) as t
- where t.ix=1 and owner IN {}
- """.format(names)
-
- data = frappe.db.sql(sql, values=values, as_dict=True)
- for row in data:
- row['owner'] = students_map[row['owner']]
- return data
-
-def nparams(name, values):
- """Creates n paramters from a list of values for a db query.
-
- >>> nparams("name", ["a", "b])
- ("(%(name_1)s, %(name_2)s)", {"name_1": "a", "name_2": "b"})
- """
- keys = [f"{name}_{i}" for i, _ in enumerate(values, start=1)]
- param_names = [f"%({k})s" for k in keys]
- param_values = dict(zip(keys, values))
- joined_names = "(" + ", ".join(param_names) + ")"
- return joined_names, param_values
diff --git a/community/www/batch/schedule.html b/community/www/batch/schedule.html
deleted file mode 100644
index 36e87c48..00000000
--- a/community/www/batch/schedule.html
+++ /dev/null
@@ -1,17 +0,0 @@
-{% extends "templates/base.html" %}
-{% block title %}Schedule{% endblock %}
-
-{% block head_include %}
-
-
-
-{% endblock %}
-
-{% block content %}
-
- {{ widgets.BatchTabs(course=course, batch=batch) }}
-
- Schedule
-
-
-{% endblock %}
diff --git a/community/www/batch/schedule.py b/community/www/batch/schedule.py
deleted file mode 100644
index 65d68fc3..00000000
--- a/community/www/batch/schedule.py
+++ /dev/null
@@ -1,20 +0,0 @@
-import frappe
-from community.lms.models import Course
-
-def get_context(context):
- context.no_cache = 1
- course_name = frappe.form_dict["course"]
- batch_name = frappe.form_dict["batch"]
-
- course = Course.find(course_name)
- if not course:
- context.template = "www/404.html"
- return
-
- batch = course.get_batch(batch_name)
- if not batch:
- frappe.local.flags.redirect_location = "/courses/" + course_name
- raise frappe.Redirect
-
- context.course = course
- context.batch = batch
diff --git a/community/www/courses/course.html b/community/www/courses/course.html
index 7b7b84f7..78391792 100644
--- a/community/www/courses/course.html
+++ b/community/www/courses/course.html
@@ -9,7 +9,7 @@
{% endblock %}
{% block content %}
-
+
{{ widgets.BreadCrumb(course=course) }}
{{ CourseCardWide(course) }}
{{ CourseOutlineAndCreator(course) }}
@@ -32,11 +32,13 @@
-
- {{ course.title }}
-
-
- {{ course.short_introduction }}
+
+
+ {{ course.title }}
+
+
+ {{ course.short_introduction }}
+