Merge branch 'main' of https://github.com/frappe/community into miscellaneous-fixes

This commit is contained in:
pateljannat
2021-05-03 16:57:58 +05:30
18 changed files with 375 additions and 170 deletions

View File

@@ -17,18 +17,18 @@
<div class="col-lg-9 col-md-12">
<div class="course-details">
{{ CourseDescription(course) }}
{{ BatchSection(course, is_mentor, upcoming_batches, mentor_batches) }}
{{ BatchSection(course) }}
{{ CourseOutline(course) }}
</div>
</div>
<div class="col-lg-3 col-md-12">
<div class="sidebar">
{{ InstructorsSection(instructor) }}
{{ InstructorsSection(course.get_instructor()) }}
</div>
<div class="sidebar">
{{ MentorsSection(mentors, is_mentor) }}
{{ MentorsSection(course.get_mentors(), course.is_mentor(frappe.session.user)) }}
</div>
</div>
</div>
@@ -57,11 +57,11 @@
{% endif %}
{% endmacro %}
{% macro BatchSection(course, is_mentor, upcoming_batches, mentor_batches) %}
{% if is_mentor %}
{{ BatchSectionForMentors(course, mentor_batches) }}
{% macro BatchSection(course) %}
{% if course.is_mentor(frappe.session.user) %}
{{ BatchSectionForMentors(course, course.get_batches(mentor=frappe.session.user)) }}
{% else %}
{{ BatchSectionForStudents(course, upcoming_batches) }}
{{ BatchSectionForStudents(course, course.get_upcoming_batches()) }}
{% endif %}
{% endmacro %}
@@ -131,25 +131,9 @@
{% endmacro %}
{% macro CourseOutline(course) %}
<h2>Course Outline</h2>
<h2>Course Outline</h2>
{% for chapter in course.topics %}
<div class="chapter-plan">
<h3><span class="chapter-number">{{loop.index}}</span> {{chapter.title}}</h3>
<div class="chapter-description">
{{chapter.preview | markdown}}
</div>
{#
<div class="lessons">
{% for lesson in chapter.lessons %}
<div class="lesson">
<span class="lesson-type"><i class="{{lesson.icon}}"></i></span>
<span class="lesson-title">{{lesson.title}}</span>
</div>
{% endfor %}
</div>
#}
</div>
{% endfor %}
{% for chapter in course.get_chapters() %}
{{ widgets.ChapterTeaser(chapter=chapter)}}
{% endfor %}
{% endmacro %}