Compare commits
27 Commits
disable-ex
...
only-show-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86596d0cfe | ||
|
|
9323cfd748 | ||
|
|
d125b02cec | ||
|
|
276d64a66a | ||
|
|
79eb381a41 | ||
|
|
44f9c0dfd3 | ||
|
|
0ca4cd724e | ||
|
|
8a3e31f021 | ||
|
|
9be8a1af0b | ||
|
|
b9cac20613 | ||
|
|
e6d5e6d37b | ||
|
|
0abfcac7da | ||
|
|
b70e8b9acc | ||
|
|
3b1e1aa3c3 | ||
|
|
8f74c74d50 | ||
|
|
d2f435016c | ||
|
|
389b35802b | ||
|
|
a9192a74f9 | ||
|
|
1366c7cf75 | ||
|
|
eaa9e8e3ea | ||
|
|
5ecae0df61 | ||
|
|
4891be1d8c | ||
|
|
ec852fc255 | ||
|
|
47f2d3cb7b | ||
|
|
37820c1e19 | ||
|
|
230fab3bb2 | ||
|
|
d292d2d093 |
@@ -104,5 +104,270 @@
|
||||
"translatable": 1,
|
||||
"unique": 0,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"collapsible_depends_on": null,
|
||||
"columns": 0,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "Custom Field",
|
||||
"dt": "User",
|
||||
"fetch_from": null,
|
||||
"fetch_if_empty": 0,
|
||||
"fieldname": "medium",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"hide_border": 0,
|
||||
"hide_days": 0,
|
||||
"hide_seconds": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_preview": 0,
|
||||
"in_standard_filter": 0,
|
||||
"insert_after": "github",
|
||||
"label": "Medium ID",
|
||||
"length": 0,
|
||||
"mandatory_depends_on": null,
|
||||
"modified": "2021-06-30 14:46:55.834145",
|
||||
"name": "User-medium",
|
||||
"no_copy": 0,
|
||||
"non_negative": 0,
|
||||
"options": null,
|
||||
"parent": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": null,
|
||||
"read_only": 0,
|
||||
"read_only_depends_on": null,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"translatable": 1,
|
||||
"unique": 0,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"collapsible_depends_on": null,
|
||||
"columns": 0,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "Custom Field",
|
||||
"dt": "User",
|
||||
"fetch_from": null,
|
||||
"fetch_if_empty": 0,
|
||||
"fieldname": "city",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"hide_border": 0,
|
||||
"hide_days": 0,
|
||||
"hide_seconds": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_preview": 0,
|
||||
"in_standard_filter": 0,
|
||||
"insert_after": "mute_sounds",
|
||||
"label": "City",
|
||||
"length": 0,
|
||||
"mandatory_depends_on": null,
|
||||
"modified": "2021-06-30 14:46:55.834145",
|
||||
"name": "User-city",
|
||||
"no_copy": 0,
|
||||
"non_negative": 0,
|
||||
"options": null,
|
||||
"parent": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": null,
|
||||
"read_only": 0,
|
||||
"read_only_depends_on": null,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"translatable": 1,
|
||||
"unique": 0,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"collapsible_depends_on": null,
|
||||
"columns": 0,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "Custom Field",
|
||||
"dt": "User",
|
||||
"fetch_from": null,
|
||||
"fetch_if_empty": 0,
|
||||
"fieldname": "college",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"hide_border": 0,
|
||||
"hide_days": 0,
|
||||
"hide_seconds": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_preview": 0,
|
||||
"in_standard_filter": 0,
|
||||
"insert_after": "city",
|
||||
"label": "College Name",
|
||||
"length": 0,
|
||||
"mandatory_depends_on": null,
|
||||
"modified": "2021-06-30 14:46:55.834145",
|
||||
"name": "User-college",
|
||||
"no_copy": 0,
|
||||
"non_negative": 0,
|
||||
"options": null,
|
||||
"parent": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": null,
|
||||
"read_only": 0,
|
||||
"read_only_depends_on": null,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"translatable": 1,
|
||||
"unique": 0,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"collapsible_depends_on": null,
|
||||
"columns": 0,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "Custom Field",
|
||||
"dt": "User",
|
||||
"fetch_from": null,
|
||||
"fetch_if_empty": 0,
|
||||
"fieldname": "branch",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"hide_border": 0,
|
||||
"hide_days": 0,
|
||||
"hide_seconds": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_preview": 0,
|
||||
"in_standard_filter": 0,
|
||||
"insert_after": "college",
|
||||
"label": "Branch",
|
||||
"length": 0,
|
||||
"mandatory_depends_on": null,
|
||||
"modified": "2021-06-30 14:46:55.834145",
|
||||
"name": "User-branch",
|
||||
"no_copy": 0,
|
||||
"non_negative": 0,
|
||||
"options": null,
|
||||
"parent": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": null,
|
||||
"read_only": 0,
|
||||
"read_only_depends_on": null,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"translatable": 1,
|
||||
"unique": 0,
|
||||
"width": null
|
||||
},
|
||||
{
|
||||
"allow_in_quick_entry": 0,
|
||||
"allow_on_submit": 0,
|
||||
"bold": 0,
|
||||
"collapsible": 0,
|
||||
"collapsible_depends_on": null,
|
||||
"columns": 0,
|
||||
"default": null,
|
||||
"depends_on": null,
|
||||
"description": null,
|
||||
"docstatus": 0,
|
||||
"doctype": "Custom Field",
|
||||
"dt": "User",
|
||||
"fetch_from": null,
|
||||
"fetch_if_empty": 0,
|
||||
"fieldname": "profession",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"hide_border": 0,
|
||||
"hide_days": 0,
|
||||
"hide_seconds": 0,
|
||||
"ignore_user_permissions": 0,
|
||||
"ignore_xss_filter": 0,
|
||||
"in_global_search": 0,
|
||||
"in_list_view": 0,
|
||||
"in_preview": 0,
|
||||
"in_standard_filter": 0,
|
||||
"insert_after": "medium",
|
||||
"label": "Profession",
|
||||
"length": 0,
|
||||
"mandatory_depends_on": null,
|
||||
"modified": "2021-06-30 14:46:55.834145",
|
||||
"name": "User-profession",
|
||||
"no_copy": 0,
|
||||
"non_negative": 0,
|
||||
"options": null,
|
||||
"parent": null,
|
||||
"parentfield": null,
|
||||
"parenttype": null,
|
||||
"permlevel": 0,
|
||||
"precision": "",
|
||||
"print_hide": 0,
|
||||
"print_hide_if_no_value": 0,
|
||||
"print_width": null,
|
||||
"read_only": 0,
|
||||
"read_only_depends_on": null,
|
||||
"report_hide": 0,
|
||||
"reqd": 0,
|
||||
"search_index": 0,
|
||||
"translatable": 1,
|
||||
"unique": 0,
|
||||
"width": null
|
||||
}
|
||||
]
|
||||
|
||||
@@ -167,7 +167,8 @@ whitelist = [
|
||||
"/add-a-new-batch",
|
||||
"/new-sign-up",
|
||||
"/message",
|
||||
"/about"
|
||||
"/about",
|
||||
"/edit-profile"
|
||||
]
|
||||
whitelist_rules = [{"from_route": p, "to_route": p[1:]} for p in whitelist]
|
||||
|
||||
@@ -178,6 +179,10 @@ profile_rules = [
|
||||
|
||||
website_route_rules = primary_rules + whitelist_rules + profile_rules
|
||||
|
||||
website_redirects = [
|
||||
{"source": "/update-profile", "target": "/edit-profile"},
|
||||
]
|
||||
|
||||
update_website_context = 'community.widgets.update_website_context'
|
||||
|
||||
## Specify the additional tabs to be included in the user profile page.
|
||||
|
||||
@@ -30,10 +30,13 @@ class InviteRequest(Document):
|
||||
return user
|
||||
|
||||
def send_email(self):
|
||||
subject = _("Your request has been approved.")
|
||||
site_name = "Mon.School"
|
||||
subject = _("Welcome to {0}!").format(site_name)
|
||||
|
||||
args = {
|
||||
"full_name": self.full_name,
|
||||
"signup_form_link": "/new-sign-up?invite_code={0}".format(self.name),
|
||||
"site_name": site_name,
|
||||
"site_url": frappe.utils.get_url()
|
||||
}
|
||||
frappe.sendmail(
|
||||
@@ -42,7 +45,8 @@ class InviteRequest(Document):
|
||||
subject=subject,
|
||||
header=[subject, "green"],
|
||||
template = "lms_invite_request_approved",
|
||||
args=args)
|
||||
args=args,
|
||||
now=True)
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
def create_invite_request(invite_email):
|
||||
|
||||
@@ -133,6 +133,8 @@ class LMSCourse(Document):
|
||||
"status": "Complete"
|
||||
})
|
||||
precision = cint(frappe.db.get_default("float_precision")) or 3
|
||||
if not lesson_count:
|
||||
return 0
|
||||
return flt(((completed_lessons/lesson_count) * 100), precision)
|
||||
|
||||
def get_batch(self, batch_name):
|
||||
|
||||
@@ -93,11 +93,11 @@ class MacroInlineProcessor(InlineProcessor):
|
||||
macro = m.group(1)
|
||||
arg = m.group(2)
|
||||
html = render_macro(macro, arg)
|
||||
html = sanitize_html(str(html))
|
||||
html = sanitize_html(str(html), macro)
|
||||
e = etree.fromstring(html)
|
||||
return e, m.start(0), m.end(0)
|
||||
|
||||
def sanitize_html(html):
|
||||
def sanitize_html(html, macro):
|
||||
"""Sanotize the html using BeautifulSoup.
|
||||
|
||||
The markdown processor request the correct markup and crashes on
|
||||
@@ -106,4 +106,7 @@ def sanitize_html(html):
|
||||
"""
|
||||
soup = BeautifulSoup(html, features="lxml")
|
||||
nodes = soup.body.children
|
||||
return "<div>" + "\n".join(str(node) for node in nodes) + "</div>"
|
||||
classname = ""
|
||||
if macro == "YouTubeVideo":
|
||||
classname = "lesson-video"
|
||||
return "<div class='" + classname + "'>" + "\n".join(str(node) for node in nodes) + "</div>"
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
frappe.ready(function() {
|
||||
// bind events here
|
||||
})
|
||||
frappe.ready(function () {
|
||||
frappe.web_form.after_load = () => {
|
||||
if (!frappe.utils.get_url_arg("name")) {
|
||||
window.location.href = `/edit-profile?name=${frappe.session.user}`;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"breadcrumbs": "",
|
||||
"button_label": "Save",
|
||||
"creation": "2021-06-30 13:48:13.682851",
|
||||
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
|
||||
"doc_type": "User",
|
||||
"docstatus": 0,
|
||||
"doctype": "Web Form",
|
||||
@@ -19,14 +20,14 @@
|
||||
"is_standard": 1,
|
||||
"login_required": 1,
|
||||
"max_attachment_size": 0,
|
||||
"modified": "2021-06-30 15:53:20.967466",
|
||||
"modified": "2021-07-14 17:15:15.424855",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "profile",
|
||||
"owner": "Administrator",
|
||||
"payment_button_label": "Buy Now",
|
||||
"published": 1,
|
||||
"route": "profile",
|
||||
"route": "edit-profile",
|
||||
"route_to_success_link": 0,
|
||||
"show_attachments": 0,
|
||||
"show_in_grid": 0,
|
||||
@@ -84,18 +85,6 @@
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "username",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "Username",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "mobile_no",
|
||||
@@ -120,6 +109,91 @@
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "linkedin",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "LinkedIn ID",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "github",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "Github ID",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "medium",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "Medium ID",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "city",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "City",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "college",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "College Name",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"depends_on": "college",
|
||||
"fieldname": "branch",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "Branch",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
},
|
||||
{
|
||||
"allow_read_on_all_link_options": 0,
|
||||
"fieldname": "profession",
|
||||
"fieldtype": "Data",
|
||||
"hidden": 0,
|
||||
"label": "Profession",
|
||||
"max_length": 0,
|
||||
"max_value": 0,
|
||||
"read_only": 0,
|
||||
"reqd": 0,
|
||||
"show_in_filter": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="course-instructor breadcrumb">
|
||||
<div class="breadcrumb">
|
||||
<a class="dark-links" href="/courses">All Courses</a>
|
||||
<img class="ml-1 mr-1" src="/assets/community/icons/chevron-right.svg">
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{ lesson.title }}
|
||||
|
||||
{% if membership %}
|
||||
<img class="{{ course.get_progress(lesson.name) != 'Complete' and 'hide' }}"
|
||||
<img class="lesson-progress-tick {{ course.get_progress(lesson.name) != 'Complete' and 'hide' }}"
|
||||
src="/assets/community/icons/check.svg">
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -29,12 +29,21 @@
|
||||
<span class="course-instructor">
|
||||
{{ course.get_instructor().full_name }}
|
||||
</span>
|
||||
{% if course.get_students() | length %}
|
||||
<span class="course-student-count">
|
||||
<img class="icon-background mr-1" src="/assets/community/icons/user.svg" />
|
||||
{{ course.get_students() | length }}
|
||||
{% if course.get_students() | length %}
|
||||
<span class="mr-4">
|
||||
<img class="icon-background" src="/assets/community/icons/user.svg" />
|
||||
{{ course.get_students() | length }}
|
||||
</span>
|
||||
{% endif %}
|
||||
{% set avg_rating = course.get_average_rating() %}
|
||||
{% if avg_rating %}
|
||||
<span>
|
||||
<img class="icon-background" src="/assets/community/icons/rating.svg" />
|
||||
{{ avg_rating }}
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% set membership = course.get_membership(frappe.session.user) %}
|
||||
|
||||
@@ -61,3 +70,13 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
frappe.ready(() => {
|
||||
$(".course-card-title").each((i, element) => {
|
||||
var title = $(element).text();
|
||||
var length = $(window).width() <= 375 ? 60 : 65;
|
||||
var suffix = title.length > length ? "..." : "";
|
||||
$(element).text(title.substring(0, length) + suffix);
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="common-card-style member-card {{dimension_class}} ">
|
||||
{% set avatar_class = "avatar-large" if dimension_class == "member-card-medium" else "avatar-xl"%}
|
||||
{% set avatar_class = "avatar-large" if not dimension_class else "avatar-large"%}
|
||||
{{ widgets.Avatar(member=member, avatar_class=avatar_class) }}
|
||||
<div class="small-title member-card-title">
|
||||
{{ member.full_name }}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
{% if course.get_reviews() | length %}
|
||||
<div class="reviews-parent">
|
||||
<div class="reviews-heading">
|
||||
<div class="course-home-headings">Review</div>
|
||||
<div class="course-home-headings">Student Review</div>
|
||||
{% if course.is_eligible_to_review(membership) %}
|
||||
<a class="review-link" href="">
|
||||
Provide your Feedback
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="mentors-section">
|
||||
<div class="reviews-section">
|
||||
{% for review in course.get_reviews() %}
|
||||
<div class="review-card">
|
||||
<div class="common-card-style review-content small-title"> {{ review.review }} </div>
|
||||
@@ -77,7 +77,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="button wide-button submit-review is-primary" data-course="{{ course.name | urlencode}}" id="submit-review">Submit</div>
|
||||
<div class="button submit-review is-primary" data-course="{{ course.name | urlencode}}" id="submit-review">Submit</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -10,7 +10,8 @@ class CustomUser(User):
|
||||
"""
|
||||
return frappe.get_all(
|
||||
'LMS Course', {
|
||||
'owner': self.name
|
||||
'owner': self.name,
|
||||
'is_published': True
|
||||
})
|
||||
|
||||
def get_palette(self):
|
||||
@@ -59,3 +60,19 @@ class CustomUser(User):
|
||||
filters["member_type"] = member_type
|
||||
|
||||
return frappe.get_all("LMS Batch Membership", filters, ["name", "course"])
|
||||
|
||||
def get_mentored_courses(self):
|
||||
""" Returns all courses mentored by this user """
|
||||
mentored_courses = []
|
||||
mapping = frappe.get_all("LMS Course Mentor Mapping",
|
||||
{
|
||||
"mentor": self.name,
|
||||
},
|
||||
["name", "course"]
|
||||
)
|
||||
|
||||
for map in mapping:
|
||||
if frappe.db.get_value("LMS Course", map.course, "is_published"):
|
||||
mentored_courses.append(map)
|
||||
|
||||
return mentored_courses
|
||||
|
||||
@@ -98,7 +98,7 @@ def exercise_renderer(argument):
|
||||
|
||||
def youtube_video_renderer(video_id):
|
||||
return f"""
|
||||
<iframe width="560" height="315"
|
||||
<iframe width="100%" height="315"
|
||||
src="https://www.youtube.com/embed/{video_id}"
|
||||
title="YouTube video player"
|
||||
frameborder="0"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
@import "./style.css";
|
||||
@import "./vars.css";
|
||||
@import "./style.less";
|
||||
|
||||
@@ -226,24 +226,12 @@ input[type=checkbox] {
|
||||
|
||||
.course-image {
|
||||
height: 168px;
|
||||
width: 352px;
|
||||
width: 100%;
|
||||
border-top-left-radius: 8px;
|
||||
border-top-right-radius: 8px;
|
||||
background-size: 352px 168px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-image {
|
||||
width: 336px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.course-image {
|
||||
width: 312px;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.course-tags {
|
||||
@@ -271,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;
|
||||
@@ -285,23 +273,7 @@ input[type=checkbox] {
|
||||
|
||||
.course-card {
|
||||
flex-direction: column;
|
||||
width: 352px;
|
||||
height: 380px;
|
||||
margin: 0px 20px 32px 0px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-card {
|
||||
margin: 0px 8px 32px 0px;
|
||||
width: 336px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.course-card {
|
||||
margin: 0px 0px 32px;
|
||||
width: 312px;
|
||||
}
|
||||
}
|
||||
|
||||
.muted-text {
|
||||
@@ -320,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;
|
||||
@@ -331,6 +309,12 @@ input[type=checkbox] {
|
||||
height: 45px;
|
||||
}
|
||||
|
||||
@media (max-width: 360px) {
|
||||
.course-card-title {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-divider {
|
||||
border: 1px solid #F4F5F6;
|
||||
margin-bottom: 16px;
|
||||
@@ -371,18 +355,34 @@ input[type=checkbox] {
|
||||
}
|
||||
|
||||
.cards-parent {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
-moz-column-gap: 32px;
|
||||
column-gap: 32px;
|
||||
row-gap: 32px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.cards-parent {
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
-moz-column-gap: 16px;
|
||||
column-gap: 16px;
|
||||
row-gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.cards-parent {
|
||||
justify-content: center;
|
||||
grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
|
||||
-moz-column-gap: 24px;
|
||||
column-gap: 24px;
|
||||
row-gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.courses-header {
|
||||
padding: 50px 30px 20px;
|
||||
padding: 50px 20px 20px;
|
||||
color: var(--text-color);
|
||||
font-weight: 600;
|
||||
font-size: 22px;
|
||||
@@ -390,19 +390,10 @@ input[type=checkbox] {
|
||||
letter-spacing: -0.0175em
|
||||
}
|
||||
|
||||
.course-top-section {
|
||||
margin: 0px 120px 0px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-top-section {
|
||||
margin: 0px 30px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.course-top-section {
|
||||
margin: 0px 24px 0px;
|
||||
@media (min-width: 576px) and (max-width: 992px) {
|
||||
.container {
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,30 +412,44 @@ input[type=checkbox] {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.reviews-section {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||
-moz-column-gap: 32px;
|
||||
column-gap: 32px;
|
||||
row-gap: 32px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.reviews-section {
|
||||
-moz-column-gap: 16px;
|
||||
column-gap: 16px;
|
||||
row-gap: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.reviews-section {
|
||||
grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.reviews-heading {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.reviews-heading {
|
||||
flex-direction: column;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.review-card {
|
||||
width: 352px;
|
||||
margin: 0px 20px 32px 0px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.review-card {
|
||||
width: 336px;
|
||||
margin: 0px 8px 32px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.review-card {
|
||||
width: 312px;
|
||||
}
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.review-card-footer {
|
||||
@@ -486,7 +491,6 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
|
||||
.course-card-wide {
|
||||
height: 248px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: 24px;
|
||||
@@ -497,14 +501,12 @@ div.custom-checkbox>label>input:checked+img {
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-card-wide {
|
||||
height: 535px;
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.course-card-wide {
|
||||
height: 572px;
|
||||
padding: 40px 24px 40px;
|
||||
border-radius: 0px;
|
||||
align-items: center;
|
||||
@@ -512,55 +514,58 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
|
||||
.course-image-wide {
|
||||
width: 100%;
|
||||
width: 352px;
|
||||
height: 200px;
|
||||
background-size: 352px 200px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
margin-right: 32px;
|
||||
border-radius: 5px;
|
||||
flex: 1;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-image-wide {
|
||||
width: 640px;
|
||||
width: 100%;
|
||||
height: 320px;
|
||||
flex-direction: column;
|
||||
background-size: 640px 320px;
|
||||
margin: 0px;
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.course-image-wide {
|
||||
width: 312px;
|
||||
height: 216px;
|
||||
background-size: 312px 216px;
|
||||
}
|
||||
}
|
||||
|
||||
.course-home-page {
|
||||
padding: 0px 0px 80px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-width: 1120px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@media (max-width: 500px) {
|
||||
.course-home-page {
|
||||
padding: 0px 0px 30px;
|
||||
max-width: 688px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.course-home-page {
|
||||
width: 100%;
|
||||
padding-right: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.course-card-wide-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 2;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-card-wide-content {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.course-card-wide-content {
|
||||
width: 90%;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.course-card-wide-title {
|
||||
@@ -574,15 +579,13 @@ div.custom-checkbox>label>input:checked+img {
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-card-wide-title {
|
||||
width: 632px;
|
||||
margin-top: 24px;
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.course-card-wide-title {
|
||||
width: 264px;
|
||||
margin-top: 16px;
|
||||
font-size: 28px;
|
||||
}
|
||||
@@ -592,21 +595,9 @@ div.custom-checkbox>label>input:checked+img {
|
||||
font-size: 16px;
|
||||
line-height: 172%;
|
||||
letter-spacing: -0.011em;
|
||||
width: 688px;
|
||||
height: 80px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-card-wide-intro {
|
||||
width: 632px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.course-card-wide-intro {
|
||||
width: 264px;
|
||||
}
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.button {
|
||||
@@ -631,7 +622,7 @@ div.custom-checkbox>label>input:checked+img {
|
||||
line-height: 150%;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.wide-button {
|
||||
width: 264px;
|
||||
}
|
||||
@@ -646,7 +637,7 @@ div.custom-checkbox>label>input:checked+img {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.video-preview {
|
||||
margin-top: 16px;
|
||||
}
|
||||
@@ -663,22 +654,9 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
|
||||
.course-home-outline {
|
||||
width: 832px;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-home-outline {
|
||||
width: 424px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.course-home-outline {
|
||||
width: 312px;
|
||||
}
|
||||
}
|
||||
|
||||
.small-title {
|
||||
letter-spacing: -0.011em;
|
||||
}
|
||||
@@ -694,6 +672,7 @@ div.custom-checkbox>label>input:checked+img {
|
||||
.chapter-description {
|
||||
height: fit-content;
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.chapter-icon {
|
||||
@@ -701,14 +680,39 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
|
||||
.course-outline-instructor-parent {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
display: grid;
|
||||
grid-gap: 2rem;
|
||||
grid-template-columns: 4fr 1fr;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 768px) {
|
||||
.course-outline-instructor-parent {
|
||||
grid-gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.course-outline-instructor-parent {
|
||||
flex-direction: column;
|
||||
padding: 0px 24px 0px;
|
||||
grid-template-columns: none;
|
||||
}
|
||||
}
|
||||
|
||||
.profile-parent-section {
|
||||
display: grid;
|
||||
grid-gap: 2rem;
|
||||
grid-template-columns: 4fr 1fr;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.profile-parent-section {
|
||||
grid-gap: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.profile-parent-section {
|
||||
grid-template-columns: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -716,7 +720,7 @@ div.custom-checkbox>label>input:checked+img {
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.course-home-mentors {
|
||||
padding: 0px 24px 0px;
|
||||
}
|
||||
@@ -726,7 +730,7 @@ div.custom-checkbox>label>input:checked+img {
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.reviews-parent {
|
||||
padding: 0px 24px 0px;
|
||||
}
|
||||
@@ -780,7 +784,7 @@ div.custom-checkbox>label>input:checked+img {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.course-buttons {
|
||||
flex-direction: column;
|
||||
}
|
||||
@@ -804,9 +808,9 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.member-card-large {
|
||||
width: 312px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -872,33 +876,43 @@ div.custom-checkbox>label>input:checked+img {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.avatar-xl {
|
||||
.avatar-large {
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
}
|
||||
|
||||
.description-card {
|
||||
padding: 24px;
|
||||
width: 832px;
|
||||
flex-direction: column;
|
||||
.avatar-xl {
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.description-card {
|
||||
width: 424px;
|
||||
@media (max-width: 500px) {
|
||||
.avatar-xl {
|
||||
width: 88px;
|
||||
height: 88px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.description-card {
|
||||
width: 312px;
|
||||
.avatar-xl {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
.description-card {
|
||||
padding: 1.5rem;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.overview-card {
|
||||
padding: 8px 24px 8px;
|
||||
padding: 1.5rem;
|
||||
width: 256px;
|
||||
flex-direction: column;
|
||||
display: grid;
|
||||
-moz-column-gap: 1rem;
|
||||
column-gap: 1rem;
|
||||
row-gap: 1rem;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
@@ -907,19 +921,28 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.overview-card {
|
||||
width: 312px;
|
||||
padding: 24px 26px 24px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.mentors-section {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
||||
-moz-column-gap: 32px;
|
||||
column-gap: 32px;
|
||||
row-gap: 32px;
|
||||
}
|
||||
|
||||
.overtime-item {
|
||||
margin: 16px 0px 16px;
|
||||
@media (max-width: 600px) {
|
||||
.mentors-section {
|
||||
grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
|
||||
-moz-column-gap: 24px;
|
||||
column-gap: 24px;
|
||||
row-gap: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.view-all-mentors {
|
||||
@@ -958,6 +981,12 @@ div.custom-checkbox>label>input:checked+img {
|
||||
height: 70%;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.review-modl .modal-dialog {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
|
||||
.error-field {
|
||||
color: red;
|
||||
}
|
||||
@@ -975,26 +1004,16 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
margin: 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: 768px) {
|
||||
.course-details-outline {
|
||||
width: 688px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.course-details-outline {
|
||||
width: 312px;
|
||||
}
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.lesson-content-card {
|
||||
@@ -1003,14 +1022,15 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
|
||||
.course-content-parent {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap-reverse;
|
||||
display: grid;
|
||||
grid-gap: 2rem;
|
||||
grid-template-columns: 2fr minmax(600px, 5fr);
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 1024px) {
|
||||
.course-content-parent {
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1025,41 +1045,17 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
|
||||
.lesson-pagination-parent {
|
||||
width: 736px;
|
||||
margin-top: 16px;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.lesson-pagination-parent {
|
||||
width: 690px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.lesson-pagination-parent {
|
||||
width: 312px;
|
||||
}
|
||||
}
|
||||
|
||||
.course-details-page {
|
||||
padding: 0px 0px 80px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 1120px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.course-details-page {
|
||||
padding: 24px 0px 24px;
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.course-details-page {
|
||||
width: 100%;
|
||||
}
|
||||
.lesson-video {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.active-lesson {
|
||||
@@ -1077,29 +1073,139 @@ div.custom-checkbox>label>input:checked+img {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.lesson-progress-tick {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
background: #4C5A67;
|
||||
border-radius: 2px;
|
||||
padding: 2px;
|
||||
margin: 0px 4px 4px;
|
||||
.profile-page {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
|
||||
.profile-banner {
|
||||
height: 248px;
|
||||
border-radius: 12px 12px 0px 0px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.profile-banner {
|
||||
height: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
.profile-about-section {
|
||||
flex: 1;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
.profile-info {
|
||||
height: 68px;
|
||||
background: #ffffff;
|
||||
border-radius: 0px 0px 12px 12px;
|
||||
}
|
||||
|
||||
.profile-avatar {
|
||||
position: relative;
|
||||
top: 188px;
|
||||
left: 40px;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.profile-avatar {
|
||||
top: 95px;
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.profile-avatar {
|
||||
top: 120px;
|
||||
left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.profile-name {
|
||||
color: #FFFFFF;
|
||||
font-weight: 600;
|
||||
font-size: 22px;
|
||||
line-height: 156%;
|
||||
letter-spacing: -0.0175em;
|
||||
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.64);
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.profile-name {
|
||||
font-size: 16px;
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.creator-badge {
|
||||
background: #48BB74;
|
||||
padding: 4px 6px;
|
||||
color: #ffffff;
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-size: 10px;
|
||||
line-height: 120%;
|
||||
text-align: center;
|
||||
letter-spacing: 0.011em;
|
||||
text-transform: uppercase;
|
||||
height: fit-content;
|
||||
box-shadow: 0px 1px 1px rgb(0 0 0 / 16%);
|
||||
border-radius: 4px;
|
||||
margin-top: 25px;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.creator-badge {
|
||||
font-size: 8px;
|
||||
margin: 8px 0px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.profile-profession {
|
||||
position: relative;
|
||||
top: 16px;
|
||||
left: 174px;
|
||||
font-size: 12px;
|
||||
line-height: 165%;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.profile-profession {
|
||||
top: 10px;
|
||||
left: 120px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.profile-profession {
|
||||
top: 5px;
|
||||
left: 70px;
|
||||
}
|
||||
}
|
||||
|
||||
.social-icons {
|
||||
float: right;
|
||||
margin: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.social-icons {
|
||||
margin: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.social-icons {
|
||||
margin: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.profile-courses {
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
.profile-courses {
|
||||
padding: 0px 24px 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.no-preview {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.progress-text {
|
||||
font-size: 12px;
|
||||
line-height: 165%;
|
||||
@@ -1131,9 +1237,9 @@ div.custom-checkbox>label>input:checked+img {
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 375px) {
|
||||
@media (max-width: 600px) {
|
||||
.progress-card {
|
||||
width: 312px;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
h2 {
|
||||
margin: 20px 0px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.teaser {
|
||||
background: white;
|
||||
border-radius: 9px;
|
||||
border: 1px solid #C4C4C4;
|
||||
|
||||
.teaser-body {
|
||||
padding: 20px;
|
||||
box-shadow: 0px 5px 10px rgb(0 0 0 / 10%)
|
||||
}
|
||||
.teaser-footer {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.sketch-teaser {
|
||||
.teaser();
|
||||
width: 220px;
|
||||
margin-bottom: 30px;
|
||||
margin-top: 30px;
|
||||
|
||||
svg {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
.sketch-image {
|
||||
padding: 10px;
|
||||
}
|
||||
.sketch-footer {
|
||||
border-top: 1px solid#C4C4C4;
|
||||
padding: 10px;
|
||||
background: #F6F6F6;
|
||||
border-radius: 0px 0px 10px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.course-teaser {
|
||||
.teaser();
|
||||
color: #444;
|
||||
margin-bottom: 20px;
|
||||
margin-top: 20px;
|
||||
|
||||
h3, h4 {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.course-body, .course-footer {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.course-body {
|
||||
min-height: 8em;
|
||||
}
|
||||
|
||||
.course-footer {
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
a, a:hover {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.anchor_style {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.anchor_style:hover {
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
section {
|
||||
padding: 60px 0px;
|
||||
}
|
||||
|
||||
section h2 {
|
||||
margin-bottom: 40px;
|
||||
font-size: 48px;
|
||||
line-height: 58px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
section.lightgray {
|
||||
background: #F6F6F6;
|
||||
}
|
||||
|
||||
#hero .jumbotron {
|
||||
background: inherit;
|
||||
}
|
||||
|
||||
.chapter-teaser {
|
||||
.teaser();
|
||||
color: #444;
|
||||
margin: 20px 0px;
|
||||
|
||||
h3, h4 {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.field-width {
|
||||
width: 40%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.footer-grouped-links {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.footer-info {
|
||||
border-top: 0px;
|
||||
margin-top: 0px;
|
||||
|
||||
.footer-col-right {
|
||||
padding-top: 1.8rem;
|
||||
}
|
||||
}
|
||||
|
||||
.web-footer {
|
||||
border-top: 1px solid #E2E6E9;
|
||||
padding: 0px;
|
||||
padding: 2rem 0px;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.course-type {
|
||||
text-transform: uppercase;
|
||||
font-size: 1.0em;
|
||||
font-weight: bold;
|
||||
color: var(--tag-color);
|
||||
}
|
||||
|
||||
.instructor-title {
|
||||
color: black;
|
||||
}
|
||||
|
||||
.instructor-subtitle {
|
||||
font-size: 0.8em;
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
// .mentors-wrapper {
|
||||
// .gray-section();
|
||||
// }
|
||||
|
||||
|
||||
.chapter-number {
|
||||
background: var(--text-color);
|
||||
color: white;
|
||||
height: 24px;
|
||||
min-width: 24px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
background: var(--sidebar-bg);
|
||||
border: 1px solid var(--sidebar-border);
|
||||
margin: 20px 0px;
|
||||
border-radius: 10px;
|
||||
padding: 1px 20px 20px 20px;
|
||||
}
|
||||
|
||||
.sidebar h3 {
|
||||
margin-top: 20px;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.sidebar-batch {
|
||||
background: var(--sidebar-bg);
|
||||
color: var(--text-color);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.sidebar-batch a {
|
||||
padding: 16px 8px 8px 16px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
.sidebar .notice {
|
||||
margin-top: 10px;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
border: 1px dashed var(--text-color);
|
||||
}
|
||||
|
||||
.sidebar .notice a {
|
||||
color: inherit;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
// LiveCode editor
|
||||
|
||||
.livecode-editor {
|
||||
|
||||
.CodeMirror {
|
||||
border: 1px solid #ddd;
|
||||
background: #ffe;
|
||||
height: auto;
|
||||
}
|
||||
.CodeMirror-scroll {
|
||||
max-height: 310px;
|
||||
min-height: 310px;
|
||||
}
|
||||
.controls {
|
||||
padding: 10px 0px;
|
||||
}
|
||||
canvas {
|
||||
border: 5px solid #ddd;
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.output {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
width: 300px;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
background-color: rgba(255, 255, 255, 0);
|
||||
max-height: 300px;
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
margin: 0px;
|
||||
margin-left: 20px;
|
||||
padding: 4px;
|
||||
color: #888;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.canvas-wrapper {
|
||||
padding-top: 10px;
|
||||
}
|
||||
.code-wrapper {
|
||||
min-height: 50px;
|
||||
}
|
||||
.CodeMirror {
|
||||
min-height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sketch-header {
|
||||
input#sketch-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.lesson-teaser {
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
#hero h1 {
|
||||
color: black !important;
|
||||
}
|
||||
|
||||
.lesson-page {
|
||||
margin: 20px 0px;
|
||||
}
|
||||
|
||||
.exercise-image svg {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border: 1px solid #ddd;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.svg-200 svg {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.livecode-editor-small .livecode-editor {
|
||||
.CodeMirror-scroll {
|
||||
max-height: 160px;
|
||||
min-height: 160px;
|
||||
}
|
||||
|
||||
canvas {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
.mentor-dashboard {
|
||||
margin-top: 20px;
|
||||
|
||||
.submission {
|
||||
margin: 40px 0px 0px 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.no-preview-message {
|
||||
width: fit-content;
|
||||
margin: 50px 0px 50px;
|
||||
color: black;
|
||||
}
|
||||
9
community/public/icons/github.svg
Normal file
9
community/public/icons/github.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect x="2" y="2" width="20" height="20" fill="url(#pattern0)"/>
|
||||
<defs>
|
||||
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||
<use xlink:href="#image0" transform="scale(0.05)"/>
|
||||
</pattern>
|
||||
<image id="image0" width="20" height="20" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAABiUlEQVQ4EZWU4VUCMQzHOwIjMAIb6AhuIBvgArb9QkLDh3MD3EA3wA10A9wAN0D/PdLLld5DeI+XuzT95Z9cU+cavxi7maf0GCi9BU6HwHI6//eBUhd5e9/Y1nZFSk+B5GggCqvtPq5l0aY456AqsOz+ARrAJMdI6aEJ9ZReb4INbThdtCCXOQrgeWRZepJvTeI5/ZjniHKLCCiN3SwrzaVWPdMSsFYCz07bN88p2iQ9kGWpTrU1RBPUtihEdSTHvO5Z3hUE6zl91Run3q1C7M0fyPapOKcIDX/dW2fVZaA2t7G55fIkH8qA4kvgLVPgnLMVZiB6phlgPctLS0nLh/Nn9+L4OQCsM0M3smoBrK+Hjeb8lI9UnWWAp4PnbXgmuVNQZJ77jaz6S6NcGHkUR6fDNHZ3MTXVBWBih5nWI1Myr2WhyqAY5wkNxvhpjFqUpbFqkUTXi8XmHEDyeW1SFASLUifjoc4c1Mn7ToFQNglTqQjAlwcYCdRvbVY1dQ/awPr5avZ6w9/7L3HVAW99VdWzAAAAAElFTkSuQmCC"/>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.0 KiB |
9
community/public/icons/medium.svg
Normal file
9
community/public/icons/medium.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<rect x="2" y="3" width="20.7" height="18" fill="url(#pattern0)"/>
|
||||
<defs>
|
||||
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||
<use xlink:href="#image0" transform="scale(0.0434783 0.05)"/>
|
||||
</pattern>
|
||||
<image id="image0" width="23" height="20" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAUCAYAAABmvqYOAAABtUlEQVRIDa2UTU7CQBSAOYJH4CgcxSNwAIPoAgSEqAmIbohR/iQIgiK0nU75q4BiKz0ALnStxoULTMZMzWvGoUBrbPLy5jUz3zd5M61nKxJ7iR0kjz0uH1HEPhErH93+7eK1m+EoobEd3Z25kbSQrAtIJjQkrMxsJQCH7EQiIuQHMJvnJADlM5UkUukNvls3GHsFJL+yUH5MJe2eGvbwULaOp9KfmXzeywpaklzlYXb1cDTWl8ITqSOSyRYqAKeHaAfi33V6KtEmhuIETjKneR/GeK2F5CkP4mtJxkTTH13As4VpQ5B2eJBdPRiNiD4xXMFJ+bJuXjs7ILxTOl0T7BqeyRZIQxCXCu4ftL/Dc+cXC+H9wcACO9p5PHn4TnfMRvXqek6AFMU8RAqFWHlbQnv72bNi6Y2Fn+SKpCmiX4Lh3diCOoYHwpEgveOlcs3PSkqVmgVvd3tzYEdtATh8RKyk3mgSQUJfY03/HzgrKZarz11VfYI28NnseTAc8wVCUYX9p8CY3znAIWuG4aMQHmy1BSbaSVbBYa2dxNw5TIDMSpzCYS0rsYXDRCqhAbWb/COZrH8Ddw70agzSigAAAAAASUVORK5CYII="/>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
community/public/images/linkedin.png
Normal file
BIN
community/public/images/linkedin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 564 B |
BIN
community/public/images/profile-banner.png
Normal file
BIN
community/public/images/profile-banner.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -1,9 +1,8 @@
|
||||
<div>
|
||||
{% set site_link = "<a href='" + site_url + "'>" + site_url + "</a>" %}
|
||||
<p>{{_("Dear Community Member,")}}</p>
|
||||
<p>{{_("Your Invite Request to be a part of {0} has
|
||||
been approved.").format(site_link)}}</p>
|
||||
<p>Click on the link below to complete your Sign up and set a new password</p>
|
||||
{% set site_link = "<a href='" + site_url + "'>" + site_name + "</a>" %}
|
||||
<p>{{_("Hi,")}}</p>
|
||||
<p>{{_("Welcome to {0}!").format(site_name)}}</p>
|
||||
<p>Click on the link below to complete your sign up and set a new password</p>
|
||||
<p style="margin: 15px 0px;">
|
||||
<a href="{{ signup_form_link }}" rel="nofollow" class="btn btn-primary">{{ _("Complete Sign Up") }}</a>
|
||||
</p>
|
||||
@@ -14,5 +13,5 @@
|
||||
</p>
|
||||
<br>
|
||||
<p>Thanks and Regards,</p>
|
||||
<p>Your Community.</p>
|
||||
</div>
|
||||
<p>{{site_name}}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{% extends "templates/base.html" %}
|
||||
{% block title %}About{% endblock %}
|
||||
{% block head_include %}
|
||||
<meta name="description" content="Courses" />
|
||||
<meta name="keywords" content="" />
|
||||
|
||||
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
{{ widgets.BatchTabs(course=course, batch=batch) }}
|
||||
<div class="tab-content" id="about">
|
||||
{{ CourseBasicDetail(course)}}
|
||||
<div class="d-flex align-items-center">
|
||||
<div class="col-lg-4 col-md-12">
|
||||
<div class="sidebar">
|
||||
{{ widgets.InstructorSection(instructor=course.get_instructor()) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% macro CourseBasicDetail(course) %}
|
||||
<h2>{{course.title}}</h2>
|
||||
<div class="course-description">
|
||||
{{course.short_introduction}}
|
||||
</div>
|
||||
{% if course.video_link %}
|
||||
<div class="preview-video">
|
||||
<iframe width="560" height="315" src="{{course.video_link}}" title="YouTube video player" frameborder="0"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowfullscreen></iframe>
|
||||
</div>
|
||||
{% endif %}
|
||||
<h2>About the Course</h2>
|
||||
<div>{{frappe.utils.md_to_html(course.description)}}</div>
|
||||
{% endmacro %}
|
||||
@@ -1,5 +0,0 @@
|
||||
import frappe
|
||||
from . import utils
|
||||
|
||||
def get_context(context):
|
||||
utils.get_common_context(context)
|
||||
@@ -1,61 +0,0 @@
|
||||
{% extends "templates/base.html" %}
|
||||
{% block title %} Batch {% endblock %}
|
||||
|
||||
{% block head_include %}
|
||||
<meta name="description" content="Courses" />
|
||||
<meta name="keywords" content="" />
|
||||
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mt-5">
|
||||
{{ widgets.BatchTabs(course=course, membership=membership) }}
|
||||
<div class="course-details mt-5">
|
||||
{{ widgets.CourseOutline(course=course, batch=batch, show_link=membership, show_progress=True) }}
|
||||
</div>
|
||||
|
||||
{% if batch %}
|
||||
<div class="w-25">
|
||||
<h3>Batch Schedule</h3>
|
||||
{{ widgets.RenderBatch(course=course, batch=batch) }}
|
||||
</div>
|
||||
|
||||
{% if batch.description %}
|
||||
<div class="mt-5">
|
||||
<h3>Batch Details</h3>
|
||||
{{ frappe.utils.md_to_html(batch.description) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if course.is_mentor(frappe.session.user) %}
|
||||
{% set invite_link = frappe.utils.get_url() + "/courses/" + course.name + "/join?batch=" + batch.name %}
|
||||
<div class="">
|
||||
<h3> Invite Members </h3>
|
||||
<a href="" class="" id="invite-link" data-link="{{ invite_link }}">Get Batch Invitation
|
||||
Link</a>
|
||||
<small id="copy-message" class="text-muted" style="display: none;">Copied to Clipboard.</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
frappe.ready(() => {
|
||||
$("#invite-link").click((e) => {
|
||||
e.preventDefault();
|
||||
var link_element = $("#invite-link");
|
||||
var input_element = document.createElement("input");
|
||||
input_element.value = link_element.attr("data-link")
|
||||
document.body.appendChild(input_element);
|
||||
input_element.select();
|
||||
document.execCommand("copy");
|
||||
input_element.remove();
|
||||
$("#copy-message").slideDown(function () {
|
||||
setTimeout(function () {
|
||||
$("#copy-message").slideUp();
|
||||
}, 2000);
|
||||
});
|
||||
})
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -1,5 +0,0 @@
|
||||
import frappe
|
||||
from . import utils
|
||||
|
||||
def get_context(context):
|
||||
utils.get_common_context(context)
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="common-page-style">
|
||||
<div class="course-details-page">
|
||||
<div class="container course-details-page">
|
||||
{{ widgets.BreadCrumb(course=course, lesson=lesson) }}
|
||||
<div class="course-content-parent">
|
||||
<div class="course-details-outline">
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
|
||||
{% if membership or lesson.include_in_preview %}
|
||||
<div class="common-card-style lesson-content-card">{{ lesson.render_html() }}</div>
|
||||
<div class="common-card-style lesson-content-card from-markdown">{{ lesson.render_html() }}</div>
|
||||
{% else %}
|
||||
<div class="no-preview-message">
|
||||
<span>This lesson is not available for Preview. Please join the course to access this lesson.</span>
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
{% extends "templates/base.html" %}
|
||||
|
||||
{% block title %}Members{% endblock %}
|
||||
{% block head_include %}
|
||||
<meta name="description" content="Courses" />
|
||||
<meta name="keywords" content="" />
|
||||
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container">
|
||||
{{ widgets.BatchTabs(course=course, membership=membership) }}
|
||||
{{ MembersList(members)}}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% macro MembersList(members) %}
|
||||
<div class="mt-5">
|
||||
{% for member in members %}
|
||||
<div class="d-flex align-items-center">
|
||||
{{ widgets.Avatar(member=member, avatar_class="avatar-medium") }}
|
||||
<div class="d-flex flex-column ml-2">
|
||||
<div class="d-flex">
|
||||
<a class="anchor_style ml-2" href="/{{member.username}}">
|
||||
<div class="review-content">{{ member.full_name }}</div>
|
||||
</a>
|
||||
{% if course.is_mentor(member.name) %}
|
||||
<div class="badge badge-success ml-2 align-self-start">Mentor</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if loop.index != member_count %}
|
||||
<hr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -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)
|
||||
@@ -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 %}
|
||||
<meta name="description" content="{{course.title}} - Batch Dashboard" />
|
||||
<meta name="keywords" content="{{course.title}} - Batch Dashboard" />
|
||||
<style>
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
||||
<link rel="stylesheet" href="{{ livecode_url }}/static/codemirror/lib/codemirror.css">
|
||||
<link rel="stylesheet" href="/assets/css/lms.css">
|
||||
|
||||
<script src="{{ livecode_url }}/static/codemirror/lib/codemirror.js"></script>
|
||||
<script src="{{ livecode_url }}/static/codemirror/mode/python/python.js"></script>
|
||||
<script src="{{ livecode_url }}/static/codemirror/keymap/sublime.js"></script>
|
||||
|
||||
<script src="{{ livecode_url }}/static/codemirror/addon/edit/matchbrackets.js"></script>
|
||||
<script src="{{ livecode_url }}/static/codemirror/addon/comment/comment.js"></script>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container">
|
||||
{{ widgets.BatchTabs(course=course, membership=membership) }}
|
||||
<div class="mentor-dashboard">
|
||||
<h3>Batch Progress</h3>
|
||||
{% for exercise in report.exercises %}
|
||||
<div class="exercise-submissions">
|
||||
<h2>Exercise {{exercise.index_label}}: {{exercise.title}}</h2>
|
||||
{% for s in report.get_submissions_of_exercise(exercise.name) %}
|
||||
<div class="submission">
|
||||
<h4><a href="/{{s.owner.username}}">{{s.owner.full_name}}</a></h4>
|
||||
<div class="livecode-editor-small">
|
||||
{{ LiveCodeEditor(name=s.name, code=s.solution, reset_code=s.solution) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{%- block script %}
|
||||
{{ super() }}
|
||||
{{ LiveCodeEditorJS() }}
|
||||
{% endblock %}
|
||||
@@ -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
|
||||
@@ -1,17 +0,0 @@
|
||||
{% extends "templates/base.html" %}
|
||||
{% block title %}Schedule{% endblock %}
|
||||
|
||||
{% block head_include %}
|
||||
<meta name="description" content="Courses" />
|
||||
<meta name="keywords" content="" />
|
||||
<link rel="stylesheet" href="/assets/frappe/css/font-awesome.css">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
{{ widgets.BatchTabs(course=course, batch=batch) }}
|
||||
<h3>
|
||||
Schedule
|
||||
</h3>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -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
|
||||
@@ -9,7 +9,7 @@
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div class="common-page-style">
|
||||
<div class="course-home-page">
|
||||
<div class="container course-home-page">
|
||||
{{ widgets.BreadCrumb(course=course) }}
|
||||
{{ CourseCardWide(course) }}
|
||||
{{ CourseOutlineAndCreator(course) }}
|
||||
@@ -32,11 +32,13 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="course-card-wide-content">
|
||||
<div class="course-card-wide-title">
|
||||
{{ course.title }}
|
||||
</div>
|
||||
<div class="course-card-wide-intro">
|
||||
{{ course.short_introduction }}
|
||||
<div class="course-info">
|
||||
<div class="course-card-wide-title">
|
||||
{{ course.title }}
|
||||
</div>
|
||||
<div class="course-card-wide-intro">
|
||||
{{ course.short_introduction }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="course-buttons">
|
||||
{% if not course.disable_self_learning and not membership %}
|
||||
@@ -134,14 +136,14 @@
|
||||
</div>
|
||||
<div class="mentors-section">
|
||||
{% for mentor in course.get_mentors() %}
|
||||
{{ widgets.MemberCard(member=mentor, show_course_count=False, dimension_class="member-card-medium") }}
|
||||
{{ widgets.MemberCard(member=mentor, show_course_count=False, dimension_class="") }}
|
||||
{% endfor %}
|
||||
<div class="view-all-mentors">
|
||||
<span class="card-divider-dark flex-one"></span>
|
||||
<span class="course-instructor"><span class="all-mentors-text">View all mentors</span> <img class="mentor-icon"
|
||||
src="/assets/community/icons/down-arrow.svg" /></span>
|
||||
<span class="card-divider-dark flex-one"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view-all-mentors">
|
||||
<span class="card-divider-dark flex-one"></span>
|
||||
<span class="course-instructor"><span class="all-mentors-text">View all mentors</span> <img class="mentor-icon"
|
||||
src="/assets/community/icons/down-arrow.svg" /></span>
|
||||
<span class="card-divider-dark flex-one"></span>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@@ -61,7 +61,7 @@ var check_mentor_request = () => {
|
||||
var hide_wrapped_mentor_cards = () => {
|
||||
var offset_top_prev;
|
||||
|
||||
$('.member-card-medium').each(function () {
|
||||
$(".mentors-section .member-card").each(function () {
|
||||
var offset_top = $(this).offset().top;
|
||||
if (offset_top > offset_top_prev) {
|
||||
$(this).addClass('wrapped').slideUp("fast");
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="common-page-style">
|
||||
<div class="course-top-section">
|
||||
<div class="container">
|
||||
<div class="courses-header">
|
||||
{{ 'All Courses' }}
|
||||
</div>
|
||||
@@ -22,16 +22,3 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block script %}
|
||||
<script>
|
||||
frappe.ready(() => {
|
||||
$(".course-card-title").each((i, element) => {
|
||||
var title = $(element).text();
|
||||
var length = $(window).width() <= 375 ? 60 : 65;
|
||||
var suffix = title.length > length ? "..." : "";
|
||||
$(element).text(title.substring(0, length) + suffix);
|
||||
})
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -5,7 +5,7 @@ def get_context(context):
|
||||
context.courses = get_courses()
|
||||
|
||||
def get_courses():
|
||||
course_names = frappe.get_all("LMS Course", pluck="name")
|
||||
course_names = frappe.get_all("LMS Course", filters={"is_published": True}, pluck="name")
|
||||
courses = []
|
||||
for course in course_names:
|
||||
courses.append(frappe.get_doc("LMS Course", course))
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
{% extends "templates/base.html" %}
|
||||
{% from "www/hackathons/macros/card.html" import null_card %}
|
||||
|
||||
{% block title %}{{ 'My Courses' }}{% endblock %}
|
||||
{% block head_include %}
|
||||
<meta name="description" content="My Courses" />
|
||||
<meta name="keywords" content="" />
|
||||
<style>
|
||||
div.card-hero-img {
|
||||
height: 220px;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-color: rgb(250, 251, 252);
|
||||
}
|
||||
|
||||
.card-image-wrapper {
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
height: 220px;
|
||||
background-color: rgb(250, 251, 252);
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.image-body {
|
||||
align-self: center;
|
||||
color: #d1d8dd;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.no-courses {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
section {
|
||||
padding: 5rem 0 5rem 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% macro card(course) %}
|
||||
<div class="col-sm-4 mb-4 text-left">
|
||||
<a href="//courses/course?course={{course.name}}" class="no-decoration no-underline">
|
||||
<div class="card h-100">
|
||||
<div class='card-body'>
|
||||
<h5 class='card-title'>{{ course.title }}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% block content %}
|
||||
<section class="section">
|
||||
<div class='container'>
|
||||
{% if frappe.session.user != "Guest" %}
|
||||
{% for course in my_courses %}
|
||||
{{ card(course) }}
|
||||
{% endfor %}
|
||||
{% if my_courses %}
|
||||
{% for n in range( (3 - (my_courses|length)) %3) %}
|
||||
{{ null_card() }}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="no-courses">You haven't enrolled in any Course yet. <a href="/courses">Check out the availabe
|
||||
courses.</a></div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<div class="no-courses">
|
||||
<p>Please sign up to access this page.</p>
|
||||
<a id="signup" class="btn btn-primary btn-lg" href="/login#signup">{{_('Sign Up')}}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -1,15 +0,0 @@
|
||||
import frappe
|
||||
|
||||
def get_context(context):
|
||||
context.no_cache = 1
|
||||
context.my_courses = get_my_courses()
|
||||
|
||||
def get_my_courses():
|
||||
my_courses = []
|
||||
courses = frappe.get_all("LMS Course Enrollment", {"owner": frappe.session.user}, ["course"])
|
||||
for course in courses:
|
||||
my_courses.append({
|
||||
"name": course.course,
|
||||
"title": frappe.db.get_value("LMS Course", course.course, ["title"])
|
||||
})
|
||||
return my_courses
|
||||
@@ -6,23 +6,57 @@
|
||||
|
||||
{% block content %}
|
||||
<div class="common-page-style">
|
||||
<div class="course-home-page">
|
||||
{{ widgets.MemberCard(member=member, show_course_count=True, dimension_class="member-card-xl") }}
|
||||
<div class="container profile-page">
|
||||
{{ ProfileBanner(member) }}
|
||||
{{ AboutOverviewSection(member) }}
|
||||
<div class="profile-courses">
|
||||
{{ CoursesCreated(member) }}
|
||||
{{ CoursesMentored(member) }}
|
||||
{{ CoursesEnrolled(member) }}
|
||||
</div>
|
||||
{{ CoursesCreated(member) }}
|
||||
{{ CoursesMentored(member) }}
|
||||
{{ CoursesEnrolled(member) }}
|
||||
{{ ProfileTabs(profile_tabs) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% macro ProfileBanner(member) %}
|
||||
<div class="">
|
||||
<div class="profile-banner" style="background-image: url(/assets/community/images/profile-banner.png)">
|
||||
<div class="profile-avatar">
|
||||
{{ widgets.Avatar(member=member, avatar_class="avatar-xl") }}
|
||||
<div class="profile-name"> {{ member.full_name }} </div>
|
||||
{% if member.get_authored_courses() | length %}
|
||||
<div class="creator-badge"> Creator </div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile-info">
|
||||
{% if member.profession %}
|
||||
<span class="profile-profession"> {{ member.profession }} </span>
|
||||
{% endif %}
|
||||
<div class="social-icons">
|
||||
{% if member.linkedin %}
|
||||
<a class="linkedin" href="{{ member.linkedin }}">
|
||||
<img src="/assets/community/images/linkedin.png">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if member.medium %}
|
||||
<a class="medium" href="{{ member.medium}}">
|
||||
<img src="/assets/community/icons/medium.svg">
|
||||
</a>
|
||||
{% endif %}
|
||||
{% if member.github %}
|
||||
<a class="github" href="{{ member.github }}">
|
||||
<img src="/assets/community/icons/github.svg">
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro AboutOverviewSection(member) %}
|
||||
<div class="course-outline-instructor-parent">
|
||||
<div class="profile-parent-section">
|
||||
{% if member.bio %}
|
||||
<div class="course-overview-section">
|
||||
<div class="profile-about-section">
|
||||
<div class="course-home-headings">
|
||||
About
|
||||
</div>
|
||||
@@ -62,42 +96,48 @@
|
||||
|
||||
{% macro CoursesCreated(member) %}
|
||||
{% if member.get_authored_courses() | length %}
|
||||
<div class="course-home-headings">
|
||||
Courses Created
|
||||
</div>
|
||||
<div class="cards-parent">
|
||||
{% for course in member.get_authored_courses() %}
|
||||
{% set course_details = frappe.get_doc("LMS Course", course) %}
|
||||
{{ widgets.CourseCard(course=course_details) }}
|
||||
{% endfor %}
|
||||
<div class="profile-courses">
|
||||
<div class="course-home-headings">
|
||||
Courses Created
|
||||
</div>
|
||||
<div class="cards-parent">
|
||||
{% for course in member.get_authored_courses() %}
|
||||
{% set course_details = frappe.get_doc("LMS Course", course) %}
|
||||
{{ widgets.CourseCard(course=course_details) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro CoursesMentored(member) %}
|
||||
{% if member.get_course_membership("Mentor") | length %}
|
||||
<div class="course-home-headings">
|
||||
Courses Mentored
|
||||
</div>
|
||||
<div class="cards-parent">
|
||||
{% for membership in member.get_course_membership("Mentor") %}
|
||||
{% set course_details = frappe.get_doc("LMS Course", membership.course) %}
|
||||
{{ widgets.CourseCard(course=course_details) }}
|
||||
{% endfor %}
|
||||
{% if member.get_mentored_courses() | length %}
|
||||
<div class="profile-courses">
|
||||
<div class="course-home-headings">
|
||||
Courses Mentored
|
||||
</div>
|
||||
<div class="cards-parent">
|
||||
{% for mentorship in member.get_mentored_courses() %}
|
||||
{% set course_details = frappe.get_doc("LMS Course", mentorship.course) %}
|
||||
{{ widgets.CourseCard(course=course_details) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro CoursesEnrolled(member) %}
|
||||
{% if member.get_course_membership("Student") | length %}
|
||||
<div class="course-home-headings">
|
||||
Courses Enrolled
|
||||
</div>
|
||||
<div class="cards-parent">
|
||||
{% for membership in member.get_course_membership("Student") %}
|
||||
{% set course_details = frappe.get_doc("LMS Course", membership.course) %}
|
||||
{{ widgets.CourseCard(course=course_details) }}
|
||||
{% endfor %}
|
||||
<div class="profile-courses">
|
||||
<div class="course-home-headings">
|
||||
Courses Enrolled
|
||||
</div>
|
||||
<div class="cards-parent">
|
||||
{% for membership in member.get_course_membership("Student") %}
|
||||
{% set course_details = frappe.get_doc("LMS Course", membership.course) %}
|
||||
{{ widgets.CourseCard(course=course_details) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user