Merge pull request #321 from pateljannat/version-13-lms

This commit is contained in:
Jannat Patel
2022-04-04 12:01:18 +05:30
committed by GitHub
485 changed files with 148 additions and 4004 deletions

View File

@@ -57,15 +57,15 @@ jobs:
mkdir -p ~/bench-cache
(cd && tar czf ~/bench-cache/bench.tgz frappe-bench)
fi
- name: add school app to bench
- name: add lms app to 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
working-directory: /home/runner/frappe-bench
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
run: bench --verbose --site frappe.local install-app school
run: bench --verbose --site frappe.local install-app lms
- name: setup requirements
working-directory: /home/runner/frappe-bench
run: bench setup requirements --dev
@@ -77,5 +77,5 @@ jobs:
run: bench --site frappe.local build
- name: run tests
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
View File

@@ -3,8 +3,8 @@
*.egg-info
*.swp
tags
school/docs/current
school/public/dist
lms/docs/current
lms/public/dist
__pycache__/
*.py[cod]
*$py.class

View File

@@ -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. 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.

View File

@@ -4,15 +4,15 @@ include *.json
include *.md
include *.py
include *.txt
recursive-include school *.css
recursive-include school *.csv
recursive-include school *.html
recursive-include school *.ico
recursive-include school *.js
recursive-include school *.json
recursive-include school *.md
recursive-include school *.png
recursive-include school *.py
recursive-include school *.svg
recursive-include school *.txt
recursive-exclude school *.pyc
recursive-include lms *.css
recursive-include lms *.csv
recursive-include lms *.html
recursive-include lms *.ico
recursive-include lms *.js
recursive-include lms *.json
recursive-include lms *.md
recursive-include lms *.png
recursive-include lms *.py
recursive-include lms *.svg
recursive-include lms *.txt
recursive-exclude lms *.pyc

View File

@@ -1,8 +1,8 @@
## School
## LMS
Create online courses without much hassle.
![Course Home](/school/public/images/course-home.png)
![Course Home](/lms/public/images/course-home.png)
## Features

View File

@@ -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. 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. Fork the school app
1. In a separate terminal window, create a new site by running bench new-site lms.test.
1. Fork the lms app
1. Run bench get-app <url-of-your-form>.
1. Run bench --site school.test install-app school.
1. Map your site to localhost with the command ```bench --site school.test add-to-hosts```
1. Now open the URL http://school.test:8000/ in your browser, you should see the app running.
1. Run bench --site lms.test install-app lms.
1. Map your site to localhost with the command ```bench --site lms.test add-to-hosts```
1. Now open the URL http://lms.test:8000/ in your browser, you should see the app running.

View File

@@ -11,9 +11,9 @@ services:
bench:
image: anandology/frappe-bench:2021.10
volumes:
- .:/opt/frappe-bench/apps/school
- .:/opt/frappe-bench/apps/lms
environment:
- FRAPPE_APPS=school
- FRAPPE_APPS=lms
- FRAPPE_ALLOW_TESTS=true
- FRAPPE_SITE_NAME=frappe.localhost
depends_on:

View File

@@ -1,9 +1,9 @@
**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

View File

@@ -2,10 +2,10 @@
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "school"
app_title = "School"
app_name = "lms"
app_title = "LMS"
app_publisher = "Frappe"
app_description = "School"
app_description = "LMS"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "school@frappe.io"
@@ -15,16 +15,16 @@ app_license = "AGPL"
# ------------------
# include js, css files in header of desk.html
# app_include_css = "/assets/school/css/school.css"
# app_include_js = "/assets/school/js/school.js"
# app_include_css = "/assets/lms/css/lms.css"
# app_include_js = "/assets/lms/js/lms.js"
# include js, css files in header of web template
web_include_css = "/assets/css/school.css"
# web_include_css = "/assets/school/css/school.css"
web_include_css = "/assets/css/lms.css"
# web_include_css = "/assets/lms/css/lms.css"
#web_include_js = "website.bundle.js"
# 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
# webform_include_js = {"doctype": "public/js/doctype.js"}
@@ -59,14 +59,14 @@ web_include_css = "/assets/css/school.css"
# Installation
# ------------
# before_install = "school.install.before_install"
# after_install = "school.install.after_install"
# before_install = "lms.install.before_install"
# after_install = "lms.install.after_install"
# Desk Notifications
# ------------------
# See frappe.core.notifications.get_notification_config
# notification_config = "school.notifications.get_notification_config"
# notification_config = "lms.notifications.get_notification_config"
# Permissions
# -----------
@@ -85,8 +85,8 @@ web_include_css = "/assets/css/school.css"
# Override standard doctype classes
override_doctype_class = {
"User": "school.overrides.user.CustomUser",
"Web Template": "school.overrides.web_template.CustomWebTemplate"
"User": "lms.overrides.user.CustomUser",
"Web Template": "lms.overrides.web_template.CustomWebTemplate"
}
# Document Events
@@ -110,20 +110,20 @@ fixtures = ["Custom Field"]
# Testing
# -------
# before_tests = "school.install.before_tests"
# before_tests = "lms.install.before_tests"
# Overriding 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;
# generated from the base implementation of the doctype dashboard,
# along with any modifications made in other Frappe apps
# override_doctype_dashboards = {
# "Task": "school.task.get_dashboard_data"
# "Task": "lms.task.get_dashboard_data"
# }
# exempt linked doctypes from being automatically cancelled
@@ -149,28 +149,28 @@ website_redirects = [
]
update_website_context = [
'school.widgets.update_website_context',
'lms.widgets.update_website_context',
]
## 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 = []
## 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
## subclass of school.plugins.PageExtension
# school_lesson_page_extension = None
## subclass of lms.plugins.PageExtension
# lms = None
#school_lesson_page_extensions = [
# "school.plugins.LiveCodeExtension"
#lms_lesson_page_extensions = [
# "lms.plugins.LiveCodeExtension"
#]
## Markdown Macros for Lessons
school_markdown_macro_renderers = {
"Exercise": "school.plugins.exercise_renderer",
"Quiz": "school.plugins.quiz_renderer",
"YouTubeVideo": "school.plugins.youtube_video_renderer",
"Video": "school.plugins.video_renderer"
lms_markdown_macro_renderers = {
"Exercise": "lms.plugins.exercise_renderer",
"Quiz": "lms.plugins.quiz_renderer",
"YouTubeVideo": "lms.plugins.youtube_video_renderer",
"Video": "lms.plugins.video_renderer"
}
# set this to "/" to have profiles on the top-level

View File

@@ -2,7 +2,7 @@
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
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 unittest

View File

@@ -6,8 +6,8 @@ from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
from school.lms.doctype.lms_batch_membership.lms_batch_membership import create_membership
from school.query import find, find_all
from lms.lms.doctype.lms_batch_membership.lms_batch_membership import create_membership
from lms.query import find, find_all
class LMSBatch(Document):
def validate(self):

View File

@@ -1,7 +1,7 @@
{
"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",
"group": "Reindex",
"label": "Reindex Exercises"
@@ -192,4 +192,4 @@
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1
}
}

View File

@@ -7,7 +7,7 @@ import frappe
from frappe.model.document import Document
import json
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 ...utils import slugify
@@ -380,7 +380,7 @@ def search_course(text):
""" for course in courses:
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"),
"courses": search_courses,
"widgets": Widgets()

Some files were not shown because too many files have changed in this diff Show More