Compare commits

...

49 Commits

Author SHA1 Message Date
Jannat Patel
f38b1226df Merge pull request #321 from pateljannat/version-13-lms 2022-04-04 12:01:18 +05:30
Jannat Patel
1f3513db8b fix: get_palette function call for avatar 2022-04-04 09:47:27 +05:30
Jannat Patel
3eb0f13fb0 fix: moved Avatar widget to lms module 2022-04-04 09:32:25 +05:30
Jannat Patel
1277133ec6 refactor: removed unused modules from modules.txt 2022-04-04 09:24:03 +05:30
Jannat Patel
7337aea0dc refactor: renamed school references to lms 2022-04-04 08:23:07 +05:30
Jannat Patel
32b601cf34 refactor: renamed school to lms 2022-04-01 20:11:07 +05:30
Jannat Patel
d4dc901925 fix: rectified css path in hooks 2021-12-06 17:47:55 +05:30
Jannat Patel
64e581533b fix: included build files through hooks 2021-12-06 17:36:46 +05:30
Jannat Patel
0873d704d2 fix: reverting to old build system 2021-12-06 16:33:23 +05:30
Jannat Patel
8ee57f0254 fix: remove page_renderer and references 2021-12-06 13:10:42 +05:30
Jannat Patel
7c5021132d fix: remove page renderer for profile page 2021-12-06 10:51:50 +05:30
Jannat Patel
740c0d10ca get profile url jinja function issue 2021-12-03 16:29:29 +05:30
Jannat Patel
a78019ccbc fix: mark as complete label 2021-12-01 18:59:29 +05:30
Jannat Patel
66f6c1fd46 Merge pull request #273 from pateljannat/testimonial-card-fix 2021-11-30 11:15:59 +05:30
Jannat Patel
aaa845a0f8 fix: testimonial cards height and shadows 2021-11-30 11:04:29 +05:30
Jannat Patel
2a56b7ade2 Merge pull request #270 from pateljannat/mark-as-complete 2021-11-29 16:29:21 +05:30
Jannat Patel
cf8be3ca21 style: discussons empty state and mark as complete message 2021-11-29 16:20:49 +05:30
Jannat Patel
715a1b5df5 fix: mark as complete behaviour 2021-11-29 16:02:59 +05:30
Jannat Patel
0a374a0e78 Merge pull request #269 from pateljannat/search-generic 2021-11-26 11:44:23 +05:30
Jannat Patel
36996a54a5 fix: search-settings 2021-11-26 11:34:10 +05:30
Jannat Patel
3f687e4c4a Merge pull request #265 from pateljannat/improve-notify-me-behaviour 2021-11-25 14:09:03 +05:30
Jannat Patel
315d373d2d fix: hide notify me button on callback 2021-11-25 13:06:12 +05:30
Jannat Patel
6ae346df44 fix: notify-me-ux 2021-11-23 22:28:07 +05:30
Jannat Patel
9582a27dc6 Merge pull request #264 from pateljannat/search-empty-state-improvements 2021-11-22 10:14:48 +05:30
Jannat Patel
6195d72c3c fix: indentation 2021-11-22 10:08:54 +05:30
Jannat Patel
3f0309c36a fix: search empty state improvements 2021-11-22 10:05:04 +05:30
Jannat Patel
08ea7401cc Merge pull request #263 from pateljannat/search-improvements 2021-11-19 19:44:55 +05:30
Jannat Patel
f3d7f09476 feat: search empty state 2021-11-19 19:12:19 +05:30
Jannat Patel
36150d5b09 fix: allow guests to search 2021-11-18 15:44:19 +05:30
Jannat Patel
e5deb2ddd7 Merge pull request #262 from pateljannat/testimonials 2021-11-18 15:25:33 +05:30
Jannat Patel
d60aa54903 fix: condition if testimonials are less than multiple of three 2021-11-18 15:12:41 +05:30
Jannat Patel
2627cee938 fix: increased margin above explore more link 2021-11-18 15:07:29 +05:30
Jannat Patel
e7f47a4485 fix: slider height 2021-11-18 10:09:11 +05:30
Jannat Patel
5bfe56c091 fix: slider 2021-11-17 20:34:10 +05:30
Jannat Patel
f08586ee12 feat: testimonials template 2021-11-16 19:32:05 +05:30
Jannat Patel
af17270c52 fix: back tracing result on search 2021-11-15 19:30:01 +05:30
Jannat Patel
06b4062003 Merge pull request #261 from pateljannat/search 2021-11-15 19:08:24 +05:30
Jannat Patel
6cba6972bc feat: search for courses 2021-11-15 19:00:23 +05:30
Jannat Patel
f7a23e629c fix: conflicts 2021-11-15 13:29:02 +05:30
Jannat Patel
e67b37be28 Merge pull request #260 from pateljannat/course-cards-cleanup 2021-11-12 19:35:52 +05:30
Jannat Patel
1fa7dfe41f fix: removed arrow interaction 2021-11-12 19:20:18 +05:30
Jannat Patel
e781071ebf Merge pull request #257 from pateljannat/empty-states 2021-11-12 18:48:12 +05:30
Jannat Patel
1697c5d5b5 feat: search bar on course list 2021-11-12 10:10:39 +05:30
Jannat Patel
091fefb601 fix: removed unused css variables 2021-11-11 09:48:11 +05:30
Jannat Patel
7939e6c619 style: course cards and templates 2021-11-10 17:08:46 +05:30
Jannat Patel
f8788dc32c fix: empty state logo and link style 2021-11-08 16:49:31 +05:30
Jannat Patel
4db51bff79 style: empty state for reviews 2021-11-04 22:03:26 +05:30
Jannat Patel
6f96da74c7 empty state for discussion 2021-11-02 18:27:52 +05:30
Jannat Patel
f1692763d3 Merge pull request #255 from pateljannat/fixes 2021-11-01 15:08:00 +05:30
490 changed files with 636 additions and 4191 deletions

View File

@@ -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
View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -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/"

View File

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

View File

@@ -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):

View File

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

View File

@@ -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
@@ -362,3 +362,28 @@ def reindex_exercises(doc):
course = frappe.get_doc("LMS Course", course_data['name']) course = frappe.get_doc("LMS Course", course_data['name'])
course.reindex_exercises() course.reindex_exercises()
frappe.msgprint("All exercises in this course have been re-indexed.") frappe.msgprint("All exercises in this course have been re-indexed.")
@frappe.whitelist(allow_guest=True)
def search_course(text):
search_courses = []
courses = frappe.get_all("LMS Course",
filters= {
"is_published": True
},
or_filters = {
"title": ["like", "%{0}%".format(text)],
"tags": ["like", "%{0}%".format(text)],
"short_introduction": ["like", "%{0}%".format(text)],
"description": ["like", "%{0}%".format(text)],
})
""" for course in courses:
search_courses.append(frappe.get_doc("LMS Course", course)) """
""" template = frappe.render_template("lms/templates/course_list.html", {
"title": _("Search Results"),
"courses": search_courses,
"widgets": Widgets()
}) """
return courses

View File

@@ -33,7 +33,7 @@
], ],
"index_web_pages_for_search": 1, "index_web_pages_for_search": 1,
"links": [], "links": [],
"modified": "2021-08-31 12:37:23.832131", "modified": "2021-11-16 17:23:50.697891",
"modified_by": "Administrator", "modified_by": "Administrator",
"module": "LMS", "module": "LMS",
"name": "LMS Course Review", "name": "LMS Course Review",
@@ -52,7 +52,9 @@
"write": 1 "write": 1
} }
], ],
"search_fields": "course",
"sort_field": "modified", "sort_field": "modified",
"sort_order": "DESC", "sort_order": "DESC",
"title_field": "course",
"track_changes": 1 "track_changes": 1
} }

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