diff --git a/erpnext/www/lms/__init__.py b/erpnext/www/lms/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/erpnext/www/lms/course.html b/erpnext/www/lms/course.html deleted file mode 100644 index 799480bd375..00000000000 --- a/erpnext/www/lms/course.html +++ /dev/null @@ -1,37 +0,0 @@ -{% extends "frappe_theme/templates/base.html" %} -{% block title %}ERPNext Academy{% endblock %} -{% from "templates/includes/media.html" import media %} -{% block content %} -
-{% include "www/lms/templates/includes/" + content_type.lower() + ".html" %} - -
- -{% endblock %} \ No newline at end of file diff --git a/erpnext/www/lms/course.js b/erpnext/www/lms/course.js deleted file mode 100644 index b4eb8f7b731..00000000000 --- a/erpnext/www/lms/course.js +++ /dev/null @@ -1,47 +0,0 @@ -function submitQuiz() { - formData = new FormData(quiz); - var form_object = {}; - formData.forEach(function (value, key) { - form_object[key] = value; - }); - frappe.call({ - method: "erpnext.education.utils.evaluate_quiz", - args: { - "quiz_response": form_object, - "quiz": $('#content-holder').data('content'), - "course": $('#content-holder').data('course'), - "program": $('#content-holder').data('program') - }, - async: false, - callback: function (r) { - if (r) { - $("input[type=radio]").attr('disabled', true); - $("#quiz-actions").attr('hidden', true); - $("#post-quiz-actions").attr('hidden', false); - $("#result").html(r.message); - } - } - }); -} - -function addActivity() { - frappe.call({ - method: "erpnext.education.utils.add_activity", - args: { - "content_type": $('#content-holder').data('type'), - "content": $('#content-holder').data('content'), - "course": $('#content-holder').data('course'), - "program": $('#content-holder').data('program'), - } - }) -} - -function addFinalActivity() { - addActivity() - frappe.call({ - method: "erpnext.education.utils.mark_course_complete", - args: { - "course": $('#content-holder').data('course'), - }, - }) -} diff --git a/erpnext/www/lms/course.py b/erpnext/www/lms/course.py deleted file mode 100644 index 5f7765abf0c..00000000000 --- a/erpnext/www/lms/course.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import unicode_literals -import erpnext.education.utils as utils -import frappe - - -def get_context(context): - if frappe.form_dict['course']: - # Save form_dict variables - program_name = frappe.form_dict["program"] - course_name = frappe.form_dict["course"] - content_name = frappe.form_dict["content"] - content_type = frappe.form_dict["type"] - - # Get the required doctypes - current_course = frappe.get_doc("Course", course_name) - current_content = frappe.get_doc(content_type, content_name) - - # Saving context variables for Jinja - context.content = current_content - context.course_name = course_name - context.program_name = program_name - context.content_type = content_type - context.next_content_type, context.next_content = get_next_content(content_name, content_type, current_course.get_content_info()) - if content_type == "Quiz": - context.questions = current_content.get_questions() - -def get_next_content(c_name, c_type, content_list): - try: - next = content_list[content_list.index([c_type, c_name]) + 1] - return next[0], next[1] - except IndexError: - return None, None \ No newline at end of file diff --git a/erpnext/www/lms/index.css b/erpnext/www/lms/index.css deleted file mode 100644 index 22be3be59e4..00000000000 --- a/erpnext/www/lms/index.css +++ /dev/null @@ -1,101 +0,0 @@ -.page-content { - padding-bottom: 0px !important; -} - -.dashboard-section { - margin: auto; - max-width: 90%; -} - -.dashboard-section h1 { - font-size: 1.5em; -} - -@media(min-width: 768px) { - .dashboard-section { - max-width: 80%; - } -} - -@media(min-width: 992px) { - .dashboard-section { - max-width: 65%; - } -} - -.hero-content h1 { - font-size: 1.85em; - font-weight: 300; -} - -.hero { - border-bottom: 0px; -} - -.erp-hero { - border-bottom: 1px solid #e1e9f0; -} - -.hero-content p { - margin-bottom: 100px; -} - -.navbar { - border-bottom: 0px; -} - -.main-illustration { - margin: -90px 0 -60px -32px; - min-height: 420px; -} - -.hero-title { - font-size: 32px; -} - -@media screen and (max-width: 750px) { - .main-illustration { - min-height: inherit; - } -} - -@media screen and (max-width: 480px) { - .main-illustration { - margin: -60px 0 -20px -16px; - } - - .hero-title { - font-size: 26px; - } - - .hero-title+p { - font-size: 16px; - } -} - - -.modal-dialog { - max-width: 800px; - margin: 30px auto; -} - -.modal-body { - position: relative; - padding: 0px; - background-color: black; -} - -.close { - position: absolute; - right: -30px; - top: 0; - z-index: 999; - font-size: 2rem; - font-weight: normal; - color: #fff; - opacity: 1; -} - -.video-btn { - color: white !important; -} \ No newline at end of file diff --git a/erpnext/www/lms/index.html b/erpnext/www/lms/index.html deleted file mode 100644 index 560d70d0cd3..00000000000 --- a/erpnext/www/lms/index.html +++ /dev/null @@ -1,81 +0,0 @@ -{% extends "frappe_theme/templates/base.html" %} -{% block title %}{{settings.portal_title}}{% endblock %} - -{% from "templates/includes/media.html" import media %} - -{% macro featured_card(program_name, description, hero_image, code) %} -
-
- -
- -
{{ program_name }}
-
-
{{ description }}
-
- -
-
-{% endmacro %} - -{% block content %} -
-
-
- -
-

{{settings.portal_title}}

- -

- {{settings.description}}

-

- - Explore Courses -

-
- -
-
-

Featured Programs

-

Master Engineering

- {% for program in featured %} - {{ featured_card(program.program_name, program.description, program.hero_image, program.program_code) }} - {% endfor %} -
- View All -
-
-
- -{% include "www/lms/templates/includes/highlights.html" %} -
- - -
- - -{% endblock %} \ No newline at end of file diff --git a/erpnext/www/lms/index.js b/erpnext/www/lms/index.js deleted file mode 100644 index 8fcda6e1e0e..00000000000 --- a/erpnext/www/lms/index.js +++ /dev/null @@ -1,30 +0,0 @@ -$(function () { - setTimeout(function () { - $(".later").fadeIn(); - }, 1000); -}); - -$(document).ready(function () { - - var $videoSrc; - // Gets the video src from the data-src on each button - $('.video-btn').click(function () { - $videoSrc = $(this).attr("data-src"); - console.log($videoSrc); - }); - console.log($videoSrc); - - - // when the modal is opened autoplay it - $('#myModal').on('shown.bs.modal', function (e) { - - // set the video src to autoplay and not to show related video. Youtube related video is like a box of chocolates... you never know what you're gonna get - $("#ytplayer").attr('src', "https://www.youtube.com/embed/" + $videoSrc + "?autoplay=0"); - }) - // stop playing the youtube video when I close the modal - $('#myModal').on('hide.bs.modal', function (e) { - // a poor man's stop video - $("#ytplayer").attr('src', $videoSrc); - }) - // document ready -}); \ No newline at end of file diff --git a/erpnext/www/lms/index.py b/erpnext/www/lms/index.py deleted file mode 100644 index a586b40741a..00000000000 --- a/erpnext/www/lms/index.py +++ /dev/null @@ -1,7 +0,0 @@ -from __future__ import unicode_literals -import frappe -import erpnext.education.utils as utils - -def get_context(context): - context.featured = utils.get_featured_programs() - context.settings = frappe.get_doc("Education Settings") \ No newline at end of file diff --git a/erpnext/www/lms/program.html b/erpnext/www/lms/program.html deleted file mode 100644 index 44727df7941..00000000000 --- a/erpnext/www/lms/program.html +++ /dev/null @@ -1,69 +0,0 @@ -{% extends "frappe_theme/templates/base.html" %} -{% block title %}ERPNext Academy{% endblock %} - -{% macro course_card(course) %} -
-
-
-
-
{{ course.course_name }}
- - Course Content -
    - {% for content in course.course_content %} -
  • {{ content.content }}
  • - {% endfor %} -
-
-
-
- {% if not check_complete(course.name) %} - Start Course - {% else %} - Complete - {% endif %} -
-
-
-
-{% endmacro %} - -{% block content %} -
-
-
- -
-

{{ program.program_name }}

-

{{ program.description }}

-

- - Continue Learning -

-
- -
-
-

Courses

-

Curated Courses and Content

- {% for course_item in course_list %} - {{ course_card(course_item) }} - {% endfor %} -
-
- -{% include "www/lms/templates/includes/highlights.html" %} - - - -{% endblock %} \ No newline at end of file diff --git a/erpnext/www/lms/program.py b/erpnext/www/lms/program.py deleted file mode 100644 index a8c9c0efe02..00000000000 --- a/erpnext/www/lms/program.py +++ /dev/null @@ -1,21 +0,0 @@ -from __future__ import unicode_literals -import erpnext.education.utils as utils -import frappe - - -def get_context(context): - program = frappe.get_doc("Program", frappe.form_dict["program"]) - course_list = program.get_course_list() - - context.program = program - context.course_list = course_list - context.check_complete = check_complete - - -def check_complete(course_name): - try: - enrollment = utils.get_course_enrollment(course_name, frappe.session.user) - completed = frappe.get_value('Course Enrollment', enrollment['name'], "completed") - return bool(completed) - except: - return False \ No newline at end of file diff --git a/erpnext/www/lms/templates/includes/article.html b/erpnext/www/lms/templates/includes/article.html deleted file mode 100644 index 88634bf14a0..00000000000 --- a/erpnext/www/lms/templates/includes/article.html +++ /dev/null @@ -1,30 +0,0 @@ -
-
-
-
-

{{ content.title }}

- - Published on {{ content.publish_date }}, by {{ content.author }} - -
-
- {% include "www/lms/templates/includes/lms-nav.html" %} -
-
-
-
-
-
-
-
- {{ content.content }} -
-
- {% include "www/lms/templates/includes/lms-nav.html" %} -
- -
-
\ No newline at end of file diff --git a/erpnext/www/lms/templates/includes/footer/footer.html b/erpnext/www/lms/templates/includes/footer/footer.html deleted file mode 100644 index 62aabea2347..00000000000 --- a/erpnext/www/lms/templates/includes/footer/footer.html +++ /dev/null @@ -1,60 +0,0 @@ - - \ No newline at end of file diff --git a/erpnext/www/lms/templates/includes/highlights.html b/erpnext/www/lms/templates/includes/highlights.html deleted file mode 100644 index a97d699537a..00000000000 --- a/erpnext/www/lms/templates/includes/highlights.html +++ /dev/null @@ -1,41 +0,0 @@ -
-
-

Highlights

-
-
-
-
Curated Courses
-
Learning paths specifically designed for the your use cases, whether you are a user, developer - or an - implementer
-
- -
- -
-
-
Comprehensive Content
-
Content designed to cover all the fundamentals as well as expert tips and techniques to make - the most out of ERPNext.
-
- -
- -
-
-
Certification
-
ERPNext is open source and infinitely extensible. Customize it, build upon it, add your own - apps built with - Frappe Framework.
-
- -
-
-
-
\ No newline at end of file diff --git a/erpnext/www/lms/templates/includes/lms-nav.html b/erpnext/www/lms/templates/includes/lms-nav.html deleted file mode 100644 index efd1b8b4ffc..00000000000 --- a/erpnext/www/lms/templates/includes/lms-nav.html +++ /dev/null @@ -1,6 +0,0 @@ -Previous -{% if next_content != None %} -Next -{% else %} -Finish Course -{% endif %} \ No newline at end of file diff --git a/erpnext/www/lms/templates/includes/quiz.html b/erpnext/www/lms/templates/includes/quiz.html deleted file mode 100644 index 1c7c6002cc9..00000000000 --- a/erpnext/www/lms/templates/includes/quiz.html +++ /dev/null @@ -1,52 +0,0 @@ -{% macro quiz(loop_index, question) %} -
-
{{ loop_index }}{{ question.question }}
-
- {% for option in question.options %} -
- - -
- {% endfor %} -
-
-{% endmacro %} -
-
-
-
-

{{ content.title }}

-
-
-
-
-
-
- {% for q in questions %} - {{ quiz(loop.index|str +". ", q) }} - {% endfor %} -
-
-
- - -
- -
-
-
- -
-
\ No newline at end of file diff --git a/erpnext/www/lms/templates/includes/video.html b/erpnext/www/lms/templates/includes/video.html deleted file mode 100644 index e9d4894b968..00000000000 --- a/erpnext/www/lms/templates/includes/video.html +++ /dev/null @@ -1,35 +0,0 @@ -
-
-
- -
-
-
-

{{ content.name }}

- - {{ content.duration }} Mins - — Published on {{ content.publish_date }}. - -
-
- {% include "www/lms/templates/includes/lms-nav.html" %} -
-
-
-
-
-
-
-
- {{ content.description }} -
- - -
-
\ No newline at end of file