Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5feeb4ca0c |
@@ -9,7 +9,7 @@ root = true
|
|||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
indent_style = tab
|
indent_style = space
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
@@ -26,4 +26,4 @@ indent_style = tab
|
|||||||
|
|
||||||
# HTML, CSS, javascript, JSON and YAML
|
# HTML, CSS, javascript, JSON and YAML
|
||||||
[*.{html,css,js,json,yml,yaml}]
|
[*.{html,css,js,json,yml,yaml}]
|
||||||
indent_size = 4
|
indent_size = 2
|
||||||
|
|||||||
37
.flake8
37
.flake8
@@ -1,37 +0,0 @@
|
|||||||
[flake8]
|
|
||||||
ignore =
|
|
||||||
E121,
|
|
||||||
E126,
|
|
||||||
E127,
|
|
||||||
E128,
|
|
||||||
E203,
|
|
||||||
E225,
|
|
||||||
E226,
|
|
||||||
E231,
|
|
||||||
E241,
|
|
||||||
E251,
|
|
||||||
E261,
|
|
||||||
E265,
|
|
||||||
E302,
|
|
||||||
E303,
|
|
||||||
E305,
|
|
||||||
E402,
|
|
||||||
E501,
|
|
||||||
E741,
|
|
||||||
W291,
|
|
||||||
W292,
|
|
||||||
W293,
|
|
||||||
W391,
|
|
||||||
W503,
|
|
||||||
W504,
|
|
||||||
F403,
|
|
||||||
B007,
|
|
||||||
B950,
|
|
||||||
W191,
|
|
||||||
E124, # closing bracket, irritating while writing QB code
|
|
||||||
E131, # continuation line unaligned for hanging indent
|
|
||||||
E123, # closing bracket does not match indentation of opening bracket's line
|
|
||||||
E101, # ensured by use of black
|
|
||||||
|
|
||||||
max-line-length = 200
|
|
||||||
exclude=.github/helper/semgrep_rules
|
|
||||||
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,20 +0,0 @@
|
|||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: ''
|
|
||||||
labels: ''
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
74
.github/helper/flake8.conf
vendored
74
.github/helper/flake8.conf
vendored
@@ -1,74 +0,0 @@
|
|||||||
[flake8]
|
|
||||||
ignore =
|
|
||||||
B001,
|
|
||||||
B007,
|
|
||||||
B009,
|
|
||||||
B010,
|
|
||||||
B950,
|
|
||||||
E101,
|
|
||||||
E111,
|
|
||||||
E114,
|
|
||||||
E116,
|
|
||||||
E117,
|
|
||||||
E121,
|
|
||||||
E122,
|
|
||||||
E123,
|
|
||||||
E124,
|
|
||||||
E125,
|
|
||||||
E126,
|
|
||||||
E127,
|
|
||||||
E128,
|
|
||||||
E131,
|
|
||||||
E201,
|
|
||||||
E202,
|
|
||||||
E203,
|
|
||||||
E211,
|
|
||||||
E221,
|
|
||||||
E222,
|
|
||||||
E223,
|
|
||||||
E224,
|
|
||||||
E225,
|
|
||||||
E226,
|
|
||||||
E228,
|
|
||||||
E231,
|
|
||||||
E241,
|
|
||||||
E242,
|
|
||||||
E251,
|
|
||||||
E261,
|
|
||||||
E262,
|
|
||||||
E265,
|
|
||||||
E266,
|
|
||||||
E271,
|
|
||||||
E272,
|
|
||||||
E273,
|
|
||||||
E274,
|
|
||||||
E301,
|
|
||||||
E302,
|
|
||||||
E303,
|
|
||||||
E305,
|
|
||||||
E306,
|
|
||||||
E402,
|
|
||||||
E501,
|
|
||||||
E502,
|
|
||||||
E701,
|
|
||||||
E702,
|
|
||||||
E703,
|
|
||||||
E741,
|
|
||||||
F401,
|
|
||||||
F403,
|
|
||||||
F405,
|
|
||||||
W191,
|
|
||||||
W291,
|
|
||||||
W292,
|
|
||||||
W293,
|
|
||||||
W391,
|
|
||||||
W503,
|
|
||||||
W504,
|
|
||||||
E711,
|
|
||||||
E129,
|
|
||||||
F841,
|
|
||||||
E713,
|
|
||||||
E712,
|
|
||||||
|
|
||||||
|
|
||||||
max-line-length = 200
|
|
||||||
41
.github/workflows/ci.yml
vendored
41
.github/workflows/ci.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
pull_request: {}
|
pull_request: {}
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
services:
|
services:
|
||||||
redis-cache:
|
redis-cache:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
@@ -32,50 +32,29 @@ jobs:
|
|||||||
- name: setup python
|
- name: setup python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: 3.9
|
||||||
- name: setup node
|
- name: setup node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14'
|
node-version: '12'
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: setup cache for bench
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ~/bench-cache
|
|
||||||
key: ${{ runner.os }}
|
|
||||||
- name: install bench
|
- name: install bench
|
||||||
run: |
|
run: pip3 install frappe-bench
|
||||||
pip3 install frappe-bench
|
|
||||||
which bench
|
|
||||||
- name: bench init
|
- name: bench init
|
||||||
run: |
|
run: bench init ~/frappe-bench --skip-redis-config-generation
|
||||||
if [ -d ~/bench-cache/bench.tgz ]
|
- name: add community app to bench
|
||||||
then
|
|
||||||
(cd && tar xzf ~/bench-cache/bench.tgz)
|
|
||||||
else
|
|
||||||
bench init ~/frappe-bench --skip-redis-config-generation --skip-assets --python "$(which python)"
|
|
||||||
mkdir -p ~/bench-cache
|
|
||||||
(cd && tar czf ~/bench-cache/bench.tgz frappe-bench)
|
|
||||||
fi
|
|
||||||
- name: add lms app to bench
|
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench get-app lms $GITHUB_WORKSPACE
|
run: bench get-app community $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 lms app
|
- name: install community app
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench --site frappe.local install-app lms
|
run: bench --site frappe.local install-app community
|
||||||
- name: setup requirements
|
|
||||||
working-directory: /home/runner/frappe-bench
|
|
||||||
run: bench setup requirements --dev
|
|
||||||
- name: allow tests
|
- name: allow tests
|
||||||
working-directory: /home/runner/frappe-bench
|
working-directory: /home/runner/frappe-bench
|
||||||
run: bench --site frappe.local set-config allow_tests true
|
run: bench --site frappe.local set-config allow_tests true
|
||||||
- name: bench build
|
|
||||||
working-directory: /home/runner/frappe-bench
|
|
||||||
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 lms
|
run: bench --site frappe.local run-tests --app community
|
||||||
|
|
||||||
|
|||||||
33
.github/workflows/linters.yml
vendored
33
.github/workflows/linters.yml
vendored
@@ -1,33 +0,0 @@
|
|||||||
name: Linters
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
linters:
|
|
||||||
name: Semantic Commits
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
|
|
||||||
- name: Install and Run Pre-commit
|
|
||||||
uses: pre-commit/action@v2.0.3
|
|
||||||
|
|
||||||
- name: Download Semgrep rules
|
|
||||||
run: git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-rules
|
|
||||||
|
|
||||||
- name: Download semgrep
|
|
||||||
run: pip install semgrep
|
|
||||||
|
|
||||||
- name: Run Semgrep rules
|
|
||||||
run: semgrep ci --config ./frappe-semgrep-rules/rules
|
|
||||||
19
.github/workflows/semantic.yml
vendored
19
.github/workflows/semantic.yml
vendored
@@ -1,19 +0,0 @@
|
|||||||
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
|
|
||||||
6
.gitignore
vendored
6
.gitignore
vendored
@@ -3,8 +3,4 @@
|
|||||||
*.egg-info
|
*.egg-info
|
||||||
*.swp
|
*.swp
|
||||||
tags
|
tags
|
||||||
lms/docs/current
|
community/docs/current
|
||||||
lms/public/dist
|
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
*$py.class
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
exclude: 'node_modules|.git'
|
|
||||||
default_stages: [commit]
|
|
||||||
fail_fast: false
|
|
||||||
|
|
||||||
repos:
|
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
||||||
rev: v4.3.0
|
|
||||||
hooks:
|
|
||||||
- id: trailing-whitespace
|
|
||||||
files: "frappe.*"
|
|
||||||
exclude: ".*json$|.*txt$|.*csv|.*md|.*svg"
|
|
||||||
- id: check-yaml
|
|
||||||
- id: no-commit-to-branch
|
|
||||||
args: ['--branch', 'main']
|
|
||||||
- id: check-merge-conflict
|
|
||||||
- id: check-ast
|
|
||||||
- id: check-json
|
|
||||||
- id: check-toml
|
|
||||||
- id: debug-statements
|
|
||||||
|
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
|
||||||
rev: v2.34.0
|
|
||||||
hooks:
|
|
||||||
- id: pyupgrade
|
|
||||||
args: ['--py310-plus']
|
|
||||||
|
|
||||||
- repo: https://github.com/adityahase/black
|
|
||||||
rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119
|
|
||||||
hooks:
|
|
||||||
- id: black
|
|
||||||
additional_dependencies: ['click==8.0.4']
|
|
||||||
|
|
||||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
|
||||||
rev: v2.7.1
|
|
||||||
hooks:
|
|
||||||
- id: prettier
|
|
||||||
types_or: [javascript]
|
|
||||||
# Ignore any files that might contain jinja / bundles
|
|
||||||
exclude: |
|
|
||||||
(?x)^(
|
|
||||||
lms/public/dist/.*|
|
|
||||||
.*node_modules.*|
|
|
||||||
.*boilerplate.*|
|
|
||||||
lms/www/website_script.js|
|
|
||||||
lms/templates/includes/.*|
|
|
||||||
lms/public/js/lib/.*
|
|
||||||
)$
|
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/flake8
|
|
||||||
rev: 5.0.4
|
|
||||||
hooks:
|
|
||||||
- id: flake8
|
|
||||||
additional_dependencies: ['flake8-bugbear',]
|
|
||||||
args: ['--config', '.github/helper/flake8.conf']
|
|
||||||
|
|
||||||
ci:
|
|
||||||
autoupdate_schedule: weekly
|
|
||||||
skip: []
|
|
||||||
submodules: false
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
|
|
||||||
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.
|
|
||||||
1. Commit your changes to your branch. Make sure to use a semantic commit message.
|
|
||||||
1. Push your branch to your fork on Github, and issue a pull request.
|
|
||||||
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 lms *.css
|
recursive-include community *.css
|
||||||
recursive-include lms *.csv
|
recursive-include community *.csv
|
||||||
recursive-include lms *.html
|
recursive-include community *.html
|
||||||
recursive-include lms *.ico
|
recursive-include community *.ico
|
||||||
recursive-include lms *.js
|
recursive-include community *.js
|
||||||
recursive-include lms *.json
|
recursive-include community *.json
|
||||||
recursive-include lms *.md
|
recursive-include community *.md
|
||||||
recursive-include lms *.png
|
recursive-include community *.png
|
||||||
recursive-include lms *.py
|
recursive-include community *.py
|
||||||
recursive-include lms *.svg
|
recursive-include community *.svg
|
||||||
recursive-include lms *.txt
|
recursive-include community *.txt
|
||||||
recursive-exclude lms *.pyc
|
recursive-exclude community *.pyc
|
||||||
103
README.md
103
README.md
@@ -1,90 +1,35 @@
|
|||||||
<p align="center">
|
## Community
|
||||||
<a href="https://www.frappelms.com/">
|
|
||||||
<img src="https://www.frappelms.com/files/flms.svg" alt="Frappe LMS" width="100" height="100">
|
|
||||||
</a>
|
|
||||||
<p align="center">Easy to use, open source, learning management system.</p>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
This app helps people organize and manage their own communities.
|
||||||
<a href="https://github.com/frappe/lms/blob/main/LICENSE">
|
|
||||||
<img alt="license" src="https://img.shields.io/badge/license-AGPLv3-blue">
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<img width="1402" alt="Lesson" src="https://frappelms.com/files/fs-banner71f330.png">
|
The App has following components:
|
||||||
|
|
||||||
<details>
|
1. Hackathons
|
||||||
<summary>Show more screenshots</summary>
|
1. LMS
|
||||||
<img width="1520" alt="ss1" src="https://user-images.githubusercontent.com/31363128/210056046-584bc8aa-d28c-4514-b031-73817012837d.png">
|
|
||||||
<img width="830" alt="ss2" src="https://user-images.githubusercontent.com/31363128/210056097-36849182-6db0-43a2-8c62-5333cd2aedf4.png">
|
|
||||||
<img width="941" alt="ss3" src="https://user-images.githubusercontent.com/31363128/210056134-01a7c429-1ef4-434e-9d43-128dda35d7e5.png">
|
|
||||||
</details>
|
|
||||||
|
|
||||||
Frappe LMS is an easy-to-use, open-source learning management system. You can use it to create and share online courses. The app has a clear UI that helps students focus only on what's important and assists in distraction-free learning.
|
Community is built on the [Frappe Framework](https://github.com/frappe/frappe), a full-stack web app framework built with Python & JavaScript.
|
||||||
|
|
||||||
You can create courses and lessons through simple forms. Lessons can be in the form of text, videos, quizzes or a combination of all these. You can keep your students engaged with quizzes to help revise and test the concepts learned. Course Instructors and Students can reach out to each other through the discussions section available for each lesson and get queries resolved.
|
### Local Setup
|
||||||
|
|
||||||
## Features
|
To setup the repository locally follow the steps mentioned below:
|
||||||
- Create online courses. 📚
|
|
||||||
- Add detailed descriptions and preview videos to the course. 🎬
|
|
||||||
- Add videos, quizzes, and assignments to your lessons and make them interesting and interactive 📝
|
|
||||||
- Discussions section below each lesson where instructors and students can interact with each other. 💬
|
|
||||||
- Create classes to group your students based on courses and track their progress 🏛
|
|
||||||
- Statistics dashboard that provides all important numbers at a glimpse. 📈
|
|
||||||
- Job Board where users can post and look for jobs. 💼
|
|
||||||
- People directory with each person's profile page 👨👩👧👦
|
|
||||||
- Set cover image, profile photo, short bio, and other professional information. 🦹🏼♀️
|
|
||||||
- Simple layout that optimizes readability 🤓
|
|
||||||
- Delightful user experience in overall usage ✨
|
|
||||||
|
|
||||||
## Tech Stack
|
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 community.test.
|
||||||
|
1. Run bench get-app https://github.com/fossunited/community.
|
||||||
|
1. Run bench --site community.test install-app community.
|
||||||
|
1. Map your site to localhost with the command ```bench --site community.test add-to-hosts```
|
||||||
|
1. Now open the URL http://community.test:8000/docs in your browser, you should see the app running.
|
||||||
|
|
||||||
Frappe LMS is built on [Frappe Framework](https://frappeframework.com) which is a batteries-included python web framework.
|
### Contribution Guidelines
|
||||||
These are some of the tools it's built on:
|
|
||||||
- [Python](https://www.python.org)
|
|
||||||
- [Redis](https://redis.io/)
|
|
||||||
- [MariaDB](https://mariadb.org/)
|
|
||||||
- [Socket.io](https://socket.io/)
|
|
||||||
|
|
||||||
## Local Setup
|
1. Go to the apps/community directory of your installation and execute git pull --unshallow to ensure that you have the full git repository. Also fork the fossunited/community 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.
|
||||||
|
1. Commit your changes to your branch. Make sure to use a semantic commit message.
|
||||||
|
1. Push your branch to your fork on Github, and issue a pull request.
|
||||||
|
|
||||||
### Docker
|
#### License
|
||||||
You need Docker, docker-compose, and git setup on your machine. Refer to [Docker documentation](https://docs.docker.com/). After that, run the following commands:
|
|
||||||
```
|
|
||||||
git clone https://github.com/frappe/lms
|
|
||||||
cd lms/docker
|
|
||||||
docker-compose up
|
|
||||||
```
|
|
||||||
|
|
||||||
Wait for some time until the setup script creates a site. After that, you can access `http://localhost:8000` in your browser and the app's login screen should show up.
|
AGPL
|
||||||
|
|
||||||
### Frappe Bench
|
|
||||||
|
|
||||||
Currently, this app depends on the `develop` branch of [frappe](https://github.com/frappe/frappe).
|
|
||||||
|
|
||||||
1. Setup frappe-bench by following [this guide](https://frappeframework.com/docs/v14/user/en/installation)
|
|
||||||
1. In the frappe-bench directory, run `bench start` and keep it running. Open a new terminal session and cd into the `frappe-bench` directory.
|
|
||||||
1. Run the following commands:
|
|
||||||
```sh
|
|
||||||
bench new-site lms.test
|
|
||||||
bench get-app lms
|
|
||||||
bench --site lms.test install-app lms
|
|
||||||
bench --site lms.test add-to-hosts
|
|
||||||
|
|
||||||
1. Now, you can access the site at `http://gameplan.test:8080`
|
|
||||||
|
|
||||||
|
|
||||||
## Deployment
|
|
||||||
Frappe LMS is an app built on top of the Frappe Framework. So, you can follow any deployment guide for hosting a Frappe Framework-based site.
|
|
||||||
|
|
||||||
### Managed Hosting
|
|
||||||
Frappe LMS can be deployed in a few clicks on [Frappe Cloud](https://frappecloud.com/marketplace/apps/lms).
|
|
||||||
|
|
||||||
### Self-hosting
|
|
||||||
If you want to self-host, you can follow official [Frappe Bench Installation](https://github.com/frappe/bench#installation) instructions.
|
|
||||||
|
|
||||||
## Bugs and Feature Requests
|
|
||||||
If you find any bugs or have a feature idea for the app, feel free to report them here on [GitHub Issues](https://github.com/frappe/lms/issues). Make sure you share enough information (app screenshots, browser console screenshots, stack traces, etc) for project maintainers.
|
|
||||||
|
|
||||||
## License
|
|
||||||
Distributed under [GNU AFFERO GENERAL PUBLIC LICENSE](license.txt)
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
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 lms.test.
|
|
||||||
1. Fork the LMS app
|
|
||||||
1. Run bench get-app <url-of-your-form>.
|
|
||||||
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.
|
|
||||||
7
community/__init__.py
Normal file
7
community/__init__.py
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
__version__ = '0.0.1'
|
||||||
|
|
||||||
|
# load the methods from the lms api
|
||||||
|
from .lms import api # noqa
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, Frappe and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Community Course Member', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "field:user_name",
|
||||||
|
"creation": "2021-03-02 11:24:49.612530",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"enabled",
|
||||||
|
"full_name",
|
||||||
|
"user_name",
|
||||||
|
"email",
|
||||||
|
"short_intro",
|
||||||
|
"bio",
|
||||||
|
"photo",
|
||||||
|
"route"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"default": "1",
|
||||||
|
"fieldname": "enabled",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Full Name",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "user_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "User Name",
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "email",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Email",
|
||||||
|
"options": "Email",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "short_intro",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Short Intro"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "bio",
|
||||||
|
"fieldtype": "Markdown Editor",
|
||||||
|
"label": "Bio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "photo",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"label": "Photo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "route",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Route"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"has_web_view": 1,
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"is_published_field": "enabled",
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-04-06 11:50:41.551665",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Community Course Member",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"route": "community-course-member",
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
import re
|
||||||
|
from frappe.website.website_generator import WebsiteGenerator
|
||||||
|
from frappe import _
|
||||||
|
|
||||||
|
class CommunityCourseMember(WebsiteGenerator):
|
||||||
|
|
||||||
|
def get_context(self, context):
|
||||||
|
context.abbr = ("").join([ s[0] for s in self.full_name.split() ])
|
||||||
|
return context
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
self.validate_user_name()
|
||||||
|
if not self.route:
|
||||||
|
self.route = self.user_name
|
||||||
|
|
||||||
|
def validate_user_name(self):
|
||||||
|
if len(self.user_name) < 4:
|
||||||
|
frappe.throw(_("Username must be atleast 4 characters long."))
|
||||||
|
if not re.match("^[A-Za-z0-9_]*$", self.user_name):
|
||||||
|
frappe.throw(_("Username can only contain alphabets, numbers, and underscore."))
|
||||||
|
self.user_name = self.user_name.lower()
|
||||||
|
|
||||||
|
def after_insert(self):
|
||||||
|
if frappe.db.exists("User", self.email):
|
||||||
|
user = frappe.get_doc("User", self.email)
|
||||||
|
else:
|
||||||
|
user, update_password_link = self.create_user()
|
||||||
|
self.send_email(update_password_link)
|
||||||
|
|
||||||
|
def send_email(self, update_password_link):
|
||||||
|
|
||||||
|
args = {
|
||||||
|
'update_password_link': update_password_link,
|
||||||
|
'full_name': self.full_name,
|
||||||
|
}
|
||||||
|
|
||||||
|
frappe.sendmail(
|
||||||
|
recipients=self.email,
|
||||||
|
sender="Administrator",
|
||||||
|
subject=_("Set your Password"),
|
||||||
|
template="community_course_membership",
|
||||||
|
reference_doctype=self.doctype,
|
||||||
|
reference_name=self.name,
|
||||||
|
send_priority=0,
|
||||||
|
queue_separately=True,
|
||||||
|
args=args)
|
||||||
|
|
||||||
|
def create_user(self):
|
||||||
|
user = frappe.get_doc({
|
||||||
|
"doctype": "User",
|
||||||
|
"email": self.email,
|
||||||
|
"first_name": self.full_name.split(" ")[0],
|
||||||
|
"full_name": self.full_name,
|
||||||
|
"username": self.user_name,
|
||||||
|
"send_welcome_email": 0,
|
||||||
|
"user_type": 'Website User',
|
||||||
|
"redirect_url": self.name
|
||||||
|
})
|
||||||
|
user.save(ignore_permissions=True)
|
||||||
|
update_password_link = user.reset_password()
|
||||||
|
return user, update_password_link
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{% extends "templates/web.html" %}
|
||||||
|
{% block page_content %}
|
||||||
|
<div class="py-20 row">
|
||||||
|
{% if photo %}
|
||||||
|
<div class="col-sm-2 border border-dark">
|
||||||
|
<img src="{{ photo }}" alt="{{ full_name }}">
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<div class="standard-image" style="font-size: 30px;">{{ abbr }}</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="col">
|
||||||
|
<h1>{{ full_name }}</h1>
|
||||||
|
{% if short_intro %}
|
||||||
|
<p class="lead"> {{ short_intro }} </p>
|
||||||
|
{% endif %}
|
||||||
|
{% if bio %}
|
||||||
|
<p class="markdown-style"> {{ frappe.utils.md_to_html(bio) }} </p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<!-- this is a sample default web page template -->
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<div>
|
||||||
|
<a href="{{ doc.route }}">{{ doc.full_name }}</a>
|
||||||
|
</div>
|
||||||
|
<!-- this is a sample default list template -->
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunityCourseMember(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
// Copyright (c) 2021, Frappe and contributors
|
// Copyright (c) 2021, Frappe and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Certification", {
|
frappe.ui.form.on('Community Event', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "Prompt",
|
||||||
|
"creation": "2021-02-12 17:54:52.300451",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"year",
|
||||||
|
"is_hackathon",
|
||||||
|
"volunteers"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "year",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Year",
|
||||||
|
"options": "\n2021\n2022\n2023\n2024\n2025"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "volunteers",
|
||||||
|
"fieldtype": "Table",
|
||||||
|
"label": "Volunteers",
|
||||||
|
"options": "Community Event Volunteer"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "is_hackathon",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Is Hackathon"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-02-15 18:29:26.828720",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Community Event",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2021, Frappe and contributors
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunityEvent(Document):
|
||||||
class EducationDetail(Document):
|
|
||||||
pass
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunityEvent(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -1,32 +1,32 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"allow_rename": 1,
|
"creation": "2021-02-12 15:55:58.252902",
|
||||||
"creation": "2022-02-07 11:39:59.998762",
|
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"instructor"
|
"member"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldname": "instructor",
|
"fieldname": "member",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Instructor",
|
"label": "Member",
|
||||||
"options": "User"
|
"options": "Community Member"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2022-02-07 11:41:42.943250",
|
"modified": "2021-02-15 12:03:31.153575",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "Community",
|
||||||
"name": "Course Instructor",
|
"name": "Community Event Volunteer",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [],
|
"permissions": [],
|
||||||
|
"quick_entry": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"states": []
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunityEventVolunteer(Document):
|
||||||
|
pass
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
// Copyright (c) 2021, Frappe and contributors
|
// Copyright (c) 2021, Frappe and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Function", {
|
frappe.ui.form.on('Community Member', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"allow_guest_to_view": 1,
|
||||||
|
"allow_rename": 1,
|
||||||
|
"creation": "2021-02-12 15:47:23.591567",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"full_name",
|
||||||
|
"email",
|
||||||
|
"enabled",
|
||||||
|
"column_break_4",
|
||||||
|
"role",
|
||||||
|
"short_intro",
|
||||||
|
"section_break_7",
|
||||||
|
"bio",
|
||||||
|
"section_break_9",
|
||||||
|
"username",
|
||||||
|
"photo",
|
||||||
|
"column_break_12",
|
||||||
|
"email_preference",
|
||||||
|
"route",
|
||||||
|
"abbr"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"default": "1",
|
||||||
|
"fieldname": "enabled",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"label": "Full Name",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 1,
|
||||||
|
"fieldname": "role",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Role",
|
||||||
|
"options": "\nBoard\nDirector\nVolunteer\nSpeaker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 1,
|
||||||
|
"fieldname": "photo",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"label": "Photo"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "short_intro",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Short Intro"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_in_quick_entry": 1,
|
||||||
|
"fieldname": "bio",
|
||||||
|
"fieldtype": "Markdown Editor",
|
||||||
|
"label": "Bio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "route",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Route"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "email",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"label": "Email",
|
||||||
|
"options": "Email",
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "username",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "User Name",
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "email_preference",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Email preference",
|
||||||
|
"options": "Email on every Message\nOne Digest Mail per day\nNever"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_4",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_7",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_9",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_12",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "abbr",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Abbr",
|
||||||
|
"read_only": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"has_web_view": 1,
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-04-16 10:22:46.837311",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Community Member",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "Website Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"search_fields": "full_name",
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"title_field": "full_name",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
import frappe
|
||||||
|
from frappe.website.website_generator import WebsiteGenerator
|
||||||
|
import re
|
||||||
|
from frappe import _
|
||||||
|
from frappe.model.rename_doc import rename_doc
|
||||||
|
|
||||||
|
class CommunityMember(WebsiteGenerator):
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
self.validate_username()
|
||||||
|
self.abbr = ("").join([ s[0] for s in self.full_name.split() ])
|
||||||
|
if self.route != self.username:
|
||||||
|
self.route = self.username
|
||||||
|
|
||||||
|
def validate_username(self):
|
||||||
|
if self.username:
|
||||||
|
if len(self.username) < 4:
|
||||||
|
frappe.throw(_("Username must be atleast 4 characters long."))
|
||||||
|
if not re.match("^[A-Za-z0-9_]*$", self.username):
|
||||||
|
frappe.throw(_("Username can only contain alphabets, numbers and underscore."))
|
||||||
|
self.username = self.username.lower()
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return f"<CommunityMember: {self.email}>"
|
||||||
|
|
||||||
|
def create_member_from_user(doc, method):
|
||||||
|
member = frappe.get_doc({
|
||||||
|
"doctype": "Community Member",
|
||||||
|
"full_name": doc.full_name,
|
||||||
|
"username": doc.username if len(doc.username) > 3 else ("").join([ s for s in doc.full_name.split() ]),
|
||||||
|
"email": doc.email,
|
||||||
|
"route": doc.username,
|
||||||
|
"owner": doc.email
|
||||||
|
})
|
||||||
|
member.save(ignore_permissions=True)
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{% extends "templates/web.html" %}
|
||||||
|
{% block page_content %}
|
||||||
|
<div class="py-20 row">
|
||||||
|
{% if photo %}
|
||||||
|
<div class="col-sm-2 border border-dark">
|
||||||
|
<img src="{{ photo }}" alt="{{ full_name }}">
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<div class="standard-image" style="font-size: 30px;">{{ abbr }}</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
<div class="col">
|
||||||
|
<h1>{{ full_name }}</h1>
|
||||||
|
{% if short_intro %}
|
||||||
|
<p class="lead"> {{ short_intro }} </p>
|
||||||
|
{% endif %}
|
||||||
|
{% if bio %}
|
||||||
|
<p class="markdown-style"> {{ frappe.utils.md_to_html(bio) }} </p>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
<!-- this is a sample default web page template -->
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<div>
|
||||||
|
<a href="{{ doc.route }}">{{ doc.title or doc.name }}</a>
|
||||||
|
</div>
|
||||||
|
<!-- this is a sample default list template -->
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunityMember(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, Frappe and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Community Participant', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -1,57 +1,57 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"allow_rename": 1,
|
"creation": "2021-02-15 11:04:02.748879",
|
||||||
"creation": "2021-11-19 15:31:47.129156",
|
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"cohort",
|
"first_name",
|
||||||
|
"last_name",
|
||||||
"email",
|
"email",
|
||||||
"subgroup",
|
"student",
|
||||||
"course"
|
"organization_college"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldname": "cohort",
|
"fieldname": "first_name",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 1,
|
"label": "First Name",
|
||||||
"label": "Cohort",
|
"reqd": 1
|
||||||
"options": "Cohort",
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "last_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Last Name",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "email",
|
"fieldname": "email",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "E-mail",
|
"label": "Email",
|
||||||
"options": "User",
|
"options": "Email",
|
||||||
"reqd": 1
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "subgroup",
|
"default": "0",
|
||||||
"fieldtype": "Link",
|
"fieldname": "student",
|
||||||
"in_list_view": 1,
|
"fieldtype": "Check",
|
||||||
"label": "Primary Subgroup",
|
"label": "Student"
|
||||||
"options": "Cohort Subgroup",
|
|
||||||
"reqd": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fetch_from": "cohort.course",
|
"fieldname": "organization_college",
|
||||||
"fieldname": "course",
|
"fieldtype": "Data",
|
||||||
"fieldtype": "Link",
|
"label": "Organization/College"
|
||||||
"label": "Course",
|
|
||||||
"options": "LMS Course",
|
|
||||||
"read_only": 1
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-11-29 16:32:33.235281",
|
"modified": "2021-02-15 11:04:02.748879",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "Community",
|
||||||
"name": "Cohort Mentor",
|
"name": "Community Participant",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
@@ -67,6 +67,7 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunityParticipant(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunityParticipant(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, Frappe and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Community Speaker', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-02-15 10:56:59.876454",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"full_name",
|
||||||
|
"enabled",
|
||||||
|
"avatar",
|
||||||
|
"column_break_3",
|
||||||
|
"short_bio",
|
||||||
|
"bio"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Full Name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "avatar",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"label": "Avatar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "short_bio",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Short Bio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "bio",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"label": "Bio"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "enabled",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_3",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-02-15 11:01:02.010360",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Community Speaker",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2021, Frappe and contributors
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunitySpeaker(Document):
|
||||||
class ExerciseLatestSubmission(Document):
|
|
||||||
pass
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunitySpeaker(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, Frappe and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Community Sponsor', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "field:sponsor",
|
||||||
|
"creation": "2021-02-15 10:46:16.271104",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"sponsor",
|
||||||
|
"website",
|
||||||
|
"image",
|
||||||
|
"speaker",
|
||||||
|
"timeslot",
|
||||||
|
"short_intro",
|
||||||
|
"pitch"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "sponsor",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Sponsor",
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "website",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Website"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "image",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"label": "Image"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "speaker",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Speaker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "timeslot",
|
||||||
|
"fieldtype": "Datetime",
|
||||||
|
"label": "Timeslot"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "short_intro",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"label": "Short Intro"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "pitch",
|
||||||
|
"fieldtype": "Markdown Editor",
|
||||||
|
"label": "Pitch"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-02-15 10:46:16.271104",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Community Sponsor",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunitySponsor(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunitySponsor(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
// Copyright (c) 2021, Frappe and contributors
|
// Copyright (c) 2021, Frappe and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Job Opportunity", {
|
frappe.ui.form.on('Community Talk', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "field:topic",
|
||||||
|
"creation": "2021-02-18 16:06:59.882799",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"speaker",
|
||||||
|
"topic",
|
||||||
|
"video_link",
|
||||||
|
"date_and_time",
|
||||||
|
"event_type",
|
||||||
|
"event"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "speaker",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Speaker",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "topic",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Topic",
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "video_link",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Video Link"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "date_and_time",
|
||||||
|
"fieldtype": "Datetime",
|
||||||
|
"label": "Date and Time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event_type",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event Type",
|
||||||
|
"options": "DocType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Dynamic Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "event_type"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-02-18 16:56:41.526184",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Community Talk",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2021, Frappe and contributors
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunityTalk(Document):
|
||||||
class Certification(Document):
|
|
||||||
pass
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunityTalk(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, Frappe and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestTShirtSizes(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
// Copyright (c) 2021, Frappe and contributors
|
// Copyright (c) 2021, Frappe and contributors
|
||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on("Industry", {
|
frappe.ui.form.on('TShirt Sizes', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
});
|
});
|
||||||
@@ -1,29 +1,32 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"allow_rename": 1,
|
"creation": "2021-02-25 17:52:49.813558",
|
||||||
"autoname": "field:skill",
|
|
||||||
"creation": "2021-12-08 15:31:29.292544",
|
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"skill"
|
"size",
|
||||||
|
"quantity"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldname": "skill",
|
"fieldname": "size",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Select",
|
||||||
"label": "Skill",
|
"label": "Size",
|
||||||
"unique": 1
|
"options": "S\nM\nL\nXL\nXXL\nXXXL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "quantity",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"label": "Quantity"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-12-21 09:35:44.265910",
|
"modified": "2021-02-25 17:52:49.813558",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "Community",
|
||||||
"name": "User Skill",
|
"name": "TShirt Sizes",
|
||||||
"naming_rule": "By fieldname",
|
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
@@ -37,18 +40,10 @@
|
|||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
"share": 1,
|
"share": 1,
|
||||||
"write": 1
|
"write": 1
|
||||||
},
|
|
||||||
{
|
|
||||||
"email": 1,
|
|
||||||
"export": 1,
|
|
||||||
"print": 1,
|
|
||||||
"read": 1,
|
|
||||||
"report": 1,
|
|
||||||
"role": "All",
|
|
||||||
"select": 1,
|
|
||||||
"share": 1
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC"
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2021, Frappe and contributors
|
# Copyright (c) 2021, Frappe and contributors
|
||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class TShirtSizes(Document):
|
||||||
class Function(Document):
|
|
||||||
pass
|
pass
|
||||||
17
community/community/utils.py
Normal file
17
community/community/utils.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def create_members_from_users():
|
||||||
|
users = frappe.get_all("User", {"enabled": 1}, ["email"])
|
||||||
|
for user in users:
|
||||||
|
if not frappe.db.get_value("Community Member", {"email": user.email}, "name"):
|
||||||
|
doc = frappe.get_doc("User", {"email": user.email})
|
||||||
|
username = doc.username if doc.username and len(doc.username) > 3 else ("").join([ s for s in doc.full_name.split() ])
|
||||||
|
if not frappe.db.exists("Community Member", username):
|
||||||
|
print(doc.email, username)
|
||||||
|
member = frappe.new_doc("Community Member")
|
||||||
|
member.full_name = doc.full_name
|
||||||
|
member.username = username
|
||||||
|
member.email = doc.email
|
||||||
|
member.route = username
|
||||||
|
member.owner = doc.email
|
||||||
|
member.insert(ignore_permissions=True)
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
frappe.ready(function() {
|
||||||
|
// bind events here
|
||||||
|
})
|
||||||
64
community/community/web_form/join_request/join_request.json
Normal file
64
community/community/web_form/join_request/join_request.json
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"accept_payment": 0,
|
||||||
|
"allow_comments": 0,
|
||||||
|
"allow_delete": 0,
|
||||||
|
"allow_edit": 0,
|
||||||
|
"allow_incomplete": 0,
|
||||||
|
"allow_multiple": 0,
|
||||||
|
"allow_print": 0,
|
||||||
|
"amount": 0.0,
|
||||||
|
"amount_based_on_field": 0,
|
||||||
|
"apply_document_permissions": 0,
|
||||||
|
"button_label": "Send Request",
|
||||||
|
"client_script": "$('.page-header h2').html(`Request to Join \"${frappe.utils.get_url_arg('project_name')}\"`);",
|
||||||
|
"creation": "2021-02-17 13:20:08.548735",
|
||||||
|
"doc_type": "Community Project Member",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Form",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": 1,
|
||||||
|
"login_required": 0,
|
||||||
|
"max_attachment_size": 0,
|
||||||
|
"modified": "2021-02-17 13:50:35.153793",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "join-request",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"payment_button_label": "Buy Now",
|
||||||
|
"published": 1,
|
||||||
|
"route": "join-request",
|
||||||
|
"route_to_success_link": 0,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_url": "/join-request",
|
||||||
|
"title": "Join Request",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "project",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Project",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"options": "Community Project",
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "intro",
|
||||||
|
"fieldtype": "Small Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Intro",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"show_in_filter": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import frappe
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
# do your magic here
|
# do your magic here
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
frappe.ready(function () {
|
||||||
|
// bind events here
|
||||||
|
frappe.web_form.success_url = `hackathons/project?project=${frappe.utils.get_url_arg('project')}&hackathon=${frappe.utils.get_url_arg('hackathon')}`;
|
||||||
|
|
||||||
|
$('.breadcrumb-container')
|
||||||
|
.html(`<a href="${frappe.web_form.success_url}">Back to my project</a>`)
|
||||||
|
.addClass('py-4');
|
||||||
|
})
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{
|
||||||
|
"accept_payment": 0,
|
||||||
|
"allow_comments": 0,
|
||||||
|
"allow_delete": 0,
|
||||||
|
"allow_edit": 0,
|
||||||
|
"allow_incomplete": 0,
|
||||||
|
"allow_multiple": 0,
|
||||||
|
"allow_print": 0,
|
||||||
|
"amount": 0.0,
|
||||||
|
"amount_based_on_field": 0,
|
||||||
|
"apply_document_permissions": 0,
|
||||||
|
"button_label": "Submit",
|
||||||
|
"creation": "2021-02-18 13:15:09.464515",
|
||||||
|
"doc_type": "Community Project Update",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Form",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": 1,
|
||||||
|
"login_required": 1,
|
||||||
|
"max_attachment_size": 0,
|
||||||
|
"modified": "2021-02-18 13:23:41.023545",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "project-update",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"payment_button_label": "Buy Now",
|
||||||
|
"published": 1,
|
||||||
|
"route": "project-update",
|
||||||
|
"route_to_success_link": 0,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_url": "/project-update",
|
||||||
|
"title": "Project Update",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "project",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Project",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"options": "Community Project",
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "update",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Update",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"show_in_filter": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import frappe
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
# do your magic here
|
# do your magic here
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
frappe.ready(function() {
|
||||||
|
frappe.web_form.after_save = () => {
|
||||||
|
window.location.href = frappe.web_form.get_value("username")
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -2,45 +2,46 @@
|
|||||||
"accept_payment": 0,
|
"accept_payment": 0,
|
||||||
"allow_comments": 0,
|
"allow_comments": 0,
|
||||||
"allow_delete": 0,
|
"allow_delete": 0,
|
||||||
"allow_edit": 0,
|
"allow_edit": 1,
|
||||||
"allow_incomplete": 0,
|
"allow_incomplete": 0,
|
||||||
"allow_multiple": 0,
|
"allow_multiple": 0,
|
||||||
"allow_print": 0,
|
"allow_print": 0,
|
||||||
"amount": 0.0,
|
"amount": 0.0,
|
||||||
"amount_based_on_field": 0,
|
"amount_based_on_field": 0,
|
||||||
"apply_document_permissions": 0,
|
"apply_document_permissions": 0,
|
||||||
|
"breadcrumbs": "",
|
||||||
"button_label": "Save",
|
"button_label": "Save",
|
||||||
"creation": "2022-11-11 12:10:29.640675",
|
"creation": "2021-03-09 17:34:03.394301",
|
||||||
"custom_css": "",
|
"doc_type": "Community Member",
|
||||||
"doc_type": "LMS Class",
|
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"doctype": "Web Form",
|
"doctype": "Web Form",
|
||||||
"idx": 0,
|
"idx": 0,
|
||||||
"is_standard": 1,
|
"is_standard": 1,
|
||||||
"list_columns": [],
|
"login_required": 1,
|
||||||
"login_required": 0,
|
|
||||||
"max_attachment_size": 0,
|
"max_attachment_size": 0,
|
||||||
"modified": "2022-11-21 10:56:01.627821",
|
"modified": "2021-03-22 12:04:22.571655",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "Community",
|
||||||
"name": "class",
|
"name": "update-profile",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"payment_button_label": "Buy Now",
|
"payment_button_label": "Buy Now",
|
||||||
"published": 1,
|
"published": 1,
|
||||||
"route": "class",
|
"route": "edit-profile",
|
||||||
|
"route_to_success_link": 0,
|
||||||
"show_attachments": 0,
|
"show_attachments": 0,
|
||||||
"show_list": 0,
|
"show_in_grid": 0,
|
||||||
"show_sidebar": 0,
|
"show_sidebar": 0,
|
||||||
"success_title": "",
|
"sidebar_items": [],
|
||||||
"success_url": "/classes",
|
"success_message": "Profile updated successfully.",
|
||||||
"title": "Class",
|
"success_url": "/",
|
||||||
|
"title": "Update Profile",
|
||||||
"web_form_fields": [
|
"web_form_fields": [
|
||||||
{
|
{
|
||||||
"allow_read_on_all_link_options": 0,
|
"allow_read_on_all_link_options": 0,
|
||||||
"fieldname": "title",
|
"fieldname": "full_name",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Title",
|
"label": "Full Name",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -49,10 +50,10 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_read_on_all_link_options": 0,
|
"allow_read_on_all_link_options": 0,
|
||||||
"fieldname": "start_date",
|
"fieldname": "username",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Start Date",
|
"label": "User Name",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -61,22 +62,34 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_read_on_all_link_options": 0,
|
"allow_read_on_all_link_options": 0,
|
||||||
"fieldname": "end_date",
|
"fieldname": "short_intro",
|
||||||
"fieldtype": "Date",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "End Date",
|
"label": "Short Intro",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"reqd": 1,
|
"reqd": 0,
|
||||||
"show_in_filter": 0
|
"show_in_filter": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"allow_read_on_all_link_options": 0,
|
"allow_read_on_all_link_options": 0,
|
||||||
"fieldname": "description",
|
"fieldname": "bio",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
"label": "Description",
|
"label": "Bio",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "photo",
|
||||||
|
"fieldtype": "Attach Image",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Photo",
|
||||||
"max_length": 0,
|
"max_length": 0,
|
||||||
"max_value": 0,
|
"max_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import frappe
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
# do your magic here
|
# do your magic here
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Community Conference', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "field:conference_name",
|
||||||
|
"creation": "2021-02-25 17:12:51.981534",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"conference_name",
|
||||||
|
"live_stream_url",
|
||||||
|
"conference_details"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "conference_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Conference Name",
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "live_stream_url",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Live Stream URL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "conference_details",
|
||||||
|
"fieldtype": "Markdown Editor",
|
||||||
|
"label": "Conference Details"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-04-06 18:30:18.228083",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Conference",
|
||||||
|
"name": "Community Conference",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (c) 2021, FOSS United and contributors
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
# import frappe
|
# import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunityConference(Document):
|
||||||
class LessonReference(Document):
|
|
||||||
pass
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunityConference(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Community Conference Participant', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "CON-.YYYY.-.###",
|
||||||
|
"creation": "2021-02-25 17:51:23.959033",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"participant_details",
|
||||||
|
"participant_name",
|
||||||
|
"participant_designation",
|
||||||
|
"column_break_4",
|
||||||
|
"email",
|
||||||
|
"conference_details",
|
||||||
|
"year",
|
||||||
|
"full_conference_tickets",
|
||||||
|
"user_conference_tickets",
|
||||||
|
"paid",
|
||||||
|
"column_break_11",
|
||||||
|
"tshirt_table",
|
||||||
|
"tshirt_size",
|
||||||
|
"currency",
|
||||||
|
"amount",
|
||||||
|
"thank_you_email_sent"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "participant_details",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Participant Details"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "participant_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Participant Name",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "participant_designation",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Participant Designation",
|
||||||
|
"options": "\nCxO\nAnalyst\nConsultant\nDeveloper\nSystem Administrator\nOther"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_4",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "email",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Email",
|
||||||
|
"options": "Email",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "conference_details",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Conference Details"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "year",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Year",
|
||||||
|
"options": "\n2017\n2018\n2019\n2020\n2021\n2022\n2023\n2024\n2025"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "full_conference_tickets",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Full Conference Tickets",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "user_conference_tickets",
|
||||||
|
"fieldtype": "Int",
|
||||||
|
"label": "User Conference Tickets"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "paid",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Paid"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_11",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "tshirt_table",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "T-Shirt Sizes"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "tshirt_size",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "T-Shirt Size",
|
||||||
|
"options": "S\nM\nL\nXL\nXXL\nXXXL"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "currency",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Currency",
|
||||||
|
"options": "USD\nINR",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "amount",
|
||||||
|
"fieldtype": "Currency",
|
||||||
|
"label": "Amount",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "thank_you_email_sent",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Thank You Email Sent"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-03-04 20:13:42.151103",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Conference",
|
||||||
|
"name": "Community Conference Participant",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunityConferenceParticipant(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunityConferenceParticipant(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Community Conference Request', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-02-25 17:19:10.378290",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"contact_name",
|
||||||
|
"contact_number",
|
||||||
|
"email",
|
||||||
|
"organization_name",
|
||||||
|
"request_type",
|
||||||
|
"message"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "contact_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Contact Name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "contact_number",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Contact Number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "email",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Email"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "organization_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Organization Name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "request_type",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Request Type",
|
||||||
|
"options": "Sponsorship\nExhibit Program"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "message",
|
||||||
|
"fieldtype": "Text Editor",
|
||||||
|
"label": "Message"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-03-04 20:13:26.130017",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Conference",
|
||||||
|
"name": "Community Conference Request",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"quick_entry": 1,
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class CommunityConferenceRequest(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestCommunityConferenceRequest(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
|
|
||||||
def get_data():
|
def get_data():
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@@ -8,6 +9,6 @@ def get_data():
|
|||||||
"color": "grey",
|
"color": "grey",
|
||||||
"icon": "octicon octicon-file-directory",
|
"icon": "octicon octicon-file-directory",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"label": _("Community"),
|
"label": _("Community")
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -7,6 +7,5 @@ Configuration for docs
|
|||||||
# headline = "App that does everything"
|
# headline = "App that does everything"
|
||||||
# sub_heading = "Yes, you got that right the first time, everything"
|
# sub_heading = "Yes, you got that right the first time, everything"
|
||||||
|
|
||||||
|
|
||||||
def get_context(context):
|
def get_context(context):
|
||||||
context.brand_html = "Community"
|
context.brand_html = "Community"
|
||||||
35
community/hackathon/README.md
Normal file
35
community/hackathon/README.md
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
The Hackathon module allows Community Members to organize and manage hackathons. Community Members can view these hackathons on the portal.
|
||||||
|
|
||||||
|
<img class="screenshot" src="/community/hackathon/images/hackathons-portal.png">
|
||||||
|
|
||||||
|
### Key Features:
|
||||||
|
|
||||||
|
##### Organize Hackathons
|
||||||
|
|
||||||
|
1. Hackathons can be created using the **Community Hackathon** doctype.
|
||||||
|
1. Enter the hackathon name, the organizer, the year and Save.
|
||||||
|
|
||||||
|
<img class="screenshot" src="/community/hackathon/images/community-hackathon.png">
|
||||||
|
|
||||||
|
##### Projects
|
||||||
|
|
||||||
|
1. A Hackathon will have multiple Projects.
|
||||||
|
1. Projects can be created using the **Community Project** doctype from the desk.
|
||||||
|
1. Projects can also be created from the Portal using the Projects webform.
|
||||||
|
1. Enter details like Project Name, Project Short Intro, Project Description.
|
||||||
|
1. Attach important links like Repository Link, Demo Link, Telegram Id.
|
||||||
|
1. The checkbox Accepting Members can be used if you are still aceepting members for your project.
|
||||||
|
|
||||||
|
<img class="screenshot" src="/community/hackathon/images/project-1.png">
|
||||||
|
<img class="screenshot" src="/community/hackathon/images/project-2.png">
|
||||||
|
|
||||||
|
1. Projects are visible on the portal as well.
|
||||||
|
<img class="screenshot" src="/community/hackathon/images/project-portal.png">
|
||||||
|
<img class="screenshot" src="/community/hackathon/images/project-details.png">
|
||||||
|
|
||||||
|
##### Project Members
|
||||||
|
|
||||||
|
1. Community Members can explore the projects of hackathons and decide if they want to join any project.
|
||||||
|
1. If the project is accepting members they can apply for the project from the web form available on the portal.
|
||||||
|
<img class="screenshot" src="/community/hackathon/images/project-join-request.png">
|
||||||
|
1. Project owners can review the requests and accept/reject the members.
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user