Merge pull request #316 from pateljannat/rename-to-lms
This commit is contained in:
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -57,15 +57,15 @@ jobs:
|
|||||||
mkdir -p ~/bench-cache
|
mkdir -p ~/bench-cache
|
||||||
(cd && tar czf ~/bench-cache/bench.tgz frappe-bench)
|
(cd && tar czf ~/bench-cache/bench.tgz frappe-bench)
|
||||||
fi
|
fi
|
||||||
- name: add school app to bench
|
- name: add lms app to bench
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench get-app school $GITHUB_WORKSPACE
|
run: bench get-app lms $GITHUB_WORKSPACE
|
||||||
- name: create bench site
|
- name: create bench site
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench new-site --mariadb-root-password root --admin-password admin frappe.local
|
run: bench new-site --mariadb-root-password root --admin-password admin frappe.local
|
||||||
- name: install school app
|
- name: install lms app
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench --site frappe.local install-app school
|
run: bench --site frappe.local install-app lms
|
||||||
- name: setup requirements
|
- name: setup requirements
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench setup requirements --dev
|
run: bench setup requirements --dev
|
||||||
@@ -77,5 +77,5 @@ jobs:
|
|||||||
run: bench --site frappe.local build
|
run: bench --site frappe.local build
|
||||||
- name: run tests
|
- name: run tests
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench --site frappe.local run-tests --app school
|
run: bench --site frappe.local run-tests --app lms
|
||||||
|
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -3,8 +3,8 @@
|
|||||||
*.egg-info
|
*.egg-info
|
||||||
*.swp
|
*.swp
|
||||||
tags
|
tags
|
||||||
school/docs/current
|
lms/docs/current
|
||||||
school/public/dist
|
lms/public/dist
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
*$py.class
|
*$py.class
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
1. Go to the apps/school directory of your installation and execute git pull --unshallow to ensure that you have the full git repository. Also fork the frappe/school repository on GitHub.
|
1. Go to the apps/lms directory of your installation and execute git pull --unshallow to ensure that you have the full git repository. Also fork the frappe/lms repository on GitHub.
|
||||||
1. Check out a working branch in git (e.g. git checkout -b my-new-branch).
|
1. Check out a working branch in git (e.g. git checkout -b my-new-branch).
|
||||||
1. Make your proposed changes to the source
|
1. Make your proposed changes to the source
|
||||||
1. Run your local version (e.g. bench start in your bench installation). Make sure that your changes work the way you want them to.
|
1. Run your local version (e.g. bench start in your bench installation). Make sure that your changes work the way you want them to.
|
||||||
|
|||||||
24
MANIFEST.in
24
MANIFEST.in
@@ -4,15 +4,15 @@ include *.json
|
|||||||
include *.md
|
include *.md
|
||||||
include *.py
|
include *.py
|
||||||
include *.txt
|
include *.txt
|
||||||
recursive-include school *.css
|
recursive-include lms *.css
|
||||||
recursive-include school *.csv
|
recursive-include lms *.csv
|
||||||
recursive-include school *.html
|
recursive-include lms *.html
|
||||||
recursive-include school *.ico
|
recursive-include lms *.ico
|
||||||
recursive-include school *.js
|
recursive-include lms *.js
|
||||||
recursive-include school *.json
|
recursive-include lms *.json
|
||||||
recursive-include school *.md
|
recursive-include lms *.md
|
||||||
recursive-include school *.png
|
recursive-include lms *.png
|
||||||
recursive-include school *.py
|
recursive-include lms *.py
|
||||||
recursive-include school *.svg
|
recursive-include lms *.svg
|
||||||
recursive-include school *.txt
|
recursive-include lms *.txt
|
||||||
recursive-exclude school *.pyc
|
recursive-exclude lms *.pyc
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
## School
|
## LMS
|
||||||
|
|
||||||
Create online courses without much hassle.
|
Create online courses without much hassle.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ To setup the repository locally follow the steps mentioned below:
|
|||||||
|
|
||||||
1. Install bench and setup a frappe-bench directory by following the [Installation Steps](https://frappeframework.com/docs/user/en/installation).
|
1. Install bench and setup a frappe-bench directory by following the [Installation Steps](https://frappeframework.com/docs/user/en/installation).
|
||||||
1. Start the server by running bench start.
|
1. Start the server by running bench start.
|
||||||
1. In a separate terminal window, create a new site by running bench new-site school.test.
|
1. In a separate terminal window, create a new site by running bench new-site lms.test.
|
||||||
1. Fork the school app
|
1. Fork the LMS app
|
||||||
1. Run bench get-app <url-of-your-form>.
|
1. Run bench get-app <url-of-your-form>.
|
||||||
1. Run bench --site school.test install-app school.
|
1. Run bench --site lms.test install-app lms.
|
||||||
1. Map your site to localhost with the command ```bench --site school.test add-to-hosts```
|
1. Map your site to localhost with the command ```bench --site lms.test add-to-hosts```
|
||||||
1. Now open the URL http://school.test:8000/ in your browser, you should see the app running.
|
1. Now open the URL http://lms.test:8000/ in your browser, you should see the app running.
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ services:
|
|||||||
bench:
|
bench:
|
||||||
image: anandology/frappe-bench:2021.10
|
image: anandology/frappe-bench:2021.10
|
||||||
volumes:
|
volumes:
|
||||||
- .:/opt/frappe-bench/apps/school
|
- .:/opt/frappe-bench/apps/lms
|
||||||
environment:
|
environment:
|
||||||
- FRAPPE_APPS=school
|
- FRAPPE_APPS=lms
|
||||||
- FRAPPE_ALLOW_TESTS=true
|
- FRAPPE_ALLOW_TESTS=true
|
||||||
- FRAPPE_SITE_NAME=frappe.localhost
|
- FRAPPE_SITE_NAME=frappe.localhost
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
**Step 1:** Clone the repo
|
**Step 1:** Clone the repo
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone https://github.com/frappe/school.git
|
$ git clone https://github.com/frappe/lms.git
|
||||||
|
|
||||||
$ cd school
|
$ cd lms
|
||||||
```
|
```
|
||||||
|
|
||||||
**Step 2:** Run docker-compose
|
**Step 2:** Run docker-compose
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from . import __version__ as app_version
|
from . import __version__ as app_version
|
||||||
|
|
||||||
app_name = "school"
|
app_name = "lms"
|
||||||
app_title = "School"
|
app_title = "LMS"
|
||||||
app_publisher = "Frappe"
|
app_publisher = "Frappe"
|
||||||
app_description = "School"
|
app_description = "LMS App"
|
||||||
app_icon = "octicon octicon-file-directory"
|
app_icon = "octicon octicon-file-directory"
|
||||||
app_color = "grey"
|
app_color = "grey"
|
||||||
app_email = "school@frappe.io"
|
app_email = "school@frappe.io"
|
||||||
@@ -15,16 +15,16 @@ app_license = "AGPL"
|
|||||||
# ------------------
|
# ------------------
|
||||||
|
|
||||||
# include js, css files in header of desk.html
|
# include js, css files in header of desk.html
|
||||||
# app_include_css = "/assets/school/css/school.css"
|
# app_include_css = "/assets/lms/css/lms.css"
|
||||||
# app_include_js = "/assets/school/js/school.js"
|
# app_include_js = "/assets/lms/js/lms.js"
|
||||||
|
|
||||||
# include js, css files in header of web template
|
# include js, css files in header of web template
|
||||||
web_include_css = "school.bundle.css"
|
web_include_css = "lms.bundle.css"
|
||||||
# web_include_css = "/assets/school/css/school.css"
|
# web_include_css = "/assets/lms/css/lms.css"
|
||||||
web_include_js = "website.bundle.js"
|
web_include_js = "website.bundle.js"
|
||||||
|
|
||||||
# include custom scss in every website theme (without file extension ".scss")
|
# include custom scss in every website theme (without file extension ".scss")
|
||||||
# website_theme_scss = "school/public/scss/website"
|
# website_theme_scss = "lms/public/scss/website"
|
||||||
|
|
||||||
# include js, css files in header of web form
|
# include js, css files in header of web form
|
||||||
# webform_include_js = {"doctype": "public/js/doctype.js"}
|
# webform_include_js = {"doctype": "public/js/doctype.js"}
|
||||||
@@ -59,14 +59,14 @@ web_include_js = "website.bundle.js"
|
|||||||
# Installation
|
# Installation
|
||||||
# ------------
|
# ------------
|
||||||
|
|
||||||
# before_install = "school.install.before_install"
|
# before_install = "lms.install.before_install"
|
||||||
# after_install = "school.install.after_install"
|
# after_install = "lms.install.after_install"
|
||||||
|
|
||||||
# Desk Notifications
|
# Desk Notifications
|
||||||
# ------------------
|
# ------------------
|
||||||
# See frappe.core.notifications.get_notification_config
|
# See frappe.core.notifications.get_notification_config
|
||||||
|
|
||||||
# notification_config = "school.notifications.get_notification_config"
|
# notification_config = "lms.notifications.get_notification_config"
|
||||||
|
|
||||||
# Permissions
|
# Permissions
|
||||||
# -----------
|
# -----------
|
||||||
@@ -85,8 +85,8 @@ web_include_js = "website.bundle.js"
|
|||||||
# Override standard doctype classes
|
# Override standard doctype classes
|
||||||
|
|
||||||
override_doctype_class = {
|
override_doctype_class = {
|
||||||
"User": "school.overrides.user.CustomUser",
|
"User": "lms.overrides.user.CustomUser",
|
||||||
"Web Template": "school.overrides.web_template.CustomWebTemplate"
|
"Web Template": "lms.overrides.web_template.CustomWebTemplate"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Document Events
|
# Document Events
|
||||||
@@ -110,20 +110,20 @@ fixtures = ["Custom Field", "Function", "Industry"]
|
|||||||
# Testing
|
# Testing
|
||||||
# -------
|
# -------
|
||||||
|
|
||||||
# before_tests = "school.install.before_tests"
|
# before_tests = "lms.install.before_tests"
|
||||||
|
|
||||||
# Overriding Methods
|
# Overriding Methods
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
#
|
#
|
||||||
# override_whitelisted_methods = {
|
# override_whitelisted_methods = {
|
||||||
# "frappe.desk.doctype.event.event.get_events": "school.event.get_events"
|
# "frappe.desk.doctype.event.event.get_events": "lms.event.get_events"
|
||||||
# }
|
# }
|
||||||
#
|
#
|
||||||
# each overriding function accepts a `data` argument;
|
# each overriding function accepts a `data` argument;
|
||||||
# generated from the base implementation of the doctype dashboard,
|
# generated from the base implementation of the doctype dashboard,
|
||||||
# along with any modifications made in other Frappe apps
|
# along with any modifications made in other Frappe apps
|
||||||
# override_doctype_dashboards = {
|
# override_doctype_dashboards = {
|
||||||
# "Task": "school.task.get_dashboard_data"
|
# "Task": "lms.task.get_dashboard_data"
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# exempt linked doctypes from being automatically cancelled
|
# exempt linked doctypes from being automatically cancelled
|
||||||
@@ -156,54 +156,54 @@ website_redirects = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
update_website_context = [
|
update_website_context = [
|
||||||
'school.widgets.update_website_context',
|
'lms.widgets.update_website_context',
|
||||||
]
|
]
|
||||||
|
|
||||||
jinja = {
|
jinja = {
|
||||||
"methods": [
|
"methods": [
|
||||||
"school.page_renderers.get_profile_url",
|
"lms.page_renderers.get_profile_url",
|
||||||
"school.overrides.user.get_enrolled_courses",
|
"lms.overrides.user.get_enrolled_courses",
|
||||||
"school.overrides.user.get_course_membership",
|
"lms.overrides.user.get_course_membership",
|
||||||
"school.overrides.user.get_authored_courses",
|
"lms.overrides.user.get_authored_courses",
|
||||||
"school.overrides.user.get_palette",
|
"lms.overrides.user.get_palette",
|
||||||
"school.lms.utils.get_membership",
|
"lms.lms.utils.get_membership",
|
||||||
"school.lms.utils.get_lessons",
|
"lms.lms.utils.get_lessons",
|
||||||
"school.lms.utils.get_tags",
|
"lms.lms.utils.get_tags",
|
||||||
"school.lms.utils.get_instructors",
|
"lms.lms.utils.get_instructors",
|
||||||
"school.lms.utils.get_students",
|
"lms.lms.utils.get_students",
|
||||||
"school.lms.utils.get_average_rating",
|
"lms.lms.utils.get_average_rating",
|
||||||
"school.lms.utils.is_certified",
|
"lms.lms.utils.is_certified",
|
||||||
"school.lms.utils.get_lesson_index",
|
"lms.lms.utils.get_lesson_index",
|
||||||
"school.lms.utils.get_lesson_url",
|
"lms.lms.utils.get_lesson_url",
|
||||||
"school.lms.utils.get_chapters",
|
"lms.lms.utils.get_chapters",
|
||||||
"school.lms.utils.get_slugified_chapter_title",
|
"lms.lms.utils.get_slugified_chapter_title",
|
||||||
"school.lms.utils.get_progress",
|
"lms.lms.utils.get_progress",
|
||||||
"school.lms.utils.render_html",
|
"lms.lms.utils.render_html",
|
||||||
"school.lms.utils.is_mentor",
|
"lms.lms.utils.is_mentor",
|
||||||
"school.lms.utils.is_cohort_staff",
|
"lms.lms.utils.is_cohort_staff",
|
||||||
"school.lms.utils.get_mentors",
|
"lms.lms.utils.get_mentors",
|
||||||
"school.lms.utils.get_reviews",
|
"lms.lms.utils.get_reviews",
|
||||||
"school.lms.utils.is_eligible_to_review",
|
"lms.lms.utils.is_eligible_to_review",
|
||||||
"school.lms.utils.get_initial_members",
|
"lms.lms.utils.get_initial_members",
|
||||||
"school.lms.utils.get_sorted_reviews",
|
"lms.lms.utils.get_sorted_reviews",
|
||||||
"school.lms.utils.is_instructor",
|
"lms.lms.utils.is_instructor",
|
||||||
"school.lms.utils.convert_number_to_character",
|
"lms.lms.utils.convert_number_to_character",
|
||||||
"school.lms.utils.get_signup_optin_checks",
|
"lms.lms.utils.get_signup_optin_checks",
|
||||||
"school.lms.utils.get_popular_courses"
|
"lms.lms.utils.get_popular_courses"
|
||||||
],
|
],
|
||||||
"filters": []
|
"filters": []
|
||||||
}
|
}
|
||||||
## Specify the additional tabs to be included in the user profile page.
|
## Specify the additional tabs to be included in the user profile page.
|
||||||
## Each entry must be a subclass of school.school.plugins.ProfileTab
|
## Each entry must be a subclass of lms.lms.plugins.ProfileTab
|
||||||
# profile_tabs = []
|
# profile_tabs = []
|
||||||
|
|
||||||
## Specify the extension to be used to control what scripts and stylesheets
|
## Specify the extension to be used to control what scripts and stylesheets
|
||||||
## to be included in lesson pages. The specified value must be be a
|
## to be included in lesson pages. The specified value must be be a
|
||||||
## subclass of school.plugins.PageExtension
|
## subclass of lms.plugins.PageExtension
|
||||||
# school_lesson_page_extension = None
|
# lms_lesson_page_extension = None
|
||||||
|
|
||||||
#school_lesson_page_extensions = [
|
#lms_lesson_page_extensions = [
|
||||||
# "school.plugins.LiveCodeExtension"
|
# "lms.plugins.LiveCodeExtension"
|
||||||
#]
|
#]
|
||||||
|
|
||||||
profile_mandatory_fields = [
|
profile_mandatory_fields = [
|
||||||
@@ -227,23 +227,23 @@ profile_mandatory_fields = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
## Markdown Macros for Lessons
|
## Markdown Macros for Lessons
|
||||||
school_markdown_macro_renderers = {
|
lms_markdown_macro_renderers = {
|
||||||
"Exercise": "school.plugins.exercise_renderer",
|
"Exercise": "lms.plugins.exercise_renderer",
|
||||||
"Quiz": "school.plugins.quiz_renderer",
|
"Quiz": "lms.plugins.quiz_renderer",
|
||||||
"YouTubeVideo": "school.plugins.youtube_video_renderer",
|
"YouTubeVideo": "lms.plugins.youtube_video_renderer",
|
||||||
"Video": "school.plugins.video_renderer",
|
"Video": "lms.plugins.video_renderer",
|
||||||
"Assignment": "school.plugins.assignment_renderer"
|
"Assignment": "lms.plugins.assignment_renderer"
|
||||||
}
|
}
|
||||||
|
|
||||||
# page_renderer to manage profile pages
|
# page_renderer to manage profile pages
|
||||||
page_renderer = [
|
page_renderer = [
|
||||||
"school.page_renderers.ProfileRedirectPage",
|
"lms.page_renderers.ProfileRedirectPage",
|
||||||
"school.page_renderers.ProfilePage"
|
"lms.page_renderers.ProfilePage"
|
||||||
]
|
]
|
||||||
|
|
||||||
# set this to "/" to have profiles on the top-level
|
# set this to "/" to have profiles on the top-level
|
||||||
profile_url_prefix = "/users/"
|
profile_url_prefix = "/users/"
|
||||||
|
|
||||||
signup_form_template = "school.plugins.show_custom_signup"
|
signup_form_template = "lms.plugins.show_custom_signup"
|
||||||
|
|
||||||
on_login = "school.overrides.user.set_country_from_ip"
|
on_login = "lms.overrides.user.set_country_from_ip"
|
||||||
@@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from ...md import find_macros
|
from ...md import find_macros
|
||||||
from school.lms.utils import get_course_progress, get_lesson_url
|
from lms.lms.utils import get_course_progress, get_lesson_url
|
||||||
|
|
||||||
class CourseLesson(Document):
|
class CourseLesson(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from school.lms.utils import get_membership
|
from lms.lms.utils import get_membership
|
||||||
|
|
||||||
class Exercise(Document):
|
class Exercise(Document):
|
||||||
def get_user_submission(self):
|
def get_user_submission(self):
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user