Merge branch 'call-summary-dialog' of github.com:surajshetty3416/erpnext into call-summary-dialog
This commit is contained in:
commit
7877ef22ba
@ -1,17 +1,14 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"course_name": "_Test Course",
|
"course_name": "TC100",
|
||||||
"course_code": "TC100",
|
|
||||||
"course_abbreviation": "TC"
|
"course_abbreviation": "TC"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"course_name": "_Test Course 1",
|
"course_name": "TC101",
|
||||||
"course_code": "TC101",
|
|
||||||
"course_abbreviation": "TC1"
|
"course_abbreviation": "TC1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"course_name": "_Test Course 2",
|
"course_name": "TC102",
|
||||||
"course_code": "TC102",
|
|
||||||
"course_abbreviation": "TC2"
|
"course_abbreviation": "TC2"
|
||||||
}
|
}
|
||||||
]
|
]
|
@ -1,13 +1,11 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"program_name": "_Test Program 1",
|
"program_name": "_TP1",
|
||||||
"program_code": "_TP1",
|
|
||||||
"description": "Test Description",
|
"description": "Test Description",
|
||||||
"program_abbreviation": "TP1"
|
"program_abbreviation": "TP1"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"program_name": "_Test Program 2",
|
"program_name": "_TP2",
|
||||||
"program_code": "_TP2",
|
|
||||||
"description": "Test Description",
|
"description": "Test Description",
|
||||||
"program_abbreviation": "TP2"
|
"program_abbreviation": "TP2"
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ class ProgramEnrollment(Document):
|
|||||||
msgprint(_("Fee Records Created - {0}").format(comma_and(fee_list)))
|
msgprint(_("Fee Records Created - {0}").format(comma_and(fee_list)))
|
||||||
|
|
||||||
def get_courses(self):
|
def get_courses(self):
|
||||||
return frappe.db.sql('''select course, course_name from `tabProgram Course` where parent = %s and required = 1''', (self.program), as_dict=1)
|
return frappe.db.sql('''select course from `tabProgram Course` where parent = %s and required = 1''', (self.program), as_dict=1)
|
||||||
|
|
||||||
def create_course_enrollments(self):
|
def create_course_enrollments(self):
|
||||||
student = frappe.get_doc("Student", self.student)
|
student = frappe.get_doc("Student", self.student)
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
{% macro title() %}
|
{% macro title() %}
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<a href="#" class="text-muted">
|
<a href="/lms/course?name={{ course }}&program={{ program }}" class="text-muted">
|
||||||
Back to Course
|
Back to Course
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
<div onclick="show_singup()">
|
<div onclick="show_singup()">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if topic.hero_image %}
|
{% if topic.hero_image %}
|
||||||
<div class="card-hero-img" style="background-image: url('{{ topic.hero_image }})'"></div>
|
<div class="card-hero-img" style="background-image: url('{{ topic.hero_image }}')"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="card-image-wrapper text-center">
|
<div class="card-image-wrapper text-center">
|
||||||
<div class="image-body"><i class="fa fa-picture-o" aria-hidden="true"></i></div>
|
<div class="image-body"><i class="fa fa-picture-o" aria-hidden="true"></i></div>
|
||||||
@ -96,7 +96,7 @@
|
|||||||
{{ card(topic) }}
|
{{ card(topic) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if topics %}
|
{% if topics %}
|
||||||
{% for n in range(((topics|length)%3)) %}
|
{% for n in range( (3 - (topics|length)) %3) %}
|
||||||
{{ null_card() }}
|
{{ null_card() }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -5,9 +5,16 @@ import frappe
|
|||||||
no_cache = 1
|
no_cache = 1
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
|
try:
|
||||||
|
program = frappe.form_dict['program']
|
||||||
|
course_name = frappe.form_dict['name']
|
||||||
|
except KeyError:
|
||||||
|
frappe.local.flags.redirect_location = '/lms'
|
||||||
|
raise frappe.Redirect
|
||||||
|
|
||||||
context.education_settings = frappe.get_single("Education Settings")
|
context.education_settings = frappe.get_single("Education Settings")
|
||||||
course = frappe.get_doc('Course', frappe.form_dict['name'])
|
course = frappe.get_doc('Course', course_name)
|
||||||
context.program = frappe.form_dict['program']
|
context.program = program
|
||||||
context.course = course
|
context.course = course
|
||||||
|
|
||||||
context.topics = course.get_topics()
|
context.topics = course.get_topics()
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
{{ program_card(program.program, program.has_access) }}
|
{{ program_card(program.program, program.has_access) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if featured_programs %}
|
{% if featured_programs %}
|
||||||
{% for n in range((featured_programs|length)%3) %}
|
{% for n in range( (3 - (featured_programs|length)) %3) %}
|
||||||
{{ null_card() }}
|
{{ null_card() }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
{{ card(course) }}
|
{{ card(course) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if courses %}
|
{% if courses %}
|
||||||
{% for n in range((courses|length)%3) %}
|
{% for n in range( (3 - (courses|length)) %3) %}
|
||||||
{{ null_card() }}
|
{{ null_card() }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -6,10 +6,16 @@ from frappe import _
|
|||||||
no_cache = 1
|
no_cache = 1
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
|
try:
|
||||||
|
program = frappe.form_dict['program']
|
||||||
|
except KeyError:
|
||||||
|
frappe.local.flags.redirect_location = '/lms'
|
||||||
|
raise frappe.Redirect
|
||||||
|
|
||||||
context.education_settings = frappe.get_single("Education Settings")
|
context.education_settings = frappe.get_single("Education Settings")
|
||||||
context.program = get_program(frappe.form_dict['program'])
|
context.program = get_program(program)
|
||||||
context.courses = [frappe.get_doc("Course", course.course) for course in context.program.courses]
|
context.courses = [frappe.get_doc("Course", course.course) for course in context.program.courses]
|
||||||
context.has_access = utils.allowed_program_access(frappe.form_dict['program'])
|
context.has_access = utils.allowed_program_access(program)
|
||||||
context.progress = get_course_progress(context.courses, context.program)
|
context.progress = get_course_progress(context.courses, context.program)
|
||||||
|
|
||||||
def get_program(program_name):
|
def get_program(program_name):
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
{{ card(content, loop.index, topic.contents|length) }}
|
{{ card(content, loop.index, topic.contents|length) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if contents %}
|
{% if contents %}
|
||||||
{% for n in range((contents|length)%3) %}
|
{% for n in range( (3 - (contents|length)) %3) %}
|
||||||
{{ null_card() }}
|
{{ null_card() }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -5,9 +5,13 @@ import frappe
|
|||||||
no_cache = 1
|
no_cache = 1
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
course = frappe.form_dict['course']
|
try:
|
||||||
program = frappe.form_dict['program']
|
course = frappe.form_dict['course']
|
||||||
topic = frappe.form_dict['topic']
|
program = frappe.form_dict['program']
|
||||||
|
topic = frappe.form_dict['topic']
|
||||||
|
except KeyError:
|
||||||
|
frappe.local.flags.redirect_location = '/lms'
|
||||||
|
raise frappe.Redirect
|
||||||
|
|
||||||
context.program = program
|
context.program = program
|
||||||
context.course = course
|
context.course = course
|
||||||
|
Loading…
x
Reference in New Issue
Block a user