Compare commits
12 Commits
v2.16.0
...
version-13
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f38b1226df | ||
|
|
1f3513db8b | ||
|
|
3eb0f13fb0 | ||
|
|
1277133ec6 | ||
|
|
7337aea0dc | ||
|
|
32b601cf34 | ||
|
|
d4dc901925 | ||
|
|
64e581533b | ||
|
|
0873d704d2 | ||
|
|
8ee57f0254 | ||
|
|
7c5021132d | ||
|
|
740c0d10ca |
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 --verbose --site frappe.local install-app school
|
run: bench --verbose --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_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 = "/assets/css/lms.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"]
|
|||||||
# 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
|
||||||
@@ -141,7 +141,7 @@ website_route_rules = [
|
|||||||
{"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
|
{"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
|
||||||
{"from_route": "/courses/<course>/progress", "to_route": "batch/progress"},
|
{"from_route": "/courses/<course>/progress", "to_route": "batch/progress"},
|
||||||
{"from_route": "/courses/<course>/join", "to_route": "batch/join"},
|
{"from_route": "/courses/<course>/join", "to_route": "batch/join"},
|
||||||
{"from_route": "/users", "to_route": "profiles/profile"}
|
{"from_route": "/users/<string(minlength=4):username>", "to_route": "profiles/profile"}
|
||||||
]
|
]
|
||||||
|
|
||||||
website_redirects = [
|
website_redirects = [
|
||||||
@@ -149,41 +149,29 @@ website_redirects = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
update_website_context = [
|
update_website_context = [
|
||||||
'school.widgets.update_website_context',
|
'lms.widgets.update_website_context',
|
||||||
]
|
]
|
||||||
|
|
||||||
jinja = {
|
|
||||||
"methods": [
|
|
||||||
"school.page_renderers.get_profile_url"
|
|
||||||
],
|
|
||||||
"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 = None
|
||||||
|
|
||||||
#school_lesson_page_extensions = [
|
#lms_lesson_page_extensions = [
|
||||||
# "school.plugins.LiveCodeExtension"
|
# "lms.plugins.LiveCodeExtension"
|
||||||
#]
|
#]
|
||||||
|
|
||||||
## 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"
|
||||||
}
|
}
|
||||||
|
|
||||||
# page_renderer to manage profile pages
|
|
||||||
page_renderer = [
|
|
||||||
"school.page_renderers.ProfileRedirectPage",
|
|
||||||
"school.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/"
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
# Copyright (c) 2021, FOSS United and Contributors
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
from school.lms.doctype.invite_request.invite_request import create_invite_request, update_invite
|
from lms.lms.doctype.invite_request.invite_request import create_invite_request, update_invite
|
||||||
import frappe
|
import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
@@ -6,8 +6,8 @@ from __future__ import unicode_literals
|
|||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe import _
|
from frappe import _
|
||||||
from school.lms.doctype.lms_batch_membership.lms_batch_membership import create_membership
|
from lms.lms.doctype.lms_batch_membership.lms_batch_membership import create_membership
|
||||||
from school.query import find, find_all
|
from lms.query import find, find_all
|
||||||
|
|
||||||
class LMSBatch(Document):
|
class LMSBatch(Document):
|
||||||
def validate(self):
|
def validate(self):
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"actions": [
|
"actions": [
|
||||||
{
|
{
|
||||||
"action": "school.lms.doctype.lms_course.lms_course.reindex_exercises",
|
"action": "lms.lms.doctype.lms_course.lms_course.reindex_exercises",
|
||||||
"action_type": "Server Action",
|
"action_type": "Server Action",
|
||||||
"group": "Reindex",
|
"group": "Reindex",
|
||||||
"label": "Reindex Exercises"
|
"label": "Reindex Exercises"
|
||||||
@@ -7,7 +7,7 @@ import frappe
|
|||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
import json
|
import json
|
||||||
from ...utils import slugify
|
from ...utils import slugify
|
||||||
from school.query import find, find_all
|
from lms.query import find, find_all
|
||||||
from frappe.utils import flt, cint
|
from frappe.utils import flt, cint
|
||||||
from ...utils import slugify
|
from ...utils import slugify
|
||||||
|
|
||||||
@@ -380,7 +380,7 @@ def search_course(text):
|
|||||||
""" for course in courses:
|
""" for course in courses:
|
||||||
search_courses.append(frappe.get_doc("LMS Course", course)) """
|
search_courses.append(frappe.get_doc("LMS Course", course)) """
|
||||||
|
|
||||||
""" template = frappe.render_template("school/templates/course_list.html", {
|
""" template = frappe.render_template("lms/templates/course_list.html", {
|
||||||
"title": _("Search Results"),
|
"title": _("Search Results"),
|
||||||
"courses": search_courses,
|
"courses": search_courses,
|
||||||
"widgets": Widgets()
|
"widgets": Widgets()
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user