fix: conflicts
This commit is contained in:
@@ -26,4 +26,4 @@ indent_style = tab
|
||||
|
||||
# HTML, CSS, javascript, JSON and YAML
|
||||
[*.{html,css,js,json,yml,yaml}]
|
||||
indent_size = 2
|
||||
indent_size = 4
|
||||
|
||||
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -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 --site frappe.local install-app school
|
||||
run: bench --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
|
||||
|
||||
|
||||
19
.github/workflows/semantic.yml
vendored
Normal file
19
.github/workflows/semantic.yml
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
name: Semantic Pull Request
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request: {}
|
||||
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
semantic:
|
||||
name: Validate PR title
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: zeke/semantic-pull-requests@main
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
24
MANIFEST.in
24
MANIFEST.in
@@ -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
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
## School
|
||||
## LMS
|
||||
|
||||
Create online courses without much hassle.
|
||||
|
||||

|
||||

|
||||
|
||||
## 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. 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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -80,10 +80,10 @@
|
||||
"in_standard_filter": 0,
|
||||
"insert_after": "country",
|
||||
"is_virtual": 0,
|
||||
"label": "Acceptance for Terms of Use and/or Privacy Policy",
|
||||
"label": "Acceptance for Terms and/or Policies",
|
||||
"length": 0,
|
||||
"mandatory_depends_on": null,
|
||||
"modified": "2021-12-31 19:15:34.932910",
|
||||
"modified": "2021-12-31 19:15:34.932911",
|
||||
"module": null,
|
||||
"name": "User-verify_terms",
|
||||
"no_copy": 0,
|
||||
@@ -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"
|
||||
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 = "school.bundle.css"
|
||||
# web_include_css = "/assets/school/css/school.css"
|
||||
web_include_css = "lms.bundle.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_js = "website.bundle.js"
|
||||
# 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_js = "website.bundle.js"
|
||||
# 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", "Function", "Industry"]
|
||||
# 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
|
||||
@@ -156,50 +156,54 @@ website_redirects = [
|
||||
]
|
||||
|
||||
update_website_context = [
|
||||
'school.widgets.update_website_context',
|
||||
'lms.widgets.update_website_context',
|
||||
]
|
||||
|
||||
jinja = {
|
||||
"methods": [
|
||||
"school.page_renderers.get_profile_url",
|
||||
"school.overrides.user.get_authored_courses",
|
||||
"school.overrides.user.get_palette",
|
||||
"school.lms.utils.get_membership",
|
||||
"school.lms.utils.get_lessons",
|
||||
"school.lms.utils.get_tags",
|
||||
"school.lms.utils.get_instructors",
|
||||
"school.lms.utils.get_students",
|
||||
"school.lms.utils.get_average_rating",
|
||||
"school.lms.utils.is_certified",
|
||||
"school.lms.utils.get_lesson_index",
|
||||
"school.lms.utils.get_lesson_url",
|
||||
"school.lms.utils.get_chapters",
|
||||
"school.lms.utils.get_slugified_chapter_title",
|
||||
"school.lms.utils.get_progress",
|
||||
"school.lms.utils.render_html",
|
||||
"school.lms.utils.is_mentor",
|
||||
"school.lms.utils.is_cohort_staff",
|
||||
"school.lms.utils.get_mentors",
|
||||
"school.lms.utils.get_reviews",
|
||||
"school.lms.utils.is_eligible_to_review",
|
||||
"school.lms.utils.get_initial_members",
|
||||
"school.lms.utils.get_sorted_reviews",
|
||||
"school.lms.utils.is_instructor",
|
||||
"school.lms.utils.convert_number_to_character"
|
||||
"lms.page_renderers.get_profile_url",
|
||||
"lms.overrides.user.get_enrolled_courses",
|
||||
"lms.overrides.user.get_course_membership",
|
||||
"lms.overrides.user.get_authored_courses",
|
||||
"lms.overrides.user.get_palette",
|
||||
"lms.lms.utils.get_membership",
|
||||
"lms.lms.utils.get_lessons",
|
||||
"lms.lms.utils.get_tags",
|
||||
"lms.lms.utils.get_instructors",
|
||||
"lms.lms.utils.get_students",
|
||||
"lms.lms.utils.get_average_rating",
|
||||
"lms.lms.utils.is_certified",
|
||||
"lms.lms.utils.get_lesson_index",
|
||||
"lms.lms.utils.get_lesson_url",
|
||||
"lms.lms.utils.get_chapters",
|
||||
"lms.lms.utils.get_slugified_chapter_title",
|
||||
"lms.lms.utils.get_progress",
|
||||
"lms.lms.utils.render_html",
|
||||
"lms.lms.utils.is_mentor",
|
||||
"lms.lms.utils.is_cohort_staff",
|
||||
"lms.lms.utils.get_mentors",
|
||||
"lms.lms.utils.get_reviews",
|
||||
"lms.lms.utils.is_eligible_to_review",
|
||||
"lms.lms.utils.get_initial_members",
|
||||
"lms.lms.utils.get_sorted_reviews",
|
||||
"lms.lms.utils.is_instructor",
|
||||
"lms.lms.utils.convert_number_to_character",
|
||||
"lms.lms.utils.get_signup_optin_checks",
|
||||
"lms.lms.utils.get_popular_courses"
|
||||
],
|
||||
"filters": []
|
||||
}
|
||||
## 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_lesson_page_extension = None
|
||||
|
||||
#school_lesson_page_extensions = [
|
||||
# "school.plugins.LiveCodeExtension"
|
||||
#lms_lesson_page_extensions = [
|
||||
# "lms.plugins.LiveCodeExtension"
|
||||
#]
|
||||
|
||||
profile_mandatory_fields = [
|
||||
@@ -223,23 +227,23 @@ profile_mandatory_fields = [
|
||||
]
|
||||
|
||||
## 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",
|
||||
"Assignment": "school.plugins.assignment_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",
|
||||
"Assignment": "lms.plugins.assignment_renderer"
|
||||
}
|
||||
|
||||
# page_renderer to manage profile pages
|
||||
page_renderer = [
|
||||
"school.page_renderers.ProfileRedirectPage",
|
||||
"school.page_renderers.ProfilePage"
|
||||
"lms.page_renderers.ProfileRedirectPage",
|
||||
"lms.page_renderers.ProfilePage"
|
||||
]
|
||||
|
||||
# set this to "/" to have profiles on the top-level
|
||||
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"
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"actions": [],
|
||||
"autoname": "hash",
|
||||
"creation": "2021-07-27 16:25:02.903245",
|
||||
"doctype": "DocType",
|
||||
"editable_grid": 1,
|
||||
@@ -20,13 +21,15 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"istable": 1,
|
||||
"links": [],
|
||||
"modified": "2021-09-30 10:35:30.014950",
|
||||
"modified": "2022-03-15 09:39:41.937565",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Chapter Reference",
|
||||
"naming_rule": "Random",
|
||||
"owner": "Administrator",
|
||||
"permissions": [],
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
@@ -59,7 +59,7 @@
|
||||
"link_fieldname": "chapter"
|
||||
}
|
||||
],
|
||||
"modified": "2021-09-29 15:33:44.611229",
|
||||
"modified": "2022-03-14 17:57:00.707416",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Course Chapter",
|
||||
@@ -77,11 +77,26 @@
|
||||
"role": "System Manager",
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"if_owner": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "All",
|
||||
"select": 1,
|
||||
"share": 1,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"search_fields": "title",
|
||||
"show_title_field_in_link": 1,
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"title_field": "title",
|
||||
"track_changes": 1
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"actions": [],
|
||||
"allow_import": 1,
|
||||
"allow_events_in_timeline": 1,
|
||||
"allow_rename": 1,
|
||||
"autoname": "format:{####} {title}",
|
||||
"creation": "2021-05-03 06:21:12.995984",
|
||||
@@ -9,6 +9,7 @@
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"chapter",
|
||||
"course",
|
||||
"include_in_preview",
|
||||
"column_break_4",
|
||||
"title",
|
||||
@@ -69,11 +70,20 @@
|
||||
{
|
||||
"fieldname": "help",
|
||||
"fieldtype": "HTML"
|
||||
},
|
||||
{
|
||||
"fetch_from": "chapter.course",
|
||||
"fieldname": "course",
|
||||
"fieldtype": "Link",
|
||||
"hidden": 1,
|
||||
"label": "Course",
|
||||
"options": "LMS Course",
|
||||
"read_only": 1
|
||||
}
|
||||
],
|
||||
"index_web_pages_for_search": 1,
|
||||
"links": [],
|
||||
"modified": "2021-10-11 15:07:38.134808",
|
||||
"modified": "2022-03-14 18:56:31.969801",
|
||||
"modified_by": "Administrator",
|
||||
"module": "LMS",
|
||||
"name": "Course Lesson",
|
||||
@@ -89,11 +99,26 @@
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "System Manager",
|
||||
"select": 1,
|
||||
"share": 1,
|
||||
"write": 1
|
||||
},
|
||||
{
|
||||
"create": 1,
|
||||
"email": 1,
|
||||
"export": 1,
|
||||
"if_owner": 1,
|
||||
"print": 1,
|
||||
"read": 1,
|
||||
"report": 1,
|
||||
"role": "All",
|
||||
"select": 1,
|
||||
"share": 1,
|
||||
"write": 1
|
||||
}
|
||||
],
|
||||
"sort_field": "modified",
|
||||
"sort_order": "DESC",
|
||||
"states": [],
|
||||
"track_changes": 1
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from ...md import find_macros
|
||||
from school.lms.utils import get_course_progress
|
||||
from lms.lms.utils import get_course_progress, get_lesson_url
|
||||
|
||||
class CourseLesson(Document):
|
||||
def validate(self):
|
||||
@@ -108,3 +108,7 @@ def save_progress(lesson, course, status):
|
||||
progress = get_course_progress(course)
|
||||
frappe.db.set_value("LMS Batch Membership", membership, "progress", progress)
|
||||
return progress
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_lesson_info(chapter):
|
||||
return frappe.db.get_value("Course Chapter", chapter, "course")
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import frappe
|
||||
from frappe.model.document import Document
|
||||
from school.lms.utils import get_membership
|
||||
from lms.lms.utils import get_membership
|
||||
|
||||
class Exercise(Document):
|
||||
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