Compare commits
90 Commits
quiz-clean
...
profile-ur
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0b77f5d08 | ||
|
|
77c4b53b71 | ||
|
|
035a674cff | ||
|
|
f52e5067b6 | ||
|
|
d657525359 | ||
|
|
916e64d607 | ||
|
|
9e1daf5062 | ||
|
|
941a34784c | ||
|
|
cd4ffa2eff | ||
|
|
17a7af74f2 | ||
|
|
ff22eaa606 | ||
|
|
417436d7b6 | ||
|
|
f228489173 | ||
|
|
a49563e23f | ||
|
|
b3403b78ee | ||
|
|
7a9039090d | ||
|
|
289195e6c9 | ||
|
|
e6502784ea | ||
|
|
54f301e8eb | ||
|
|
ed91801769 | ||
|
|
6965148e4e | ||
|
|
b5481e1dd5 | ||
|
|
4ec9b56366 | ||
|
|
530fcf9a39 | ||
|
|
ff1363b437 | ||
|
|
952e3a9906 | ||
|
|
9d530e35fb | ||
|
|
2c2ad78eb7 | ||
|
|
f61c5a2fa1 | ||
|
|
3e24ff9678 | ||
|
|
b0280c3be4 | ||
|
|
b10eb5c979 | ||
|
|
e2072c72da | ||
|
|
84a43912db | ||
|
|
841819436a | ||
|
|
14a984c75f | ||
|
|
445de61ce4 | ||
|
|
f83007788d | ||
|
|
aefee791ca | ||
|
|
00154d80df | ||
|
|
a1e12d29ac | ||
|
|
5069832165 | ||
|
|
e2cb003935 | ||
|
|
b83a10c282 | ||
|
|
c6fc0a22d2 | ||
|
|
c6d3994383 | ||
|
|
07f9721aeb | ||
|
|
dba956e473 | ||
|
|
2894a5e479 | ||
|
|
ad0913500c | ||
|
|
79a765b725 | ||
|
|
eaec991f47 | ||
|
|
e31b189045 | ||
|
|
eb58b1c149 | ||
|
|
af9760f944 | ||
|
|
21b2412362 | ||
|
|
7e5e167eec | ||
|
|
7bf254319b | ||
|
|
d7e1745c09 | ||
|
|
ef238c1b25 | ||
|
|
cb60d97bb7 | ||
|
|
7c3189e273 | ||
|
|
ace74febc7 | ||
|
|
8dbdabd52c | ||
|
|
f0ee8d7b88 | ||
|
|
7e5203f058 | ||
|
|
a3672e9d91 | ||
|
|
7017382451 | ||
|
|
6c9d49bf8c | ||
|
|
2de058246b | ||
|
|
798ea30382 | ||
|
|
3e2c6b3343 | ||
|
|
5ea744de5c | ||
|
|
aedb3d3d45 | ||
|
|
83a2f42df9 | ||
|
|
66aace247c | ||
|
|
bc3db06960 | ||
|
|
ddaa063587 | ||
|
|
f9b4fe468e | ||
|
|
6cbca8d1bb | ||
|
|
d5067a4bcd | ||
|
|
04d44510de | ||
|
|
844fcc9bca | ||
|
|
145b5efab0 | ||
|
|
4079ed97b9 | ||
|
|
63d70fc037 | ||
|
|
ce86b5deda | ||
|
|
037e946bbe | ||
|
|
a51c8de1eb | ||
|
|
53dc517180 |
@@ -63,7 +63,7 @@ To setup the repository locally follow the steps mentioned below:
|
|||||||
1. Run bench get-app https://github.com/fossunited/community.
|
1. Run bench get-app https://github.com/fossunited/community.
|
||||||
1. Run bench --site community.test install-app 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. 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.
|
1. Now open the URL http://community.test:8000/ in your browser, you should see the app running.
|
||||||
|
|
||||||
### Contribution Guidelines (for The Hard Way)
|
### Contribution Guidelines (for The Hard Way)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Discussion Reply', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-11 10:59:38.597046",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"topic",
|
||||||
|
"reply"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "reply",
|
||||||
|
"fieldtype": "Long Text",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Reply"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "topic",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"label": "Topic",
|
||||||
|
"options": "Discussion Topic"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-27 15:06:51.362714",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Discussion Reply",
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
from community.widgets import Widgets
|
||||||
|
|
||||||
|
class DiscussionReply(Document):
|
||||||
|
def after_insert(self):
|
||||||
|
data = {
|
||||||
|
"reply": self,
|
||||||
|
"topic": {
|
||||||
|
"name": self.topic
|
||||||
|
},
|
||||||
|
"widgets": Widgets()
|
||||||
|
}
|
||||||
|
template = frappe.render_template("community/templates/discussions/reply_card.html", data)
|
||||||
|
topic_info = frappe.get_all("Discussion Topic", {"name": self.topic}, ["reference_doctype", "reference_docname", "name", "title", "owner", "creation"])
|
||||||
|
sidebar = frappe.render_template("community/templates/discussions/sidebar.html", { "topic": topic_info[0], "widgets": Widgets() })
|
||||||
|
new_topic_template = frappe.render_template("community/templates/discussions/reply_section.html", { "topics": topic_info, "widgets": Widgets() })
|
||||||
|
|
||||||
|
frappe.publish_realtime(event="publish_message",
|
||||||
|
message = {
|
||||||
|
"template": template,
|
||||||
|
"topic_info": topic_info[0],
|
||||||
|
"sidebar": sidebar,
|
||||||
|
"new_topic_template": new_topic_template
|
||||||
|
},
|
||||||
|
after_commit=True)
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# import frappe
|
# import frappe
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestLMSMessage(unittest.TestCase):
|
class TestDiscussionReply(unittest.TestCase):
|
||||||
pass
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Discussion Topic', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-11 10:55:29.341674",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"title",
|
||||||
|
"reference_doctype",
|
||||||
|
"reference_docname"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "reference_doctype",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Reference Doctype",
|
||||||
|
"options": "DocType"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "reference_docname",
|
||||||
|
"fieldtype": "Dynamic Link",
|
||||||
|
"label": "Reference Docname",
|
||||||
|
"options": "reference_doctype"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-11 12:29:43.564123",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Discussion Topic",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"permissions": [
|
||||||
|
{
|
||||||
|
"create": 1,
|
||||||
|
"delete": 1,
|
||||||
|
"email": 1,
|
||||||
|
"export": 1,
|
||||||
|
"print": 1,
|
||||||
|
"read": 1,
|
||||||
|
"report": 1,
|
||||||
|
"role": "System Manager",
|
||||||
|
"share": 1,
|
||||||
|
"write": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"search_fields": "title",
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"title_field": "title",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class DiscussionTopic(Document):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def submit_discussion(doctype, docname, reply, title, topic_name=None):
|
||||||
|
if topic_name:
|
||||||
|
save_message(reply, topic_name)
|
||||||
|
return topic_name
|
||||||
|
|
||||||
|
topic = frappe.get_doc({
|
||||||
|
"doctype": "Discussion Topic",
|
||||||
|
"title": title,
|
||||||
|
"reference_doctype": doctype,
|
||||||
|
"reference_docname": docname
|
||||||
|
})
|
||||||
|
topic.save(ignore_permissions=True)
|
||||||
|
save_message(reply, topic.name)
|
||||||
|
return topic.name
|
||||||
|
|
||||||
|
def save_message(reply, topic):
|
||||||
|
frappe.get_doc({
|
||||||
|
"doctype": "Discussion Reply",
|
||||||
|
"reply": reply,
|
||||||
|
"topic": topic
|
||||||
|
}).save(ignore_permissions=True)
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def get_docname(route):
|
||||||
|
return frappe.db.get_value("Web Page", {"route": route}, ["name"])
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestDiscussionTopic(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
{% set docname = frappe.db.get_value("Web Page", {"route": ""}, ["name"])%}
|
||||||
|
{{ widgets.DiscussionMessage(doctype="Web Page", docname=docname) }}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"__islocal": true,
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-30 12:42:31.550200",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [],
|
||||||
|
"idx": 0,
|
||||||
|
"modified": "2021-08-30 12:42:31.550200",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Community",
|
||||||
|
"name": "Discussions",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{% set color = member.get_palette() %}
|
{% set color = member.get_palette() %}
|
||||||
<a href="/{{member.username}}">
|
<a class="button-links" href="{{ get_profile_url(member.username) }}">
|
||||||
<span class="avatar {{ avatar_class }}" title="{{ member.full_name }}">
|
<span class="avatar {{ avatar_class }}" title="{{ member.full_name }}">
|
||||||
{% if member.user_image %}
|
{% if member.user_image %}
|
||||||
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}" title="{{ member.full_name }}">
|
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}" title="{{ member.full_name }}">
|
||||||
|
|||||||
28
community/community/widgets/CommentBox.html
Normal file
28
community/community/widgets/CommentBox.html
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<form class="discussion-form">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="control-input-wrapper">
|
||||||
|
<div class="control-input">
|
||||||
|
<input type="text" autocomplete="off" class="input-with-feedback form-control topic-title" data-fieldtype="Data"
|
||||||
|
data-fieldname="feedback_comments" placeholder="Title" spellcheck="false"></input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="control-input-wrapper">
|
||||||
|
<div class="control-input">
|
||||||
|
<textarea type="text" autocomplete="off" class="input-with-feedback form-control comment-field"
|
||||||
|
data-fieldtype="Text" data-fieldname="feedback_comments" placeholder="Enter a comment..."
|
||||||
|
spellcheck="false"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="comment-footer">
|
||||||
|
<div class="button is-default pull-right mb-5 submit-discussion" data-doctype="{{ doctype | urlencode }}"
|
||||||
|
data-docname="{{ docname | urlencode }}">
|
||||||
|
Post</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
54
community/community/widgets/DiscussionMessage.html
Normal file
54
community/community/widgets/DiscussionMessage.html
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{% set topics = frappe.get_all("Discussion Topic",
|
||||||
|
{"reference_doctype": doctype, "reference_docname": docname}, ["name", "title", "owner", "creation"]) %}
|
||||||
|
|
||||||
|
{% include "community/templates/discussions/topic_modal.html" %}
|
||||||
|
|
||||||
|
<div class="discussions-parent">
|
||||||
|
<div class="discussions-header">
|
||||||
|
<span class="course-home-headings">{{_('Discussions')}}</span>
|
||||||
|
{% if topics %}
|
||||||
|
{% include "community/templates/discussions/button.html" %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% if topics %}
|
||||||
|
<div class="common-card-style thread-card course-content-parent" data-doctype="{{ doctype }}"
|
||||||
|
data-docname="{{ docname }}">
|
||||||
|
|
||||||
|
<div class="discussions-sidebar">
|
||||||
|
{% include "community/templates/discussions/search.html" %}
|
||||||
|
{% for topic in topics %}
|
||||||
|
{% set replies = frappe.get_all("Discussion Reply", {"topic": topic.name})%}
|
||||||
|
{% include "community/templates/discussions/sidebar.html" %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="mr-2" id="discussion-group">
|
||||||
|
{% include "community/templates/discussions/reply_section.html" %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
<div id="no-discussions" class="common-card-style thread-card">
|
||||||
|
<div class="no-discussions">
|
||||||
|
<div class="font-weight-bold">No Discussions</div>
|
||||||
|
<div class="muted-text mt-3 mb-3">There are no discussions for this {{ doctype | lower }}, why don't you start
|
||||||
|
one! </div>
|
||||||
|
{% if frappe.session.user == "Guest" %}
|
||||||
|
<div class="button is-primary mt-3" id="login-from-discussion">Log In</div>
|
||||||
|
{% elif not condition %}
|
||||||
|
<div class="button is-primary mt-3" id="login-from-discussion" data-redirect="{{ redirect_to }}">
|
||||||
|
{{ button_name }}
|
||||||
|
</div>
|
||||||
|
{% else %}
|
||||||
|
{% include "community/templates/discussions/button.html" %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% block script %}
|
||||||
|
<script>{% include "community/templates/discussions/discussions.js" %}</script>
|
||||||
|
{% endblock %}
|
||||||
0
community/event_management/__init__.py
Normal file
0
community/event_management/__init__.py
Normal file
0
community/event_management/doctype/__init__.py
Normal file
0
community/event_management/doctype/__init__.py
Normal file
14
community/event_management/doctype/attendee/attendee.js
Normal file
14
community/event_management/doctype/attendee/attendee.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Attendee', {
|
||||||
|
onload: function (frm) {
|
||||||
|
frm.set_query('user', function (doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"ignore_user_type": 1,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -1,51 +1,47 @@
|
|||||||
{
|
{
|
||||||
"actions": [],
|
"actions": [],
|
||||||
"creation": "2021-03-19 12:19:32.355307",
|
"creation": "2021-08-11 10:07:53.262504",
|
||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"editable_grid": 1,
|
"editable_grid": 1,
|
||||||
"engine": "InnoDB",
|
"engine": "InnoDB",
|
||||||
"field_order": [
|
"field_order": [
|
||||||
"author",
|
"user",
|
||||||
"batch",
|
"full_name",
|
||||||
"column_break_3",
|
"column_break_3",
|
||||||
"author_name",
|
"company",
|
||||||
"pin",
|
"is_paid",
|
||||||
"section_break_6",
|
"section_break_6",
|
||||||
"message"
|
"what_are_you_hoping_to_learn"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"fieldname": "batch",
|
"fieldname": "company",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"label": "Company"
|
||||||
"label": "Batch",
|
|
||||||
"options": "LMS Batch"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "author",
|
"fieldname": "what_are_you_hoping_to_learn",
|
||||||
|
"fieldtype": "Text",
|
||||||
|
"label": "What are you hoping to learn?"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "user",
|
||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"label": "User",
|
||||||
"label": "Author",
|
|
||||||
"options": "User"
|
"options": "User"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "message",
|
"fetch_from": "user.full_name",
|
||||||
"fieldtype": "Markdown Editor",
|
"fieldname": "full_name",
|
||||||
"in_list_view": 1,
|
"fieldtype": "Data",
|
||||||
"label": "Message"
|
"label": "Full Name",
|
||||||
|
"read_only": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"default": "0",
|
"default": "0",
|
||||||
"fieldname": "pin",
|
"fieldname": "is_paid",
|
||||||
"fieldtype": "Check",
|
"fieldtype": "Check",
|
||||||
"label": "Pin"
|
"label": "Is Paid"
|
||||||
},
|
|
||||||
{
|
|
||||||
"fetch_from": "author.full_name",
|
|
||||||
"fieldname": "author_name",
|
|
||||||
"fieldtype": "Data",
|
|
||||||
"label": "Author Name",
|
|
||||||
"read_only": 1
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "column_break_3",
|
"fieldname": "column_break_3",
|
||||||
@@ -58,10 +54,10 @@
|
|||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-05-21 11:49:34.911479",
|
"modified": "2021-08-20 17:03:09.741997",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "Event Management",
|
||||||
"name": "LMS Message",
|
"name": "Attendee",
|
||||||
"owner": "Administrator",
|
"owner": "Administrator",
|
||||||
"permissions": [
|
"permissions": [
|
||||||
{
|
{
|
||||||
@@ -77,9 +73,8 @@
|
|||||||
"write": 1
|
"write": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"quick_entry": 1,
|
|
||||||
"sort_field": "modified",
|
"sort_field": "modified",
|
||||||
"sort_order": "DESC",
|
"sort_order": "DESC",
|
||||||
"title_field": "author",
|
"title_field": "user",
|
||||||
"track_changes": 1
|
"track_changes": 1
|
||||||
}
|
}
|
||||||
8
community/event_management/doctype/attendee/attendee.py
Normal file
8
community/event_management/doctype/attendee/attendee.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class Attendee(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestAttendee(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('Event Details', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"autoname": "field:event_name",
|
||||||
|
"creation": "2021-08-11 10:05:41.072432",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event_name",
|
||||||
|
"start_date",
|
||||||
|
"end_date",
|
||||||
|
"event_description"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "event_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Event Name",
|
||||||
|
"reqd": 1,
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "start_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Start Date",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "end_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "End Date",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event_description",
|
||||||
|
"fieldtype": "Markdown Editor",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Event Description"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-18 23:51:30.432691",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Event Details",
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class EventDetails(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestEventDetails(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('Event Ticket', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-11 11:17:28.452289",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event",
|
||||||
|
"ticket",
|
||||||
|
"attendee"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "ticket",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Ticket"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "attendee",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "attendee",
|
||||||
|
"options": "Attendee"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-20 13:38:28.688115",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Event Ticket",
|
||||||
|
"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
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class EventTicket(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestEventTicket(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
// 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
|
||||||
|
|
||||||
frappe.ui.form.on('LMS Message', {
|
frappe.ui.form.on('Exhibitor', {
|
||||||
// refresh: function(frm) {
|
// refresh: function(frm) {
|
||||||
|
|
||||||
// }
|
// }
|
||||||
87
community/event_management/doctype/exhibitor/exhibitor.json
Normal file
87
community/event_management/doctype/exhibitor/exhibitor.json
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-16 16:26:46.189119",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event",
|
||||||
|
"is_paid",
|
||||||
|
"column_break_3",
|
||||||
|
"user",
|
||||||
|
"full_name",
|
||||||
|
"company",
|
||||||
|
"section_break_7",
|
||||||
|
"description"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fetch_from": "user.full_name",
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Full Name",
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Company "
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "description",
|
||||||
|
"fieldtype": "Text Editor",
|
||||||
|
"label": "Description"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "is_paid",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Is Paid"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "user",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "User",
|
||||||
|
"options": "User"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_3",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_7",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-20 16:32:58.031324",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Exhibitor",
|
||||||
|
"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",
|
||||||
|
"title_field": "user",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class Exhibitor(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestExhibitor(unittest.TestCase):
|
||||||
|
pass
|
||||||
0
community/event_management/doctype/host/__init__.py
Normal file
0
community/event_management/doctype/host/__init__.py
Normal file
8
community/event_management/doctype/host/host.js
Normal file
8
community/event_management/doctype/host/host.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Host', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
57
community/event_management/doctype/host/host.json
Normal file
57
community/event_management/doctype/host/host.json
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-11 10:51:47.234690",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event",
|
||||||
|
"user",
|
||||||
|
"full_name"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Full Name",
|
||||||
|
"unique": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "user",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "User"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-20 17:03:26.733195",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Host",
|
||||||
|
"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",
|
||||||
|
"title_field": "user",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
8
community/event_management/doctype/host/host.py
Normal file
8
community/event_management/doctype/host/host.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class Host(Document):
|
||||||
|
pass
|
||||||
8
community/event_management/doctype/host/test_host.py
Normal file
8
community/event_management/doctype/host/test_host.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestHost(unittest.TestCase):
|
||||||
|
pass
|
||||||
14
community/event_management/doctype/speaker/speaker.js
Normal file
14
community/event_management/doctype/speaker/speaker.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Speaker', {
|
||||||
|
onload: function (frm) {
|
||||||
|
frm.set_query('user', function (doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"ignore_user_type": 1,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
72
community/event_management/doctype/speaker/speaker.json
Normal file
72
community/event_management/doctype/speaker/speaker.json
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-11 10:37:32.124651",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event",
|
||||||
|
"company",
|
||||||
|
"column_break_8",
|
||||||
|
"user",
|
||||||
|
"full_name"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "user",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "User",
|
||||||
|
"options": "User"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fetch_from": "user.full_name",
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Full Name",
|
||||||
|
"read_only": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Company"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_8",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-20 16:53:43.968260",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "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",
|
||||||
|
"title_field": "user",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
8
community/event_management/doctype/speaker/speaker.py
Normal file
8
community/event_management/doctype/speaker/speaker.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class Speaker(Document):
|
||||||
|
pass
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestSpeaker(unittest.TestCase):
|
||||||
|
pass
|
||||||
0
community/event_management/doctype/talk/__init__.py
Normal file
0
community/event_management/doctype/talk/__init__.py
Normal file
8
community/event_management/doctype/talk/talk.js
Normal file
8
community/event_management/doctype/talk/talk.js
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('Talk', {
|
||||||
|
// refresh: function(frm) {
|
||||||
|
|
||||||
|
// }
|
||||||
|
});
|
||||||
139
community/event_management/doctype/talk/talk.json
Normal file
139
community/event_management/doctype/talk/talk.json
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-18 08:42:58.711932",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"event",
|
||||||
|
"title",
|
||||||
|
"url",
|
||||||
|
"column_break_5",
|
||||||
|
"speaker",
|
||||||
|
"category",
|
||||||
|
"thumbnail",
|
||||||
|
"schedule_section",
|
||||||
|
"date",
|
||||||
|
"status",
|
||||||
|
"column_break_11",
|
||||||
|
"start_time",
|
||||||
|
"end_time",
|
||||||
|
"section_break_9",
|
||||||
|
"about",
|
||||||
|
"attachment",
|
||||||
|
"name_of_the_speaker"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "name_of_the_speaker",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Name of the Speaker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "url",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Video Embed Link"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "thumbnail",
|
||||||
|
"fieldtype": "Attach",
|
||||||
|
"label": "Preview Image"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "about",
|
||||||
|
"fieldtype": "Text",
|
||||||
|
"label": "About the Talk"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "attachment",
|
||||||
|
"fieldtype": "Attach",
|
||||||
|
"label": "Attachment"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "speaker",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Speaker",
|
||||||
|
"options": "Speaker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "Pending",
|
||||||
|
"fieldname": "status",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"label": "Status",
|
||||||
|
"options": "Pending\nApproved\nRejected"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_5",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_9",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "category",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Category"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "schedule_section",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"label": "Date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_11",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "start_time",
|
||||||
|
"fieldtype": "Time",
|
||||||
|
"label": "Start Time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "end_time",
|
||||||
|
"fieldtype": "Time",
|
||||||
|
"label": "End Time"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-24 16:47:34.557010",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "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
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sort_field": "modified",
|
||||||
|
"sort_order": "DESC",
|
||||||
|
"title_field": "title",
|
||||||
|
"track_changes": 1
|
||||||
|
}
|
||||||
29
community/event_management/doctype/talk/talk.py
Normal file
29
community/event_management/doctype/talk/talk.py
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
|
||||||
|
class Talk(Document):
|
||||||
|
def before_save(self):
|
||||||
|
if not self.speaker:
|
||||||
|
self.save_speaker()
|
||||||
|
|
||||||
|
def save_speaker(self):
|
||||||
|
exists = frappe.db.exists({
|
||||||
|
'doctype': 'Speaker',
|
||||||
|
'user': frappe.session.user
|
||||||
|
})
|
||||||
|
|
||||||
|
if exists:
|
||||||
|
self.speaker = frappe.db.get_value(
|
||||||
|
'Speaker', {'user': frappe.session.user}, ["name"])
|
||||||
|
|
||||||
|
else:
|
||||||
|
speaker = frappe.get_doc({
|
||||||
|
"doctype": "Speaker",
|
||||||
|
"event": self.event,
|
||||||
|
"user": frappe.session.user
|
||||||
|
})
|
||||||
|
speaker.save(ignore_permissions=True)
|
||||||
|
self.speaker = speaker.name
|
||||||
8
community/event_management/doctype/talk/test_talk.py
Normal file
8
community/event_management/doctype/talk/test_talk.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestTalk(unittest.TestCase):
|
||||||
|
pass
|
||||||
0
community/event_management/web_form/__init__.py
Normal file
0
community/event_management/web_form/__init__.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
frappe.ready(function () {
|
||||||
|
frappe.web_form.after_load = () => {
|
||||||
|
frappe.web_form.set_value("user", frappe.session.user);
|
||||||
|
}
|
||||||
|
|
||||||
|
frappe.web_form.after_save = () => {
|
||||||
|
setTimeout(function () {
|
||||||
|
window.location.href = '/about';
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
{
|
||||||
|
"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": "",
|
||||||
|
"creation": "2021-08-19 15:26:56.594526",
|
||||||
|
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
|
||||||
|
"doc_type": "Attendee",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Form",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": 1,
|
||||||
|
"login_required": 1,
|
||||||
|
"max_attachment_size": 0,
|
||||||
|
"modified": "2021-08-24 19:57:25.516319",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "attendee-registration",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"payment_button_label": "Buy Now",
|
||||||
|
"published": 1,
|
||||||
|
"route": "attendee-registration",
|
||||||
|
"route_to_success_link": 1,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_url": "/about",
|
||||||
|
"title": "Attendee Registration",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"default": "",
|
||||||
|
"fieldname": "user",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "User",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"options": "User",
|
||||||
|
"read_only": 1,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Company",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "what_are_you_hoping_to_learn",
|
||||||
|
"fieldtype": "Text",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "What are you hoping to learn",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
# do your magic here
|
||||||
|
pass
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
frappe.ready(function () {
|
||||||
|
|
||||||
|
frappe.web_form.after_load = () => {
|
||||||
|
frappe.web_form.set_value("user", frappe.session.user);
|
||||||
|
}
|
||||||
|
|
||||||
|
frappe.web_form.after_save = () => {
|
||||||
|
setTimeout(function () {
|
||||||
|
window.location.href = '/about';
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
{
|
||||||
|
"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": "Save",
|
||||||
|
"creation": "2021-08-16 16:27:06.566564",
|
||||||
|
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
|
||||||
|
"doc_type": "Exhibitor",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Form",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": 1,
|
||||||
|
"login_required": 1,
|
||||||
|
"max_attachment_size": 0,
|
||||||
|
"modified": "2021-08-23 10:12:24.038572",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "exhibitor-registration",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"payment_button_label": "Buy Now",
|
||||||
|
"published": 1,
|
||||||
|
"route": "exhibitor-registration",
|
||||||
|
"route_to_success_link": 0,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_url": "",
|
||||||
|
"title": "Exhibitor Registration",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "user",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "User",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"options": "User",
|
||||||
|
"read_only": 1,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Company ",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "description",
|
||||||
|
"fieldtype": "Text Editor",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Description",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
# do your magic here
|
||||||
|
pass
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
frappe.ready(function () {
|
||||||
|
frappe.web_form.after_load = () => {
|
||||||
|
frappe.web_form.set_value("user", frappe.session.user);
|
||||||
|
}
|
||||||
|
|
||||||
|
frappe.web_form.after_save = () => {
|
||||||
|
setTimeout(function () {
|
||||||
|
window.location.href = '/about';
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
{
|
||||||
|
"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",
|
||||||
|
"client_script": "",
|
||||||
|
"creation": "2021-08-19 15:16:22.341723",
|
||||||
|
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
|
||||||
|
"doc_type": "Talk",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Form",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": 1,
|
||||||
|
"login_required": 1,
|
||||||
|
"max_attachment_size": 0,
|
||||||
|
"modified": "2021-08-24 19:57:06.806994",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "purpose-a-talk",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"payment_button_label": "Buy Now",
|
||||||
|
"published": 1,
|
||||||
|
"route": "propose-talk",
|
||||||
|
"route_to_success_link": 0,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_message": "Talk Submitted!",
|
||||||
|
"success_url": "/purpose-a-talk",
|
||||||
|
"title": "Propose a Talk",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Title",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "category",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Category",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Event",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"options": "Event Details",
|
||||||
|
"read_only": 1,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "thumbnail",
|
||||||
|
"fieldtype": "Attach",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Preview Image",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "about",
|
||||||
|
"fieldtype": "Text Editor",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "About",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"show_in_filter": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
# do your magic here
|
||||||
|
pass
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
frappe.ready(function () {
|
||||||
|
frappe.web_form.after_load = () => {
|
||||||
|
frappe.web_form.set_value("user", frappe.session.user);
|
||||||
|
}
|
||||||
|
frappe.web_form.after_save = () => {
|
||||||
|
setTimeout(function () {
|
||||||
|
window.location.href = '/event/conference2021/propose-talk';
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
{
|
||||||
|
"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": "Register",
|
||||||
|
"creation": "2021-08-19 15:29:01.167930",
|
||||||
|
"custom_css": "[data-doctype=\"Web Form\"] {\n max-width: 720px;\n margin: 6rem auto;\n}",
|
||||||
|
"doc_type": "Speaker",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Form",
|
||||||
|
"idx": 0,
|
||||||
|
"is_standard": 1,
|
||||||
|
"login_required": 1,
|
||||||
|
"max_attachment_size": 0,
|
||||||
|
"modified": "2021-08-20 16:16:51.107177",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "speaker-registration",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"payment_button_label": "Buy Now",
|
||||||
|
"published": 1,
|
||||||
|
"route": "speaker-registration",
|
||||||
|
"route_to_success_link": 1,
|
||||||
|
"show_attachments": 0,
|
||||||
|
"show_in_grid": 0,
|
||||||
|
"show_sidebar": 0,
|
||||||
|
"sidebar_items": [],
|
||||||
|
"success_url": "/speaker-registration",
|
||||||
|
"title": "Speaker Registration",
|
||||||
|
"web_form_fields": [
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Event",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"options": "Event Details",
|
||||||
|
"read_only": 1,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "user",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "User",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"options": "User",
|
||||||
|
"read_only": 1,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "full_name",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Full Name",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"show_in_filter": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_read_on_all_link_options": 0,
|
||||||
|
"fieldname": "company",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"hidden": 0,
|
||||||
|
"label": "Company",
|
||||||
|
"max_length": 0,
|
||||||
|
"max_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"reqd": 1,
|
||||||
|
"show_in_filter": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import frappe
|
||||||
|
|
||||||
|
def get_context(context):
|
||||||
|
# do your magic here
|
||||||
|
pass
|
||||||
0
community/event_management/web_template/__init__.py
Normal file
0
community/event_management/web_template/__init__.py
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
<div class="section-with-cards">
|
||||||
|
<h1 class="course-home-headings">{{title}}</h1>
|
||||||
|
{%- if subtitle -%}
|
||||||
|
<p class="section-description">{{ subtitle }}</p>
|
||||||
|
{%- endif -%}
|
||||||
|
<div>
|
||||||
|
<div class="mentors-section">
|
||||||
|
{% for exhibitor in exhibitor_details %}
|
||||||
|
{% set exhibitor_doc = frappe.db.get_value("Exhibitor", exhibitor.exhibitor, ["user", "company"], as_dict= True)
|
||||||
|
%}
|
||||||
|
{% set member = frappe.get_doc("User", exhibitor_doc.user) %}
|
||||||
|
|
||||||
|
<div class="common-card-style member-card">
|
||||||
|
{{ widgets.Avatar(member=member, avatar_class="avatar-large")}}
|
||||||
|
<div class="small-title member-card-title">
|
||||||
|
{{ member.full_name }}
|
||||||
|
</div>
|
||||||
|
<div class="small-title">
|
||||||
|
{{exhibitor_doc.company}}
|
||||||
|
</div>
|
||||||
|
<a class="stretched-link" href=""></a>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
<div class="event-btn"><a href="/exhibitor-registration?new=1&user={{ frappe.session.user }}&event={{ event }}"
|
||||||
|
class="btn btn-primary ">Become an Exhibitor</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-13 15:05:41.606772",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subtitle",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "exhibitor_details",
|
||||||
|
"fieldtype": "Table Break",
|
||||||
|
"label": "Exhibitor Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "exhibitor",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Exhibitor",
|
||||||
|
"options": "Exhibitor",
|
||||||
|
"reqd": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idx": 1,
|
||||||
|
"modified": "2021-08-20 16:28:22.779057",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Exhibitor Section",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<div class="section-with-cards">
|
||||||
|
<h1 class="course-home-headings">{{title}}</h1>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-20 08:12:29.549625",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subtitle",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"fieldname": "hosts",
|
||||||
|
"fieldtype": "Table Break",
|
||||||
|
"label": "Hosts",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "host",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Host",
|
||||||
|
"options": "Host",
|
||||||
|
"reqd": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idx": 0,
|
||||||
|
"modified": "2021-08-20 08:16:25.805456",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Host Section",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<div class="section-with-cards">
|
||||||
|
<h1 class="course-home-headings">{{section_title}}</h1>
|
||||||
|
{%- if subtitle -%}
|
||||||
|
<p class="section-description">{{ subtitle }}</p>
|
||||||
|
{%- endif -%}
|
||||||
|
<div class="mentors-section">
|
||||||
|
{% for speaker in speaker_details %}
|
||||||
|
{% set speaker_doc = frappe.db.get_value("Speaker", speaker.speaker, ["user", "company"], as_dict= True)
|
||||||
|
%}
|
||||||
|
{% set member = frappe.get_doc("User", speaker_doc.user) %}
|
||||||
|
|
||||||
|
<div class="common-card-style member-card">
|
||||||
|
{{ widgets.Avatar(member=member, avatar_class="avatar-large") }}
|
||||||
|
|
||||||
|
<div class="small-title member-card-title">
|
||||||
|
{{ member.full_name }}
|
||||||
|
</div>
|
||||||
|
<div class="small-title">
|
||||||
|
{{speaker_doc.company}}
|
||||||
|
</div>
|
||||||
|
<a class="stretched-link" href=""></a>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="event-btn">
|
||||||
|
<a href='/propose-talk?new=1&event={{ event }}' class="btn btn-primary ">Propose a Talk</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-12 21:15:14.492000",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "section_title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Section Title",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subtitle",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event_",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event ",
|
||||||
|
"options": "Event Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "speaker_details",
|
||||||
|
"fieldtype": "Table Break",
|
||||||
|
"label": "Speaker Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "speaker",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Speaker",
|
||||||
|
"options": "Speaker",
|
||||||
|
"reqd": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idx": 1,
|
||||||
|
"modified": "2021-08-20 10:59:54.965714",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Speaker Section",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
<div class="section-with-cards">
|
||||||
|
<div class="course-home-headings">{{title}}</div>
|
||||||
|
{%- if subtitle -%}
|
||||||
|
<p class="section-description">{{ subtitle }}</p>
|
||||||
|
{%- endif -%}
|
||||||
|
<div class="cards-parent">
|
||||||
|
|
||||||
|
{% for talk in talk_details %}
|
||||||
|
|
||||||
|
{% set talk_doc = frappe.db.get_value('Talk', talk.talk,
|
||||||
|
["title", "category", "speaker", "url", "thumbnail", "date", "start_time", "end_time"], as_dict=True) %}
|
||||||
|
{% set speaker_info = frappe.db.get_value("Speaker", talk_doc.speaker, ["user"], as_dict=True) %}
|
||||||
|
{% set member = frappe.get_doc("User", speaker_info.user) %}
|
||||||
|
|
||||||
|
{% if talk_doc.thumbnail %}
|
||||||
|
{% set thumbnail = talk_doc.thumbnail %}
|
||||||
|
{% else %}
|
||||||
|
{% set video_id = talk_doc.url and talk_doc.url.split("/")[-1] %}
|
||||||
|
{% set thumbnail = video_id and "https://img.youtube.com/vi/" + video_id + "/maxresdefault.jpg" %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="common-card-style flex-column">
|
||||||
|
<div class="course-image {% if not thumbnail %}default-image{% endif %}" {% if thumbnail %}
|
||||||
|
style="background-image: url( {{ thumbnail }} );" {% endif %}>
|
||||||
|
<div class="course-tags">
|
||||||
|
{% for tag in talk_doc.category.split(",") %}
|
||||||
|
<div class="course-card-pills">{{ tag }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
{% if not thumbnail %}
|
||||||
|
<div class="default-image-text">{{ talk_doc.title[0] }}</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
<div class="course-card-content">
|
||||||
|
<div class="course-card-content"></div>
|
||||||
|
<div class="course-card-title">{{talk_doc.title}}</div>
|
||||||
|
<div class="muted-text mb-3">
|
||||||
|
{% if talk_doc.date %}
|
||||||
|
<span>
|
||||||
|
<img src="/assets/community/icons/calendar.svg">
|
||||||
|
{{ frappe.utils.format_date(talk_doc.date, "medium") }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
<span class="pull-right">
|
||||||
|
{% if talk_doc.start_time %}
|
||||||
|
<span class="mr-3">
|
||||||
|
<b>From:</b>
|
||||||
|
{{ frappe.utils.format_time(talk_doc.start_time, "HH:mm") }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
{% if talk_doc.end_time %}
|
||||||
|
<span>
|
||||||
|
<b>To:</b>
|
||||||
|
{{ frappe.utils.format_time(talk_doc.end_time, "HH:mm") }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="card-divider"></div>
|
||||||
|
<div class="course-card-meta-2">
|
||||||
|
{{ widgets.Avatar(member=member, avatar_class="avatar-small")}}
|
||||||
|
<span class="course-instructor"> {{ member.full_name }} </span>
|
||||||
|
<span class="small-title company-name"></span>
|
||||||
|
</div>
|
||||||
|
<div class="view-talk-link">
|
||||||
|
Vew Talk
|
||||||
|
<img class="ml-3" src="/assets/community/icons/black-arrow.svg" />
|
||||||
|
</div>
|
||||||
|
<a class="stretched-link" href="{{talk_doc.url}}"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"__unsaved": 1,
|
||||||
|
"creation": "2021-08-13 11:34:07.611034",
|
||||||
|
"docstatus": 0,
|
||||||
|
"doctype": "Web Template",
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "title",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Title",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "subtitle",
|
||||||
|
"fieldtype": "Data",
|
||||||
|
"label": "Subtitle",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "event",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Event",
|
||||||
|
"options": "Event Details",
|
||||||
|
"reqd": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "talk_details",
|
||||||
|
"fieldtype": "Table Break",
|
||||||
|
"label": "Talk Details",
|
||||||
|
"reqd": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "talk",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Talk",
|
||||||
|
"options": "Talk",
|
||||||
|
"reqd": 0
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"idx": 1,
|
||||||
|
"modified": "2021-08-20 10:58:45.556636",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "Event Management",
|
||||||
|
"name": "Talk Section",
|
||||||
|
"owner": "Administrator",
|
||||||
|
"standard": 1,
|
||||||
|
"template": "",
|
||||||
|
"type": "Section"
|
||||||
|
}
|
||||||
@@ -85,7 +85,8 @@ web_include_css = "community.bundle.css"
|
|||||||
# Override standard doctype classes
|
# Override standard doctype classes
|
||||||
|
|
||||||
override_doctype_class = {
|
override_doctype_class = {
|
||||||
"User": "community.overrides.user.CustomUser"
|
"User": "community.overrides.user.CustomUser",
|
||||||
|
"Web Template": "community.overrides.web_template.CustomWebTemplate"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Document Events
|
# Document Events
|
||||||
@@ -130,60 +131,31 @@ fixtures = ["Custom Field"]
|
|||||||
# auto_cancel_exempted_doctypes = ["Auto Repeat"]
|
# auto_cancel_exempted_doctypes = ["Auto Repeat"]
|
||||||
|
|
||||||
# Add all simple route rules here
|
# Add all simple route rules here
|
||||||
primary_rules = [
|
website_route_rules = [
|
||||||
{"from_route": "/sketches/<sketch>", "to_route": "sketches/sketch"},
|
{"from_route": "/sketches/<sketch>", "to_route": "sketches/sketch"},
|
||||||
{"from_route": "/courses/<course>", "to_route": "courses/course"},
|
{"from_route": "/courses/<course>", "to_route": "courses/course"},
|
||||||
{"from_route": "/courses/<course>/<topic>", "to_route": "courses/topic"},
|
{"from_route": "/courses/<course>/<certificate>", "to_route": "courses/certificate"},
|
||||||
{"from_route": "/hackathons/<hackathon>", "to_route": "hackathons/hackathon"},
|
{"from_route": "/hackathons/<hackathon>", "to_route": "hackathons/hackathon"},
|
||||||
{"from_route": "/hackathons/<hackathon>/<project>", "to_route": "hackathons/project"},
|
{"from_route": "/hackathons/<hackathon>/<project>", "to_route": "hackathons/project"},
|
||||||
{"from_route": "/add-a-new-batch", "to_route": "add-a-new-batch"},
|
{"from_route": "/courses/<course>/learn", "to_route": "batch/learn"},
|
||||||
{"from_route": "/courses/<course>/home", "to_route": "batch/home"},
|
{"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
|
||||||
{"from_route": "/courses/<course>/learn", "to_route": "batch/learn"},
|
{"from_route": "/courses/<course>/progress", "to_route": "batch/progress"},
|
||||||
{"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
|
{"from_route": "/courses/<course>/join", "to_route": "batch/join"},
|
||||||
{"from_route": "/courses/<course>/schedule", "to_route": "batch/schedule"},
|
|
||||||
{"from_route": "/courses/<course>/members", "to_route": "batch/members"},
|
|
||||||
{"from_route": "/courses/<course>/discuss", "to_route": "batch/discuss"},
|
|
||||||
{"from_route": "/courses/<course>/about", "to_route": "batch/about"},
|
|
||||||
{"from_route": "/courses/<course>/progress", "to_route": "batch/progress"},
|
|
||||||
{"from_route": "/courses/<course>/join", "to_route": "batch/join"}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
# Any frappe default URL is blocked by profile-rules, add it here to unblock it
|
|
||||||
whitelist = [
|
|
||||||
"/home",
|
|
||||||
"/login",
|
|
||||||
"/update-password",
|
|
||||||
"/update-profile",
|
|
||||||
"/third-party-apps",
|
|
||||||
"/website_script.js",
|
|
||||||
"/courses",
|
|
||||||
"/sketches",
|
|
||||||
"/admin",
|
|
||||||
"/socket.io",
|
|
||||||
"/hackathons",
|
|
||||||
"/dashboard",
|
|
||||||
"/join-request",
|
|
||||||
"/add-a-new-batch",
|
|
||||||
"/new-sign-up",
|
|
||||||
"/message",
|
|
||||||
"/about",
|
|
||||||
"/edit-profile"
|
|
||||||
]
|
|
||||||
whitelist_rules = [{"from_route": p, "to_route": p[1:]} for p in whitelist]
|
|
||||||
|
|
||||||
# regex rule to match all profiles
|
|
||||||
profile_rules = [
|
|
||||||
{"from_route": "/<string(minlength=4):username>", "to_route": "profiles/profile"},
|
|
||||||
]
|
|
||||||
|
|
||||||
website_route_rules = primary_rules + whitelist_rules + profile_rules
|
|
||||||
|
|
||||||
website_redirects = [
|
website_redirects = [
|
||||||
{"source": "/update-profile", "target": "/edit-profile"},
|
{"source": "/update-profile", "target": "/edit-profile"},
|
||||||
]
|
]
|
||||||
|
|
||||||
update_website_context = 'community.widgets.update_website_context'
|
update_website_context = [
|
||||||
|
'community.widgets.update_website_context',
|
||||||
|
]
|
||||||
|
jinja = {
|
||||||
|
"methods": [
|
||||||
|
"community.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 community.community.plugins.ProfileTab
|
## Each entry must be a subclass of community.community.plugins.ProfileTab
|
||||||
# profile_tabs = []
|
# profile_tabs = []
|
||||||
@@ -202,4 +174,14 @@ community_markdown_macro_renderers = {
|
|||||||
"Exercise": "community.plugins.exercise_renderer",
|
"Exercise": "community.plugins.exercise_renderer",
|
||||||
"Quiz": "community.plugins.quiz_renderer",
|
"Quiz": "community.plugins.quiz_renderer",
|
||||||
"YouTubeVideo": "community.plugins.youtube_video_renderer",
|
"YouTubeVideo": "community.plugins.youtube_video_renderer",
|
||||||
|
"Video": "community.plugins.video_renderer"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# page_renderer to manage profile pages
|
||||||
|
page_renderer = [
|
||||||
|
"community.page_renderers.ProfileRedirectPage",
|
||||||
|
"community.page_renderers.ProfilePage"
|
||||||
|
]
|
||||||
|
|
||||||
|
# set this to "/" to have profiles on the top-level
|
||||||
|
profile_url_prefix = "/users/"
|
||||||
|
|||||||
@@ -8,7 +8,9 @@
|
|||||||
"field_order": [
|
"field_order": [
|
||||||
"course",
|
"course",
|
||||||
"title",
|
"title",
|
||||||
|
"column_break_3",
|
||||||
"description",
|
"description",
|
||||||
|
"section_break_5",
|
||||||
"lessons"
|
"lessons"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
@@ -16,11 +18,12 @@
|
|||||||
"fieldname": "title",
|
"fieldname": "title",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Title"
|
"label": "Title",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Markdown Editor",
|
"fieldtype": "Small Text",
|
||||||
"label": "Description"
|
"label": "Description"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -28,13 +31,22 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Course",
|
"label": "Course",
|
||||||
"options": "LMS Course"
|
"options": "LMS Course",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "lessons",
|
"fieldname": "lessons",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"label": "Lessons",
|
"label": "Lessons",
|
||||||
"options": "Lessons"
|
"options": "Lessons"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_3",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_5",
|
||||||
|
"fieldtype": "Section Break"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
@@ -45,7 +57,7 @@
|
|||||||
"link_fieldname": "chapter"
|
"link_fieldname": "chapter"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2021-07-27 16:28:08.667964",
|
"modified": "2021-08-31 10:43:45.866864",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "Chapter",
|
"name": "Chapter",
|
||||||
|
|||||||
@@ -3,11 +3,6 @@
|
|||||||
|
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from ..lesson.lesson import update_progress
|
|
||||||
|
|
||||||
class ExerciseSubmission(Document):
|
class ExerciseSubmission(Document):
|
||||||
|
pass
|
||||||
def after_insert(self):
|
|
||||||
course_details = frappe.get_doc("LMS Course", self.course)
|
|
||||||
if not (course_details.is_mentor(frappe.session.user) or frappe.flags.in_test):
|
|
||||||
update_progress(self.lesson)
|
|
||||||
|
|||||||
@@ -17,6 +17,15 @@ frappe.ui.form.on('Lesson', {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-4">
|
||||||
|
Video
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
{{ Video("url_of_source") }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
YouTube Video
|
YouTube Video
|
||||||
|
|||||||
@@ -22,18 +22,21 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Chapter",
|
"label": "Chapter",
|
||||||
"options": "Chapter"
|
"options": "Chapter",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "title",
|
"fieldname": "title",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Title"
|
"label": "Title",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "body",
|
"fieldname": "body",
|
||||||
"fieldtype": "Markdown Editor",
|
"fieldtype": "Markdown Editor",
|
||||||
"label": "Body"
|
"label": "Body",
|
||||||
|
"reqd": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "index_label",
|
"fieldname": "index_label",
|
||||||
@@ -67,7 +70,7 @@
|
|||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-07-27 16:28:29.203624",
|
"modified": "2021-08-31 10:44:14.168257",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "Lesson",
|
"name": "Lesson",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from frappe.model.document import Document
|
|||||||
from ...md import markdown_to_html, find_macros
|
from ...md import markdown_to_html, find_macros
|
||||||
|
|
||||||
class Lesson(Document):
|
class Lesson(Document):
|
||||||
def before_save(self):
|
def on_update(self):
|
||||||
dynamic_documents = ["Exercise", "Quiz"]
|
dynamic_documents = ["Exercise", "Quiz"]
|
||||||
for section in dynamic_documents:
|
for section in dynamic_documents:
|
||||||
self.update_lesson_name_in_document(section)
|
self.update_lesson_name_in_document(section)
|
||||||
@@ -91,42 +91,5 @@ def save_progress(lesson, course, status):
|
|||||||
"lesson": lesson,
|
"lesson": lesson,
|
||||||
"status": status,
|
"status": status,
|
||||||
}).save(ignore_permissions=True)
|
}).save(ignore_permissions=True)
|
||||||
return "OK"
|
course_details = frappe.get_doc("LMS Course", course)
|
||||||
|
return course_details.get_course_progress()
|
||||||
def update_progress(lesson):
|
|
||||||
user = frappe.session.user
|
|
||||||
if not all_dynamic_content_submitted(lesson, user):
|
|
||||||
return
|
|
||||||
if frappe.db.exists("LMS Course Progress", {"lesson": lesson, "owner": user}):
|
|
||||||
course_progress = frappe.get_doc("LMS Course Progress", {"lesson": lesson, "owner": user})
|
|
||||||
course_progress.status = "Complete"
|
|
||||||
course_progress.save(ignore_permissions=True)
|
|
||||||
|
|
||||||
def all_dynamic_content_submitted(lesson, user):
|
|
||||||
all_exercises_submitted = check_all_exercise_submission(lesson, user)
|
|
||||||
all_quiz_submitted = check_all_quiz_submitted(lesson, user)
|
|
||||||
return all_exercises_submitted and all_quiz_submitted
|
|
||||||
|
|
||||||
def check_all_exercise_submission(lesson, user):
|
|
||||||
exercise_names = frappe.get_list("Exercise", {"lesson": lesson}, pluck="name", ignore_permissions=True)
|
|
||||||
if not len(exercise_names):
|
|
||||||
return True
|
|
||||||
query = {
|
|
||||||
"exercise": ["in", exercise_names],
|
|
||||||
"owner": user
|
|
||||||
}
|
|
||||||
if frappe.db.count("Exercise Submission", query) == len(exercise_names):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|
||||||
def check_all_quiz_submitted(lesson, user):
|
|
||||||
quizzes = frappe.get_list("LMS Quiz", {"lesson": lesson}, pluck="name", ignore_permissions=True)
|
|
||||||
if not len(quizzes):
|
|
||||||
return True
|
|
||||||
query = {
|
|
||||||
"quiz": ["in", quizzes],
|
|
||||||
"owner": user
|
|
||||||
}
|
|
||||||
if frappe.db.count("LMS Quiz Submission", query) == len(quizzes):
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
|
|||||||
@@ -13,13 +13,14 @@
|
|||||||
"fieldtype": "Link",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Lesson",
|
"label": "Lesson",
|
||||||
"options": "Lesson"
|
"options": "Lesson",
|
||||||
|
"reqd": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-07-27 16:53:52.732191",
|
"modified": "2021-08-31 10:44:42.048232",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "Lessons",
|
"name": "Lessons",
|
||||||
|
|||||||
@@ -35,14 +35,6 @@ class LMSBatch(Document):
|
|||||||
filters['member_type'] = member_type
|
filters['member_type'] = member_type
|
||||||
return frappe.db.exists("LMS Batch Membership", filters)
|
return frappe.db.exists("LMS Batch Membership", filters)
|
||||||
|
|
||||||
def get_messages(self):
|
|
||||||
messages = frappe.get_all("LMS Message", {"batch": self.name}, ["*"], order_by="creation")
|
|
||||||
for message in messages:
|
|
||||||
message.message = frappe.utils.md_to_html(message.message)
|
|
||||||
if message.author == frappe.session.user:
|
|
||||||
message.author_name = "You"
|
|
||||||
message.is_author = True
|
|
||||||
return messages
|
|
||||||
|
|
||||||
def get_membership(self, email):
|
def get_membership(self, email):
|
||||||
"""Returns the membership document of given user.
|
"""Returns the membership document of given user.
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
"fieldname": "member_type",
|
"fieldname": "member_type",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
"label": "Member Type",
|
"label": "Member Type",
|
||||||
"options": "\nStudent\nMentor\nStaff"
|
"options": "\nStudent\nMentor\nStaff"
|
||||||
},
|
},
|
||||||
@@ -44,7 +45,6 @@
|
|||||||
"default": "Member",
|
"default": "Member",
|
||||||
"fieldname": "role",
|
"fieldname": "role",
|
||||||
"fieldtype": "Select",
|
"fieldtype": "Select",
|
||||||
"in_standard_filter": 1,
|
|
||||||
"label": "Role",
|
"label": "Role",
|
||||||
"options": "\nMember\nAdmin"
|
"options": "\nMember\nAdmin"
|
||||||
},
|
},
|
||||||
@@ -63,9 +63,10 @@
|
|||||||
{
|
{
|
||||||
"fetch_from": "batch.course",
|
"fetch_from": "batch.course",
|
||||||
"fieldname": "course",
|
"fieldname": "course",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Link",
|
||||||
"in_list_view": 1,
|
"in_list_view": 1,
|
||||||
"label": "Course"
|
"label": "Course",
|
||||||
|
"options": "LMS Course"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"fieldname": "current_lesson",
|
"fieldname": "current_lesson",
|
||||||
@@ -83,7 +84,7 @@
|
|||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
"links": [],
|
"links": [],
|
||||||
"modified": "2021-07-06 20:50:46.885325",
|
"modified": "2021-08-04 17:10:42.708479",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Batch Membership",
|
"name": "LMS Batch Membership",
|
||||||
|
|||||||
0
community/lms/doctype/lms_certification/__init__.py
Normal file
0
community/lms/doctype/lms_certification/__init__.py
Normal file
14
community/lms/doctype/lms_certification/lms_certification.js
Normal file
14
community/lms/doctype/lms_certification/lms_certification.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Copyright (c) 2021, FOSS United and contributors
|
||||||
|
// For license information, please see license.txt
|
||||||
|
|
||||||
|
frappe.ui.form.on('LMS Certification', {
|
||||||
|
onload: function (frm) {
|
||||||
|
frm.set_query("student", function (doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"ignore_user_type": 1,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
{
|
||||||
|
"actions": [],
|
||||||
|
"creation": "2021-08-16 15:47:19.494055",
|
||||||
|
"doctype": "DocType",
|
||||||
|
"editable_grid": 1,
|
||||||
|
"engine": "InnoDB",
|
||||||
|
"field_order": [
|
||||||
|
"student",
|
||||||
|
"issue_date",
|
||||||
|
"column_break_3",
|
||||||
|
"course",
|
||||||
|
"expiry_date"
|
||||||
|
],
|
||||||
|
"fields": [
|
||||||
|
{
|
||||||
|
"fieldname": "student",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"label": "Student",
|
||||||
|
"options": "User"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "issue_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"label": "Issue Date"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_3",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "course",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"label": "Course",
|
||||||
|
"options": "LMS Course"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "expiry_date",
|
||||||
|
"fieldtype": "Date",
|
||||||
|
"label": "Expiry Date"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"index_web_pages_for_search": 1,
|
||||||
|
"links": [],
|
||||||
|
"modified": "2021-08-16 15:47:19.494055",
|
||||||
|
"modified_by": "Administrator",
|
||||||
|
"module": "LMS",
|
||||||
|
"name": "LMS Certification",
|
||||||
|
"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
|
||||||
|
}
|
||||||
45
community/lms/doctype/lms_certification/lms_certification.py
Normal file
45
community/lms/doctype/lms_certification/lms_certification.py
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and contributors
|
||||||
|
# For license information, please see license.txt
|
||||||
|
|
||||||
|
import frappe
|
||||||
|
from frappe.model.document import Document
|
||||||
|
from frappe.utils import nowdate, add_years
|
||||||
|
from frappe import _
|
||||||
|
from frappe.utils.pdf import get_pdf
|
||||||
|
|
||||||
|
class LMSCertification(Document):
|
||||||
|
|
||||||
|
def validate(self):
|
||||||
|
certificates = frappe.get_all("LMS Certification", {
|
||||||
|
"student": self.student,
|
||||||
|
"course": self.course,
|
||||||
|
"expiry_date": [">", nowdate()]
|
||||||
|
})
|
||||||
|
if len(certificates):
|
||||||
|
full_name = frappe.db.get_value("User", self.student, "full_name")
|
||||||
|
course_name = frappe.db.get_value("LMS Course", self.course, "title")
|
||||||
|
frappe.throw(_("There is already a valid certificate for user {0} for the course {1}").format(full_name, course_name))
|
||||||
|
|
||||||
|
@frappe.whitelist()
|
||||||
|
def create_certificate(course):
|
||||||
|
course_details = frappe.get_doc("LMS Course", course)
|
||||||
|
certificate = course_details.is_certified()
|
||||||
|
|
||||||
|
if certificate:
|
||||||
|
return certificate
|
||||||
|
|
||||||
|
else:
|
||||||
|
expires_after_yrs = int(course_details.expiry)
|
||||||
|
expiry_date = None
|
||||||
|
if expires_after_yrs:
|
||||||
|
expiry_date = add_years(nowdate(), expires_after_yrs)
|
||||||
|
|
||||||
|
certificate = frappe.get_doc({
|
||||||
|
"doctype": "LMS Certification",
|
||||||
|
"student": frappe.session.user,
|
||||||
|
"course": course,
|
||||||
|
"issue_date": nowdate(),
|
||||||
|
"expiry_date": expiry_date
|
||||||
|
})
|
||||||
|
certificate.save(ignore_permissions=True)
|
||||||
|
return certificate.name
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
# Copyright (c) 2021, FOSS United and Contributors
|
||||||
|
# See license.txt
|
||||||
|
|
||||||
|
# import frappe
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
class TestLMSCertification(unittest.TestCase):
|
||||||
|
pass
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
frappe.ui.form.on('LMS Course', {
|
frappe.ui.form.on('LMS Course', {
|
||||||
|
|
||||||
onload: function (frm) {
|
onload: function (frm) {
|
||||||
|
|
||||||
frm.set_query("chapter", "chapters", function () {
|
frm.set_query("chapter", "chapters", function () {
|
||||||
return {
|
return {
|
||||||
filters: {
|
filters: {
|
||||||
@@ -11,6 +12,14 @@ frappe.ui.form.on('LMS Course', {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
frm.set_query("instructor", function (doc) {
|
||||||
|
return {
|
||||||
|
filters: {
|
||||||
|
"ignore_user_type": 1,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,14 +18,21 @@
|
|||||||
"video_link",
|
"video_link",
|
||||||
"image",
|
"image",
|
||||||
"column_break_3",
|
"column_break_3",
|
||||||
|
"instructor",
|
||||||
"tags",
|
"tags",
|
||||||
|
"section_break_7",
|
||||||
"is_published",
|
"is_published",
|
||||||
|
"column_break_9",
|
||||||
"upcoming",
|
"upcoming",
|
||||||
|
"column_break_11",
|
||||||
"disable_self_learning",
|
"disable_self_learning",
|
||||||
"section_break_5",
|
"section_break_5",
|
||||||
"short_introduction",
|
"short_introduction",
|
||||||
"description",
|
"description",
|
||||||
"chapters"
|
"chapters",
|
||||||
|
"certification_section",
|
||||||
|
"enable_certification",
|
||||||
|
"expiry"
|
||||||
],
|
],
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
@@ -94,6 +101,46 @@
|
|||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"label": "Chapters",
|
"label": "Chapters",
|
||||||
"options": "Chapters"
|
"options": "Chapters"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "instructor",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"in_list_view": 1,
|
||||||
|
"in_standard_filter": 1,
|
||||||
|
"label": "Instructor",
|
||||||
|
"options": "User"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "section_break_7",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Course Settings"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_9",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "column_break_11",
|
||||||
|
"fieldtype": "Column Break"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fieldname": "certification_section",
|
||||||
|
"fieldtype": "Section Break",
|
||||||
|
"label": "Certification"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "enable_certification",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"label": "Enable Certification"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"default": "0",
|
||||||
|
"depends_on": "enable_certification",
|
||||||
|
"fieldname": "expiry",
|
||||||
|
"fieldtype": "Select",
|
||||||
|
"label": "Certification Expires After Years",
|
||||||
|
"options": "0\n1\n2\n3\n4\n5\n6\n7\n8\n9\n10"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"index_web_pages_for_search": 1,
|
"index_web_pages_for_search": 1,
|
||||||
@@ -115,7 +162,7 @@
|
|||||||
"link_fieldname": "course"
|
"link_fieldname": "course"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"modified": "2021-07-28 19:01:50.677445",
|
"modified": "2021-08-25 11:04:57.211898",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "LMS",
|
"module": "LMS",
|
||||||
"name": "LMS Course",
|
"name": "LMS Course",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user