Compare commits

...

301 Commits

Author SHA1 Message Date
pateljannat aa20136223 fix: undo status change on livecode 2021-06-28 13:05:20 +05:30
pateljannat 5a7afb3092 fix: added livecode editor in community 2021-06-24 16:38:02 +05:30
Jannat Patel 56d8a72a7d Merge pull request #136 from fossunited/quiz
feat: Quizzes, Youtube Video integration and Other Minor Fixes
2021-06-24 10:34:36 +05:30
pateljannat f6c11ce52f fix: conflicts 2021-06-24 10:27:01 +05:30
pateljannat 0284c9305c fix: quiz progress and youtube video integration 2021-06-24 10:25:23 +05:30
Jannat Patel d785fb7562 Merge pull request #127 from fossunited/livecode-cleanup
refactor: removed the portal pages for showing sketches
2021-06-23 13:09:26 +05:30
Anand Chitipothu 9f50af4ebd refactor: removed the portal pages for showing sketches
Moved them to mon_school.
2021-06-23 12:53:35 +05:30
Jannat Patel 4c3645f0d4 Merge pull request #133 from fossunited/mon-fixes-01
Various fixes from mon.school
2021-06-23 11:44:35 +05:30
Anand Chitipothu 20b3ae7d76 fix: error in linking lessons on course page
The course was adding `{{ no such element: community.lms.doctype.lms_course.lms_course.LMSCourse object['query_parameter'] }}`
to the lesson links. Fixed it by setting query_parameter to "".
2021-06-23 10:27:01 +05:30
Anand Chitipothu f303be4db5 fix: error in find_macros when the input is empty
Added a special case to handle this issue.
2021-06-22 18:12:31 +05:30
Anand Chitipothu fc1c393f15 feat: allow a student to be mentor of another batch
This is a requirement for mon.school. The students are of the first
batch are now mentors of new batches.
2021-06-22 18:09:21 +05:30
pateljannat 5d96bf544d fix: conflicts 2021-06-22 12:28:12 +05:30
Jannat Patel 5abfa35095 Merge pull request #132 from fossunited/learning-modes
feat: learning modes and batch switching
2021-06-22 12:23:46 +05:30
pateljannat 6c751cdf39 fix: test 2021-06-22 12:17:06 +05:30
pateljannat 2c570ea214 fix: added default value for arguements 2021-06-22 10:48:33 +05:30
pateljannat ecfcc8a2f7 fix: redirects and urls 2021-06-22 10:45:07 +05:30
pateljannat 3384f974e5 fix: batch switch with query parameters 2021-06-22 10:11:21 +05:30
pateljannat eb435261fe feat: learning modes 2021-06-18 18:31:10 +05:30
Jannat Patel dc7eabefb9 Merge pull request #131 from fossunited/minor-fixes
fix: web form, progress ui, title non unique
2021-06-16 13:15:10 +05:30
pateljannat fed4b5568b fix: web form, progress ui, title non unique 2021-06-16 13:04:45 +05:30
Jannat Patel aa77c60abd Merge pull request #129 from fossunited/minor-fix
fix: minor issues
2021-06-15 18:46:33 +05:30
pateljannat 9c1506d3c8 fix: minor issues 2021-06-15 18:40:14 +05:30
Jannat Patel e94c3f27ab Merge pull request #128 from fossunited/ui-fixes
fix: UI fixes
2021-06-15 13:19:03 +05:30
pateljannat 5fa8bdd40c fix: invite request test, removed print statements and unused classes' 2021-06-15 13:09:48 +05:30
pateljannat 17f03aeee7 fix: join batch, removed code revision, redirects for other pages if batch missing 2021-06-15 13:01:57 +05:30
pateljannat 7840512a13 fix: ui, preview, progress, batches 2021-06-14 18:45:46 +05:30
Anand Chitipothu 526ded784b Merge pull request #125 from fossunited/hotfix-exercise-image
fix: fixed error on saving exercises
2021-06-12 21:42:27 +05:30
Anand Chitipothu 6b5ddcd54a fix: fixed error on saving exercises
Removed the image generation when exercise is saved. The library used
for exercises has changed and generating the image doesn't work any
more.
2021-06-12 10:49:27 +05:30
Jannat Patel c42247db42 Merge pull request #122 from fderyckel/patch-1
frappe wasn't imported
2021-06-10 20:47:05 +05:30
François de Ryckel 8f8d4901ff frappe wasn't imported
error with NameError: name 'frappe' is not defined
2021-06-10 18:04:40 +03:00
pateljannat f5f3c808d4 Merge branch 'main' of https://github.com/frappe/community into ui-fixes 2021-06-10 13:41:31 +05:30
pateljannat 1e3152e303 fix: ui 2021-06-10 13:41:11 +05:30
Jannat Patel 344661cf83 Merge pull request #121 from fossunited/lesson-markup
Lesson markup
2021-06-10 12:32:16 +05:30
Anand Chitipothu d9185c0b6b feat: integrated lesson markup
- added PageExtension plugin to inject custom styles scripts in a page
- removed the livecode integration and enabled PageExtension plugins for
  learn page
- also merged the profile_tab.py with plugins.py
- added a utility to find the macros from given text
- updated the before_save of lesson to find exercises using the macros
  and update the exercises as before

Issue #115
2021-06-09 23:58:21 +05:30
Anand Chitipothu 5363fb7eb3 feat: extend markdown to support macros
With this feature, the exercises can be added to the lesson as:

    {{ Exercise("two-circles") }}

This also added fenced_code extension that allows adding id and classes
to code blocks.

This uses Python-Markdown library instead of Markdown2 that is used
everywhere in Frappe. The Python-Markdown is more easily extensible than
Markdown2.

Issue #115
2021-06-09 23:22:00 +05:30
pateljannat 1cb81de5c0 feat: lms quizzes 2021-06-09 13:17:42 +05:30
Jannat Patel d90a1247f1 Merge pull request #120 from fossunited/profile-tabs
feat: pluggable profile tabs
2021-06-08 14:53:38 +05:30
Anand Chitipothu ef0c3e4a24 feat: pluggable profile tabs
Added ProfileTab class to represent a profile tab and made the profile
page render the tabs specified in the hook `profile_tabs`. This allows
plugging in new tabs in the profile page without makeing any changes to
the community module.
2021-06-08 10:36:12 +05:30
Anand Chitipothu 3619b136f8 Merge pull request #117 from fossunited/lesson-progress
feat: lesson progress
2021-06-07 11:24:52 +05:30
pateljannat 671b4a0650 fix: api and orm 2021-06-02 20:19:36 +05:30
Anand Chitipothu 586b39c0fd fix: issue with numbering the exercises
The exercises being listed in unpredicted order instead of the order
they were listed in the lesson. The was because the `index_` of the
exercise was never updated. Fixed this by updating the `index_` whenever
a lesson edited. However, the user still need to run reindex exercises
on the course correct the ordering, which wasn't possible earlier.
2021-06-02 17:48:02 +05:30
pateljannat 4fd7af053b fix: tests 2021-06-02 16:47:17 +05:30
pateljannat 5fd1143f76 feat: lesson progress 2021-06-02 13:52:50 +05:30
Jannat Patel 0dc4743556 Merge pull request #116 from fossunited/reindex-exercises
feat: actions to reindex lessons and exercises
2021-06-01 11:40:52 +05:30
Anand Chitipothu c96a14c972 feat: ignore orphan exercises in the progress
Don't show exercises that are not added to any lesson in the progress.
2021-06-01 08:15:52 +05:30
Anand Chitipothu 400e706be1 feat: update the index of orphan exercises
When an exercise is removed from a lesson, the link to the lesson is
removed from that exercise and the index is reset. This will make sure
the removed exercises won't show up in places like progress.
2021-06-01 05:59:01 +05:30
Anand Chitipothu a12a52747e feat: show exercise index in the title
Show exercise as "Exercise 2.1: Draw a Circle".
2021-06-01 05:49:45 +05:30
Anand Chitipothu b9a93bb160 feat: added actions to reindex lessons and exercises
Some lessons gets deleted and some new ones get added in the progress of
course creation and it may happen then some of the lesson index may
become inconsistent.  Also, we would like to maintain an index for the
exercises. To support both of these, added actions to reindex lessons
and exercises to the course doctype.
2021-06-01 05:46:32 +05:30
Jannat Patel 9c65ff8ae6 Merge pull request #113 from fossunited/invite-based-membership
feat: Invite based membership
2021-05-31 13:41:12 +05:30
pateljannat bb0aa09b4e fix: messages and url 2021-05-31 13:39:31 +05:30
pateljannat a8752afb3b feat: invite based membership become a member page 2021-05-28 13:53:34 +05:30
pateljannat 327bde870b Merge branch 'main' of https://github.com/frappe/community into invite-based-membership 2021-05-27 17:32:48 +05:30
Jannat Patel 640ead4922 Merge pull request #109 from fossunited/style-fixes
fix: Style fixes
2021-05-27 11:54:08 +05:30
pateljannat 687f7f7f7b fix: minor home page issues 2021-05-27 11:25:05 +05:30
Anand Chitipothu 527a563e4a chore: added "programming" to the hero title 2021-05-27 09:39:07 +05:30
pateljannat 5bc9a7fe37 Merge branch 'style-fixes' of https://github.com/frappe/community into invite-based-membership 2021-05-26 19:10:38 +05:30
pateljannat 24835acd9c fix: jinja 2021-05-26 19:10:08 +05:30
pateljannat 3648b3ab47 Merge branch 'style-fixes' of https://github.com/frappe/community into invite-based-membership 2021-05-26 19:08:38 +05:30
pateljannat 914f8504a0 fix: added class in lms_message 2021-05-26 18:56:57 +05:30
pateljannat ab8546a121 fix: course outline, discussion, lms batch 2021-05-26 17:16:00 +05:30
pateljannat f327c6fb10 fix: tests for course description 2021-05-26 12:38:50 +05:30
pateljannat c7ccefa632 fix: discussion, batch home page, new fields for batches 2021-05-26 12:13:04 +05:30
Anand Chitipothu 823cf4e431 style: fixed word-wrap of output 2021-05-25 16:06:12 +05:30
pateljannat 18f074d8ac fix: ignore user permission for membership 2021-05-24 19:35:26 +05:30
pateljannat c9185ae68c fix: tabs and learn page 2021-05-24 19:24:07 +05:30
Anand Chitipothu 82fa0fa4d7 fix: error in loading the progress page 2021-05-24 13:46:59 +05:30
Jannat Patel 64752433d2 Merge pull request #106 from fossunited/issue-103
Redirect the learn page to the current lesson of the user
2021-05-24 13:40:50 +05:30
Anand Chitipothu 50856fdfa5 fix: fixed failing test 2021-05-24 13:30:47 +05:30
Anand Chitipothu cac4f2afef feat: redirect the learn page to the current lesson of the user
The current lesson is maintained in the LMS Batch Membership and that is
updated everytime a lesson page is visited.
2021-05-24 13:07:29 +05:30
Anand Chitipothu df431165e8 feat: redirect non-members visiting any batch page to the course page 2021-05-24 12:57:01 +05:30
Anand Chitipothu 69125e571f feat: added member_username and current_lesson fields to LMS Batch Membership
And removed member_email field which is a duplicate of member.
2021-05-24 12:43:20 +05:30
Anand Chitipothu 68f7215b95 fix: error in updating LMS Batch membership
The validation was always failing when trying to updating an LMS Batch
Membership document. This was due to a bug in the validation logic that
was considering itself as a duplicate record. This has been fixed.

Also added tests to verify that.
2021-05-24 12:15:16 +05:30
pateljannat ca42c32f54 Merge branch 'main' of https://github.com/frappe/community into style-fixes 2021-05-24 11:57:53 +05:30
Anand Chitipothu 20adc8079e Merge pull request #105 from fossunited/community-member-to-user-refactor
refactor: Community Member to User refactor
2021-05-24 11:44:45 +05:30
Anand Chitipothu d55941d4bb Merge branch 'main' into community-member-to-user-refactor 2021-05-24 11:39:20 +05:30
Jannat Patel 6074ee3688 Merge pull request #104 from fossunited/resume-course
Added "Resume Course" button to the course teaser
2021-05-24 11:36:06 +05:30
pateljannat b3f87ba5b6 fix: removed community course member and references to profile macro 2021-05-24 10:39:04 +05:30
pateljannat 631275e9a8 refactor: course and sidebar cleanup 2021-05-24 10:28:02 +05:30
Anand Chitipothu 8d7963fc60 feat: added "Resume Course" button to course teaser
Closes #102
2021-05-24 09:55:35 +05:30
Anand Chitipothu 38938ac14b feat: added ability to find the batch of a student
Added the course field and member_email fields to LMS Batch Membership
to allow the possibility of querying if a user is a student of a course.

Closes #101
2021-05-24 09:55:13 +05:30
Anand Chitipothu 14f9d4875a chore: added issue template for Feature Request 2021-05-24 08:36:09 +05:30
pateljannat 419a7e666f refactor: tests, mentor request, messages 2021-05-22 20:49:47 +05:30
pateljannat 713dcf178a refactor: patches to fix data, profile dashboard, lms mentor mapping page fixes 2021-05-21 21:40:31 +05:30
pateljannat 637c795321 refactor: moved community member class functions to user override 2021-05-21 16:22:59 +05:30
pateljannat 63d00a46c4 Merge branch 'main' of https://github.com/frappe/community into community-member-to-user-refactor 2021-05-21 13:27:22 +05:30
pateljannat e991dc5c73 refactor: removed community member doctype 2021-05-21 13:27:15 +05:30
Anand Chitipothu 4a2ecff15d Merge pull request #98 from fossunited/remove-primary-color-from-app
fix: removed primary color from app
2021-05-21 13:26:38 +05:30
Jannat Patel f8d6b5b949 Merge pull request #99 from fossunited/mentor-dashboard
Refactored batch pages and added batch progress page
2021-05-21 13:25:56 +05:30
Anand Chitipothu c77835b81f feat: added page to see progress of a batch 2021-05-21 13:13:34 +05:30
Anand Chitipothu e04bbb633d refactor: moved courses/*/index pages to batch/* 2021-05-21 13:12:52 +05:30
Anand Chitipothu a2b856aaf8 feat: added image to exercise submission 2021-05-21 13:10:54 +05:30
pateljannat 7a650b46ac fix: removed primary color from app 2021-05-21 11:06:37 +05:30
Jannat Patel b61ca1d7a2 Merge pull request #97 from fossunited/gitignore-build-file
fix: gitignore dist folder
2021-05-21 10:31:40 +05:30
pateljannat 573019bbcc fix: added build dist folder to gitignore 2021-05-21 10:23:44 +05:30
Anand Chitipothu 632693c9f8 fix: show submitted solution in the exercise 2021-05-20 21:03:24 +05:30
Anand Chitipothu 463aec01f8 fix: permission issue when a student submits an exercise 2021-05-20 21:02:54 +05:30
Anand Chitipothu e7d116f31c chore: removed obsolete doctype LMS Topic
It has been replaced by Chapter and Lesson.
Moved the section_parser from lms_topic directory to the lms.
2021-05-20 16:52:51 +05:30
Anand Chitipothu f1b3ee19b6 Merge pull request #93 from fossunited/exercises
Added Exercise and Exercise Submission doctypes
2021-05-20 16:43:29 +05:30
Anand Chitipothu 9cb9fad05c fix: fixed failing tests 2021-05-20 16:24:41 +05:30
Anand Chitipothu 0859afdf34 style: fixed the styles of the sidebar 2021-05-20 15:08:12 +05:30
Anand Chitipothu 6407b24324 feat: added course, batch and lesson to exercise submission
Useful to find all the submissions for a batch/lesson.
2021-05-20 15:07:14 +05:30
Anand Chitipothu 34e993cf86 refactor: added lesson to exercise
usualy to know which lesson an exercise is part of by looking at the
exercise.
2021-05-20 13:27:30 +05:30
Anand Chitipothu 8c889ffb92 chore: switched to new build system for css.
- added community.bundle.less file to create css bundle
- removed the obsolete build.json in favor of new build system
- updated the paths in the books
- removed the imported urls from css files (the new build system doesn't support that)
- removed obsolete lms.css
2021-05-20 13:15:08 +05:30
Anand Chitipothu a67ad67be1 feat: show image for the exercise
generate the image from the answer and display it along with
description. The image is geneated when the exercise is saved.
2021-05-20 12:09:12 +05:30
Anand Chitipothu 646a7b723f fix: fix broken pagination links 2021-05-19 20:12:35 +05:30
Anand Chitipothu 6f7011ca58 feat: integrated exercises into lessons
- an exercise can now be added to a lesson
- it is rendered using livecode editor with submit button
- remembers the submitted code and shows the submission time

Issue #90
2021-05-19 20:06:20 +05:30
Anand Chitipothu d61acb552a feat: added Exercise and Exercise Submission doctypes
Also:
- added methods to submit an exercise and get the submission for a user
- added test cases

Issue #90
2021-05-19 20:01:17 +05:30
Jannat Patel 265c78e76e Merge pull request #88 from fossunited/minor-fixes
fix: removed slug field ref from courses page
2021-05-19 13:59:43 +05:30
pateljannat 7d180e141c fix: removed print statememt 2021-05-19 13:19:34 +05:30
pateljannat 29f9141ad8 fix: removed slug field ref from courses page 2021-05-19 13:16:46 +05:30
Anand Chitipothu e6f58f56e0 Merge pull request #87 from fossunited/remove-branding
refactor: removed the branding and customization for mon school
2021-05-19 10:41:45 +05:30
Anand Chitipothu 9e0476fd00 chore: upgraded node to v14 in github actions
- the new changes to frappe required node v14
- also added a build setup before runing tests to make sure the assets are built
2021-05-19 10:05:59 +05:30
Anand Chitipothu d9ea02667d refactor: removed the branding and customization for mon school
They have been moved to a new mon_school app
2021-05-18 21:25:29 +05:30
Anand Chitipothu bdabf32124 Merge pull request #86 from fossunited/learn
Implemented learning section for batches
2021-05-14 15:36:44 +05:30
Anand Chitipothu 8b657f2f40 feat: added next/prev links to learn pages 2021-05-14 15:29:44 +05:30
Anand Chitipothu 49b41749e8 feat: added learn page
- added sections to the lesson to handle multiple sesions like examples and exercises
- added livecode integration to lesson pages
- autosave and submiting the answers is not done yet
2021-05-14 12:11:45 +05:30
Anand Chitipothu 1cf57c4823 feat: redirect the course page to learn page when the visitor is a student of a batch 2021-05-14 12:06:37 +05:30
Anand Chitipothu 5cfb72a731 style: tweaks
- made hero h1 black
- fixed the styles of lesson teasers
2021-05-08 13:44:34 +05:30
Anand Chitipothu 49d5ca4292 fix: added index to lesson doctype to fix the display order 2021-05-08 13:44:34 +05:30
Anand Chitipothu a3e53efcc1 fix: fixed course description on the course page
The small intro was being shown in its place.
2021-05-08 13:44:34 +05:30
Anand Chitipothu be7814b4fe Merge pull request #81 from fossunited/flow-fixes
fix: username and email validations
2021-05-07 18:53:58 +05:30
Anand Chitipothu c40ab9a726 style: style tweaks 2021-05-07 18:32:35 +05:30
Anand Chitipothu 64cf14ed92 fix: fail gracefully when livecode_to_svg crashes
That seems to be happening in some cases and couldn't really figure out
the reason. Handling the error to gracefully to show an empty image in
those cases.
2021-05-07 18:32:34 +05:30
Anand Chitipothu dbaa896fcc fix: fixed the issue of users unable to save sketches
Inserting new sketches is failing because the web user role doesn't have
permission to create sketches. Fixed it by adding
ignore_permission=True.
2021-05-07 18:32:34 +05:30
pateljannat 911c85bfc8 fix: redirect after login 2021-05-07 18:27:18 +05:30
pateljannat 5edceb2562 fix: photo from user 2021-05-07 17:14:33 +05:30
Anand Chitipothu 5d14dce320 Merge pull request #80 from fossunited/add-new-batch-form-enhancements
fix: Add new batch form enhancements
2021-05-07 16:53:21 +05:30
Anand Chitipothu eec9e57dd2 fix: fixed thumbnail generation from livecode
Due to the recent changes to livecode, the code to generate svg from
code got broken. Fixed that now.
2021-05-07 16:48:52 +05:30
Anand Chitipothu 503b922074 style: improved the sketch page 2021-05-07 16:48:25 +05:30
pateljannat d4c19932d5 fix: replaced slug with name and removed whitelist 2021-05-07 16:28:12 +05:30
Anand Chitipothu 3c8cffc5ad fix: fixed the issue of unable to create sketches.
The livecode API has been generalized and there was some
backwackward-incompatible changes in that proces. Added
livecode-canvas.js with the required options to fix the issue.
2021-05-07 13:59:38 +05:30
pateljannat b3c67a3f34 fix: username and email validations 2021-05-07 13:47:33 +05:30
Anand Chitipothu 84b4833fed style: tweaked the styles of profile page 2021-05-07 12:33:43 +05:30
pateljannat 28ef7e5def fix: conflicts 2021-05-07 12:08:51 +05:30
pateljannat 9981baa13b fix: add new batch form enhancements 2021-05-07 12:04:11 +05:30
Anand Chitipothu c764aa6c20 fix: fixed the error in saving a new course 2021-05-07 05:18:06 +05:30
Anand Chitipothu bc11730697 style: showing the message as alert elements on the course page 2021-05-06 21:05:36 +05:30
Anand Chitipothu 92c4a86e8b refactor: fixed the accidentally removed code in RequestInvite 2021-05-06 21:05:08 +05:30
Anand Chitipothu 358724bf1c style: fixed the hero section on mobile
The email textbox was becoming too small.
2021-05-06 20:53:14 +05:30
Anand Chitipothu bb80d988d7 refactor: using SketchTeaser widget to show sketch in the profile page 2021-05-06 20:43:04 +05:30
Anand Chitipothu 0ad03a3fb5 style: made the avatar and name of the person a link 2021-05-06 20:41:52 +05:30
Anand Chitipothu 3382de0ecb refactor: removed slug from course page. 2021-05-06 15:47:47 +05:30
Anand Chitipothu 08bb7b4490 Merge pull request #73 from fossunited/mentor-request-email-templates
fix: mentor request flow and emails #30, #69, #70
2021-05-06 15:39:58 +05:30
Anand Chitipothu 15203f6bcc Merge branch 'main' into mentor-request-email-templates 2021-05-06 15:38:53 +05:30
Anand Chitipothu cbfb0d6761 Merge pull request #76 from fossunited/course-page
Refactored the course page
2021-05-06 13:55:42 +05:30
Anand Chitipothu 343aa50f78 Merge branch 'main' into course-page 2021-05-06 13:50:12 +05:30
Anand Chitipothu 5a70687067 refactor: removed the slug using the course name as part of url 2021-05-06 13:42:45 +05:30
Anand Chitipothu a0921f7380 Merge pull request #77 from fossunited/widget-avatar
feat: Widget avatar
2021-05-06 13:26:49 +05:30
pateljannat 11cc03849d fix: displaying course name in mentor email 2021-05-06 13:23:22 +05:30
pateljannat 413aeaccb1 feat: avatar widget 2021-05-06 12:17:28 +05:30
Anand Chitipothu 88457a82ac refactor: learn page 2021-05-06 07:05:27 +05:30
Anand Chitipothu 761f36519e refactor: refactored the about page 2021-05-06 07:05:17 +05:30
Anand Chitipothu dc5b637ada refactor: fixed the course page 2021-05-06 06:47:09 +05:30
pateljannat 5e5395658e Merge branch 'main' of https://github.com/frappe/community into mentor-request-email-templates 2021-05-05 16:32:37 +05:30
pateljannat 69b3f366f4 feat: widget file added 2021-05-05 16:32:21 +05:30
Anand Chitipothu da902d23f7 Merge pull request #71 from fossunited/footer
Fix footer
2021-05-05 16:30:45 +05:30
Anand Chitipothu c2be23a902 fix: fixed the pickle error on installing community 2021-05-05 15:58:28 +05:30
Anand Chitipothu da771d7830 [actions] added action to ache bench 2021-05-05 15:57:41 +05:30
pateljannat 8a242a69fb fix: mentor request flow and emails #30, #69, #70 2021-05-05 15:45:20 +05:30
Anand Chitipothu 041bed7e9d Added sketches to the nav-bar on install 2021-05-05 12:56:27 +05:30
Anand Chitipothu e330f45adc style: fixed the footer 2021-05-05 12:53:24 +05:30
Anand Chitipothu 370d3a321b Merge pull request #68 from fossunited/invite-flow-fixes
fix: invite flow issues
2021-05-04 23:23:40 +05:30
Anand Chitipothu 138fba66ae Merge branch 'main' of git://github.com/khalby786/community into khalby786-main 2021-05-04 23:21:21 +05:30
Anand Chitipothu 82faaed15d feat: set app name and logo on install and disable signup
- set app_name and app_logo_url on install
- disabled signup
2021-05-04 23:19:50 +05:30
Anand Chitipothu b58a685e7a Merge pull request #64 from fossunited/miscellaneous-fixes
fix: Miscellaneous fixes
2021-05-04 19:18:17 +05:30
pateljannat 45ec16d9e4 fix: reverted error message 2021-05-04 17:43:09 +05:30
pateljannat 18c0fb0da5 fix: #65 and #66 2021-05-04 17:41:54 +05:30
pateljannat b7d93c1b50 fix: get_mentors in batch 2021-05-04 16:50:39 +05:30
pateljannat e931ead270 fix: miscellaneous 2021-05-04 12:47:45 +05:30
pateljannat 8933ca9ac9 Merge branch 'main' of https://github.com/frappe/community into miscellaneous-fixes 2021-05-03 16:57:58 +05:30
Anand Chitipothu 1a06e2c0aa Merge pull request #61 from fossunited/issue-56
doctypes for chapter and lesson
2021-05-03 16:51:01 +05:30
Anand Chitipothu 491b5c46ae Merge branch 'main' into issue-56 2021-05-03 16:03:30 +05:30
pateljannat 2139bddf01 fix: removed unused form add messages, changed url for new batch form in course.html, changed get_recent_sketch to have an owner filter 2021-05-03 15:57:00 +05:30
pateljannat cf68d3127c fix: conflicts 2021-05-03 15:51:06 +05:30
pateljannat f13bb494ef fix: converted tabs to spaces 2021-05-03 15:50:14 +05:30
Jannat Patel 5e18cd2ef4 Merge pull request #52 from fossunited/invite-flow
fix: invite flow and add new batch form enhancements
2021-05-03 15:47:09 +05:30
pateljannat 5fdecb708e fix: tabs to space, moved js to widget, removed unrelated changes 2021-05-03 15:14:11 +05:30
pateljannat 0144ab60de fix: logout issue, liscence.txt change 2021-05-03 15:05:23 +05:30
pateljannat 565787eeb6 feat: new-sign-up-form, request invite widget, request invite tests, get_sketches with owner 2021-05-03 12:33:31 +05:30
Anand Chitipothu b9d94df4d8 refactor: refactored the course page
- simplified the portal page for course
- added mentods to LMS Course and Community Member to reduce custom code
  in portal pages
- included lessons in the ChapterTeaser
2021-05-03 12:05:17 +05:30
Anand Chitipothu 9e103af8b5 refactor: added auto name to chapter and lesson doctypes 2021-05-03 06:52:22 +05:30
Anand Chitipothu 5728714d71 feat: added lesson doctype 2021-05-03 06:50:23 +05:30
Anand Chitipothu 62cfc0fb24 feat: Added ChapterTeaser widget 2021-05-03 06:50:07 +05:30
Anand Chitipothu a52a01ef7f feat: Added chapter doctype
Also linked it from the LMS Course doctype.

Issue #56
2021-05-03 06:06:35 +05:30
pateljannat cd1d2067ad Merge branch 'main' of https://github.com/frappe/community into invite-flow 2021-05-02 11:05:35 +05:30
Khaleel Gibran 67d3ec75c8 feat: design homepage based on figma design 2021-05-01 18:51:44 +05:30
pateljannat 52f16131af fix: add new batch form enhancements (#43) invite request doctype and flow (#42) 2021-05-01 14:37:57 +05:30
Anand Chitipothu 59dba7730f refactor: switched to less for css (#49)
- Added build setup to include styles.less in building community.css
- The old styles are still in style.css. Those styles will be slowly moved to style.less.
- Move all the new styles to style.less
2021-04-29 16:53:16 +05:30
Anand Chitipothu 4bc05bfda8 Merge pull request #46 from fossunited/docker-compose
feat: dev-instance using docker-compose
2021-04-29 15:25:31 +05:30
Anand Chitipothu 0cfd6d7634 feat: dev-instance using docker-compose 2021-04-29 14:13:01 +05:30
Anand Chitipothu f7434f376f Merge pull request #41 from fossunited/home-page
Home page
2021-04-29 13:59:54 +05:30
Anand Chitipothu 905f51ee76 fix: styles on home page 2021-04-29 12:16:48 +05:30
Anand Chitipothu e207320721 feat: added home page
- Refactored the lms_course page and added find_all method to find courses
- Added CourseTeaser widget
- Added /home as a portal page
2021-04-29 10:57:29 +05:30
Anand Chitipothu 20ccc09869 refactor: sketches page
- Added new widget SketchTeaser
- Moved get_recent_sketches as static method in LMSSketch
- Added `models.py` to make it easy to import Course and Sketch class
- Updated the sketches template to use the SketchTeaser widget
2021-04-29 10:55:21 +05:30
Anand Chitipothu e78c6020e7 Merge pull request #37 from fossunited/batch-discussions
fix: Batch discussions and Community Member fixes
2021-04-29 10:53:20 +05:30
Anand Chitipothu 4874d99e44 feat: widgets interface
Widgets are reusable jinja templates which can be used in other
themplates. Widgets are written in widgets/ directory in every frappe
module and can be accessed as `{{ widgets.WidgetName(...) }}` from any
template.
2021-04-29 10:49:37 +05:30
pateljannat a022804381 test: users with same name, username validations, users without username 2021-04-28 22:04:42 +05:30
pateljannat 7a40b3e7a5 fix: test for community member and lms course 2021-04-28 17:52:12 +05:30
Anand Chitipothu 0ab4fbb03d [mockups] added sketches page 2021-04-28 15:17:13 +05:30
pateljannat 7b142fd72d test: member creation from user 2021-04-28 13:50:40 +05:30
pateljannat fc8ff9c7fd Merge branch 'main' of https://github.com/frappe/community into batch-discussions 2021-04-28 13:08:23 +05:30
pateljannat c6bd47eb62 fix: user validaton and community member name issue 2021-04-28 13:08:09 +05:30
Anand Chitipothu 68406762c9 Merge pull request #33 from fossunited/testable
Setup CI using github actions
2021-04-28 06:42:30 +05:30
Anand Chitipothu 89c539a3ed [mockups] added navbar 2021-04-27 21:09:09 +05:30
Anand Chitipothu 8d62b5c504 chore: Added CI using github actions 2021-04-27 19:49:56 +05:30
Anand Chitipothu 8857b97773 refactor: added methods to access mentors from course with test cases 2021-04-27 19:49:02 +05:30
Anand Chitipothu 46e7a5c0d1 Added mockups 2021-04-27 19:17:48 +05:30
pateljannat d68f1de796 feat: #27 discussion message publish realtime 2021-04-27 16:32:34 +05:30
pateljannat ffdc554106 Merge branch 'main' of https://github.com/frappe/community into main 2021-04-27 10:34:00 +05:30
pateljannat 424967b03e feat: #28 info page, #27 discussion page initial structure, add batch webform change 2021-04-27 10:33:49 +05:30
Anand Chitipothu b80663a245 Added bug tag to Bug issue template 2021-04-26 16:43:53 +05:30
pateljannat 44dc42d7dd feat: batch folders, redirects, members page 2021-04-26 10:16:53 +05:30
pateljannat c18916096e fix: conflicts 2021-04-22 14:43:53 +05:30
pateljannat 3b578d750a fix: validations for new batch form 2021-04-22 14:43:04 +05:30
Anand Chitipothu 00107134b4 feat: add new design and improved the layout of the course page 2021-04-22 10:28:50 +05:30
Anand Chitipothu 153bb925d8 fix: show mentors section even when there are no mentors
Previously, the mentors heading was not shown when there were no
mentors, but the link to apply to become mentor was shown and that
appears in the Instructors section.

Fixed it by showing a message to indicate that there are no mentors for
this course.
2021-04-21 15:48:01 +05:30
Anand Chitipothu 22448a8a7b added links to lms_course and lms_batch dooctypes.
This makes it possible to the number of batches for a course, the number
of mentors for a course etc.
2021-04-21 15:13:16 +05:30
pateljannat 54fe2efa07 fix: label changes for mentor request in lms settings 2021-04-21 13:29:36 +05:30
pateljannat 86bd708c34 fix: apply as mentor even if email template not found 2021-04-21 13:17:07 +05:30
pateljannat 87d67c55e0 Merge branch 'main' of https://github.com/frappe/community into main 2021-04-21 12:58:27 +05:30
pateljannat 3405de9394 fix: course page created by administrator 2021-04-21 12:58:17 +05:30
Anand Chitipothu ab3c4c34ce Created Bug Report template 2021-04-21 12:28:02 +05:30
pateljannat b09ec1e29d feat: add new batch and mentor course mapping 2021-04-21 10:47:10 +05:30
pateljannat a2fe314420 Merge branch 'main' of https://github.com/frappe/community into main 2021-04-20 13:22:50 +05:30
pateljannat df9b856a91 fix: change repository link field to small text 2021-04-20 13:22:45 +05:30
pateljannat e6248f9e02 feat: course page redesign 2021-04-20 13:21:01 +05:30
Anand Chitipothu be93a496cc fix: not permitted error when code is edited
This was caused by auto-save when the user is not logged in. Fixed it by
disabling auto-save for guest users.
2021-04-20 12:20:34 +05:30
pateljannat 91be957885 Merge branch 'main' of https://github.com/frappe/community into main 2021-04-15 09:33:24 +05:30
pateljannat 20e562bfb0 docs: hackathon 2021-04-15 09:33:17 +05:30
Anand Chitipothu 6fad78278a feat: added code_revision doctype for saving code snippets.
This was supposed to be part of revision f15080, but that got missed out.
2021-04-14 11:30:41 +05:30
pateljannat dfe8b3d4a2 fix: style 2021-04-14 11:29:32 +05:30
pateljannat e8ff9a5a32 feat: profile page 2021-04-14 11:19:02 +05:30
Anand Chitipothu 88888903ab fix: discussion tab when there are no messages
- fixed the issue of not showing discussion tab when there are no messages
- fixed the error when the course page is visited by a guest user
2021-04-14 06:43:48 +05:30
pateljannat d38c64650e fix: patch to update name of member 2021-04-12 18:05:43 +05:30
pateljannat 0e1002392f fix: styling for dashboard 2021-04-12 14:59:49 +05:30
pateljannat 258ccb1642 feat: dashboard 2021-04-12 14:05:02 +05:30
pateljannat 767aaac913 docs: ReadMe update 2021-04-08 14:40:02 +05:30
pateljannat 871ad279d1 Merge branch 'main' of https://github.com/frappe/community into main 2021-04-07 19:53:08 +05:30
pateljannat 84cf74e25d fix: clean urls for hackathons and correcting slug parameter for discussions 2021-04-07 19:53:03 +05:30
Anand Chitipothu b8b7673985 fix: added a work-around to the issue of regex converter not loaded.
frappe app doesn't load all python modules of all the apps on startup. It
loads the hooks.py only if it is not already cached. Because of this the code
to install the regex coverter to not running, causing errors.

Fixed it by replacing the regex route with a string route. The issue is it
also matches the paths like `socket.io` and `website_script.js` etc. Handled
that by whitelisting those routes.
2021-04-07 12:41:17 +05:30
Anand Chitipothu f1508033a3 feat: implemented autosave for sections
Now the changes made to the code in each section will be autosaved and loaded
back on next page load.
2021-04-07 01:40:13 +05:30
Anand Chitipothu 15b8b99ae2 fix: fixed the issue with dynamic routes.
- The code to install regex controller was not always executed. Forced the
  exection of that by adding it to community/__init__.py
- Renoved the that code from hooks.py
2021-04-07 01:40:13 +05:30
pateljannat 3d024a289e fix: conflicts 2021-04-06 18:53:34 +05:30
pateljannat 7658942500 fix: email patch and conference portal 2021-04-06 18:51:40 +05:30
Anand Chitipothu b197fd605c Merge pull request #12 from fossunited/nice-urls
Implemented nice urls for courses, topics, sketches and profiles
2021-04-06 18:39:07 +05:30
Anand Chitipothu a3788a0f39 refactor: added nice urls for sketches.
- Sketches will be available at `/sketches/<sketch-id>`
2021-04-06 18:36:07 +05:30
Anand Chitipothu 06f7698e8f refactor: added custom routing for profiles
- installed a regex conveter to werkzeug to support regular expresions in routes
- added a website route rule to match all profiles
2021-04-06 18:07:05 +05:30
Anand Chitipothu 175bd19a51 refactor: added slugs to course and topics to make nice urls
- the slug is autogenerated from the title
- the slug of a topic is unique among all the topics of that course
2021-04-06 18:07:05 +05:30
Anand Chitipothu 6620ecf0c8 refactor: added utility to convert title into slug 2021-04-06 18:07:05 +05:30
Anand Chitipothu 253c25bf1f Show 404 page when the topic is not found.
Earlier it was failing with internal error.
2021-04-06 18:07:05 +05:30
Anand Chitipothu e42e00f83a Added nice urls to sketch pages.
The URL of a sketch will be `/skectes/<sketch-name>`. That would still be like
`/skectes/SKETCH-123`. It would interesting to try to make it `/sketches/123`.
2021-04-06 18:07:05 +05:30
Anand Chitipothu 53af969a2e Added nice URLs to course and topic pages.
The URL of a course will be `/courses/<course-name>` and a topic will be
`/courses/<course-name>/<topic-name>`.

Implemented this by adding entries to `website_route_rules`.
2021-04-06 18:07:05 +05:30
pateljannat 87acbb9f6e Merge branch 'main' of https://github.com/frappe/community into main 2021-03-31 10:48:28 +05:30
pateljannat bf789c1891 feat: emails on messages 2021-03-31 10:48:23 +05:30
Anand Chitipothu 24bb0f2b2a Implemented a better inline editor for livecode.
- It shows the code like a textarea and the canvas will to the right
- It will take only the amount of height required for the code
- The existing LiveCodeEditor was renamed as LiveCodeEditorLarge and still
  used or sketches
2021-03-29 18:56:48 +00:00
pateljannat bc4503a636 feat: script to create community members 2021-03-23 20:09:10 +05:30
pateljannat 389254b673 fix: message from course page 2021-03-23 19:26:31 +05:30
pateljannat 6433af6613 Merge branch 'main' of https://github.com/frappe/community into main 2021-03-23 15:29:18 +05:30
pateljannat ab5929a4e8 feat: discussions tab and web form for messages 2021-03-23 15:29:12 +05:30
Anand Chitipothu 7ecfa6b0c3 tweaks to make the svg rendering work as expected.
Set the viewBox and fixed the args to line function.
2021-03-23 07:22:13 +00:00
Anand Chitipothu ed0f70e3ed Replaced drawSvg library with custom svg library.
Even after so many attempts to fix drawSvg, couldn't get it to work with
top-left corner as the origin. Replaced it with a custom library.
2021-03-23 07:12:11 +00:00
Anand Chitipothu 280cfb3994 Fixed an error in rendering a line.
Used the wrong arguments to line functions, fixed now.
2021-03-23 06:06:25 +00:00
Anand Chitipothu dfafab3ccd Fixed the orientation issue with rendering sketch as svg.
The sketches were flipped vertically when displayed as svg. It was due to the
defaults in the drawSvg library that was using bottom-left corner as the
origin by default. Fixed it by specifying the top-right as the origin.
2021-03-23 04:26:24 +00:00
Anand Chitipothu 071df674c0 Removed the debug text in rendering topic pages. 2021-03-23 04:23:52 +00:00
Anand Chitipothu 03a22bd537 Switched to using frappe.utils.md_to_html for rendering markdown.
The `markdown` filter doesn't convert to html if there is any html tag in the
input.
2021-03-23 04:20:54 +00:00
Anand Chitipothu f8ba10dfba Include sketch title the sketch listing page. 2021-03-17 11:40:59 +00:00
Anand Chitipothu 9c485dbd4e Added support for line and rect in the preview of sketches 2021-03-17 11:40:59 +00:00
pateljannat 49e65c9e43 feat: email as name field for community member 2021-03-15 10:43:06 +05:30
pateljannat 599b2cf76c Merge branch 'main' of https://github.com/frappe/community into main 2021-03-15 10:42:44 +05:30
pateljannat 562a2189f7 feat: email as name field for community member 2021-03-15 10:42:28 +05:30
Anand Chitipothu faf102bdec Added support to split the topic description into sections.
We are using special markup to split the description into sections.

Each section is marked as:

    {{ section(type="example", id="foo") }}
    ...
    {{ end }}

This is the first-cut implementation and requires cleanup.
2021-03-12 12:33:41 +00:00
pateljannat ce7175040f Merge branch 'main' of https://github.com/frappe/community into main 2021-03-12 12:22:19 +05:30
pateljannat 25a0dd02ac feat: community member for profile and edit profile form 2021-03-12 12:22:12 +05:30
Anand Chitipothu dca8c9d5db Added thumbnails to the recent sketches page.
- Added an svg field to store the thumbnail
- The thumbnail is computed and cached in redis
2021-03-12 05:37:24 +00:00
Anand Chitipothu fe63ded98c Added svg field to the sketch to store the image of the sketch. 2021-03-12 05:02:57 +00:00
Anand Chitipothu 31aec86c0b Fixed broken html in LiveCodeEditor macro. 2021-03-11 11:54:43 +00:00
Anand Chitipothu 5f8de7612b Using the user fullname when rendering a sketch.
Also refactored the portal page for sketches and moved the common code
to the lms_sketch doctype module.
2021-03-11 11:53:06 +00:00
Anand Chitipothu 4fe91422f4 Fixed an error in finding if the sketch is editable 2021-03-10 12:35:31 +00:00
Anand Chitipothu 406244ff69 Added the ability to save sketches
Implemented by exposing an RPC method to save the sketch and calling
from JS using `frappe.call`. Any logged-in user can create new sketches
and the owner can edit his/her own sketches.
2021-03-10 12:25:14 +00:00
Anand Chitipothu 936a3fcfff Added partial support for new sketches.
New Sketches can't be saved yet.
2021-03-09 12:53:11 +00:00
Anand Chitipothu deea539c7d Added sketch pages. 2021-03-09 12:36:55 +00:00
Anand Chitipothu ff15e7058b Added sketch doctype. 2021-03-09 12:36:41 +00:00
Anand Chitipothu 3583cd084d Fixed error on topic pages
The macro was imported wihout "with context" flag.
2021-03-09 12:34:48 +00:00
Anand Chitipothu 13030b0b9b Cleanup: moved LiveCodeEditor into a macro 2021-03-09 11:51:09 +00:00
Anand Chitipothu 480774755f Moved the css to assets 2021-03-09 11:50:45 +00:00
Anand Chitipothu b7602d6d2b Added codemirror integration to LMS topic pages 2021-03-09 09:37:17 +00:00
Anand Chitipothu 862878462b Added LMS Settings.
The `livecode_url` is now part of LMS settings and not hardcoded in the code.
2021-03-09 09:04:39 +00:00
Anand Chitipothu fc6f60c4d7 Integrated topic page with livecode. 2021-03-08 11:11:48 +00:00
Anand Chitipothu 6c671c0347 Added LMS Section doctype 2021-03-08 11:11:28 +00:00
Anand Chitipothu bfc15cf1a4 Added preview and sections fields to LMS Topic
- The preview is used to show the details of the topic in the course page
- the sections are used to show the different part of the topic, each could be of a different type

Issue #8
2021-03-05 17:20:02 +00:00
Anand Chitipothu f96c8c27ed Renamed thr LMS doctypes in the portal pages
Issue #7
2021-03-05 17:13:01 +00:00
Anand Chitipothu c661d141c2 Added editorconfig
Closes #9
2021-03-05 08:07:38 +00:00
Anand Chitipothu ca621e07b7 Renamed the doctypes in LMS.
The prefix has been changed from "Community" to "LMS".

Issue #7
2021-03-05 07:39:50 +00:00
Anand Chitipothu 0fcba82030 Fixed indent 2021-03-05 07:37:37 +00:00
pateljannat 3f04b10b90 refactor: seperate module LMS 2021-03-05 11:07:28 +05:30
pateljannat 4b90f2e129 refactor: new module for conference 2021-03-04 20:19:53 +05:30
pateljannat 8b5cd8e6c6 refactor: seperate module for hackathon 2021-03-04 20:11:18 +05:30
pateljannat acea59767d feat: course enrollment and my courses page 2021-03-03 17:44:46 +05:30
pateljannat b4eb9580af Merge branch 'main' of https://github.com/frappe/community into main 2021-03-02 18:54:45 +05:30
pateljannat a4dffca4d7 feat: basic doctypes for conference and user profile flow for courses 2021-03-02 18:54:37 +05:30
Jannat Patel 94939bf1e9 Merge pull request #5 from fossunited/course-doctype-v1
First cut at the course doctype.
2021-03-02 18:52:45 +05:30
308 changed files with 9242 additions and 585 deletions
+29
View File
@@ -0,0 +1,29 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
trim_trailing_whitespace = true
# Python
[*.py]
indent_size = 4
# Markdown
[*.md]
indent_size = 4
trim_trailing_whitespace = false
[Makefile]
indent_style = tab
# HTML, CSS, javascript, JSON and YAML
[*.{html,css,js,json,yml,yaml}]
indent_size = 2
+38
View File
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
+20
View File
@@ -0,0 +1,20 @@
---
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.
+11
View File
@@ -0,0 +1,11 @@
# configuration to force mariadb to use utf8mb4 charecter set, as required by frappe
# This file need to be placed at /etc/mysql/conf.d/ in the mariadb container as a volume
# See .github/wotkflows/ci.yml to see how it is used
[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
[mysql]
default-character-set = utf8mb4
+78
View File
@@ -0,0 +1,78 @@
name: Run tests
on:
push:
branches:
- main
pull_request: {}
jobs:
tests:
runs-on: ubuntu-20.04
services:
redis-cache:
image: redis:alpine
ports:
- 13000:6379
redis-queue:
image: redis:alpine
ports:
- 11000:6379
redis-socketio:
image: redis:alpine
ports:
- 12000:6379
mariadb:
image: anandology/mariadb-utf8mb4:10.3
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: setup node
uses: actions/setup-node@v2
with:
node-version: '14'
check-latest: true
- name: setup cache for bench
uses: actions/cache@v2
with:
path: ~/bench-cache
key: ${{ runner.os }}
- name: install bench
run: |
pip3 install frappe-bench
which bench
- name: bench init
run: |
if [ -d ~/bench-cache/bench.tgz ]
then
(cd && tar xzf ~/bench-cache/bench.tgz)
else
bench init ~/frappe-bench --skip-redis-config-generation
mkdir -p ~/bench-cache
(cd && tar czf ~/bench-cache/bench.tgz frappe-bench)
fi
- name: add community app to bench
working-directory: /home/runner/frappe-bench
run: bench get-app community $GITHUB_WORKSPACE
- name: create bench site
working-directory: /home/runner/frappe-bench
run: bench new-site --mariadb-root-password root --admin-password admin frappe.local
- name: install community app
working-directory: /home/runner/frappe-bench
run: bench --verbose --site frappe.local install-app community
- name: allow tests
working-directory: /home/runner/frappe-bench
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
working-directory: /home/runner/frappe-bench
run: bench --site frappe.local run-tests --app community
+2 -1
View File
@@ -3,4 +3,5 @@
*.egg-info
*.swp
tags
community/docs/current
community/docs/current
community/public/dist
+74 -2
View File
@@ -1,7 +1,79 @@
## Community
Community App
This app helps people organize and manage their own communities.
The App has following components:
1. Hackathons
1. LMS
Community is built on the [Frappe Framework](https://github.com/frappe/frappe), a full-stack web app framework built with Python & JavaScript.
## Development Setup
**Step 1:** Clone the repo
```
$ git clone https://github.com/fossunited/community.git
$ cd community
```
**Step 2:** Run docker-compose
```
$ docker-compose up
```
**Step 3:** Visit the website at http://localhost:8000/
You'll have to go through the setup wizard to setup the website for the first time you access it. Login using the following credentiasl to complete the setup wizard.
```
Username: Administrator
password: admin
```
TODO: Explain how to load sample data
## Stopping the server
Press `ctrl+c` in the terminal to stop the server. You can also run `docker-compose down` in another terminal to stop it.
To completely reset the instance, do the following:
```
$ docker-compose down --volumes
$ docker-compose up
```
## Making Code Changes
The dev setup is configured to reload whenever any code is changed. Just edit the code and reload the webpage.
Commit the changes in a branch and send a pull request.
## Local Setup - The Hard Way
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 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.
### Contribution Guidelines (for The Hard Way)
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.
#### License
MIT
AGPL
+2
View File
@@ -3,3 +3,5 @@ from __future__ import unicode_literals
__version__ = '0.0.1'
# load the methods from the lms api
from .lms import api # noqa
@@ -1,5 +0,0 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Course', {
});
@@ -1,64 +0,0 @@
{
"actions": [],
"allow_guest_to_view": 1,
"allow_rename": 1,
"autoname": "field:title",
"creation": "2021-03-01 16:49:33.622422",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"title",
"description",
"is_published"
],
"fields": [
{
"fieldname": "title",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Title",
"reqd": 1,
"unique": 1
},
{
"fieldname": "description",
"fieldtype": "Markdown Editor",
"label": "Description"
},
{
"default": "0",
"fieldname": "is_published",
"fieldtype": "Check",
"label": "Published"
}
],
"index_web_pages_for_search": 1,
"is_published_field": "is_published",
"links": [],
"modified": "2021-03-02 12:25:25.235975",
"modified_by": "Administrator",
"module": "Community",
"name": "Community Course",
"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": "creation",
"sort_order": "DESC",
"title_field": "title",
"track_changes": 1,
"track_views": 1
}
@@ -1,10 +0,0 @@
# -*- 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
class CommunityCourse(WebsiteGenerator):
pass
@@ -1,21 +0,0 @@
{% extends "templates/web.html" %}
{% block page_content %}
<ol class="breadcrumb" itemscope="" itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem" class="breadcrumb-item">
<a itemprop="item" href="/courses">
<span itemprop="name">&larr; Courses</span>
<meta itemprop="position" content="1">
</a>
<span itemprop="item">
</li>
</ol>
<h1>{{ title }}</h1>
{{description}}
{% endblock %}
<!-- this is a sample default web page template -->
@@ -1,7 +0,0 @@
<div class="card" style="width: 100%; margin: 5px 0px">
<div class="card-body">
<h5 class="card-title"><a href="{{doc.route}}">{{doc.title}}</a></h5>
<p class="card-text">{{doc.description}}</p>
<a href="{{doc.route}}" class="card-link">See more &rarr;</a>
</div>
</div>
@@ -1,8 +0,0 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Course Topic', {
// refresh: function(frm) {
// }
});
@@ -1,10 +0,0 @@
# -*- 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
class CommunityCourseTopic(WebsiteGenerator):
pass
@@ -1,7 +0,0 @@
{% extends "templates/web.html" %}
{% block page_content %}
<h1>{{ title }}</h1>
{% endblock %}
<!-- this is a sample default web page template -->
@@ -1,4 +0,0 @@
<div>
<a href="{{ doc.route }}">{{ doc.title or doc.name }}</a>
</div>
<!-- this is a sample default list template -->
@@ -13,13 +13,13 @@
"fieldtype": "Link",
"in_list_view": 1,
"label": "Member",
"options": "Community Member"
"options": "User"
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-02-15 12:03:31.153575",
"modified": "2021-05-21 12:15:51.286478",
"modified_by": "Administrator",
"module": "Community",
"name": "Community Event Volunteer",
@@ -1,93 +0,0 @@
{
"actions": [],
"autoname": "field:full_name",
"creation": "2021-02-12 15:47:23.591567",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"enabled",
"full_name",
"role",
"photo",
"short_intro",
"bio"
],
"fields": [
{
"default": "1",
"fieldname": "enabled",
"fieldtype": "Check",
"label": "Enabled"
},
{
"fieldname": "full_name",
"fieldtype": "Data",
"in_list_view": 1,
"label": "Full Name",
"reqd": 1,
"unique": 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": "HTML Editor",
"label": "Bio"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-15 12:16:32.428546",
"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,
"sort_field": "modified",
"sort_order": "DESC",
"track_changes": 1
}
@@ -6,5 +6,5 @@ from __future__ import unicode_literals
# import frappe
import unittest
class TestCommunityMember(unittest.TestCase):
class TestTShirtSizes(unittest.TestCase):
pass
@@ -1,7 +1,7 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Member', {
frappe.ui.form.on('TShirt Sizes', {
// refresh: function(frm) {
// }
@@ -0,0 +1,49 @@
{
"actions": [],
"creation": "2021-02-25 17:52:49.813558",
"doctype": "DocType",
"editable_grid": 1,
"engine": "InnoDB",
"field_order": [
"size",
"quantity"
],
"fields": [
{
"fieldname": "size",
"fieldtype": "Select",
"label": "Size",
"options": "S\nM\nL\nXL\nXXL\nXXXL"
},
{
"fieldname": "quantity",
"fieldtype": "Int",
"label": "Quantity"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-25 17:52:49.813558",
"modified_by": "Administrator",
"module": "Community",
"name": "TShirt Sizes",
"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
}
@@ -6,5 +6,5 @@ from __future__ import unicode_literals
# import frappe
from frappe.model.document import Document
class CommunityMember(Document):
class TShirtSizes(Document):
pass
+1 -1
View File
@@ -1 +1 @@
import frappe
import frappe
+14
View File
@@ -0,0 +1,14 @@
{% set color = member.get_palette() %}
<a href="/{{member.username}}">
<span class="avatar {{ avatar_class }}" title="{{ member.full_name }}">
{% if member.user_image %}
<img class="avatar-frame standard-image" style="object-fit: cover;" src="{{ member.user_image }}" title="{{ member.full_name }}">
</img>
{% else %}
<span class="avatar-frame standard-image" title="{{ member.full_name }}"
style="background-color: var({{color[0]}}); color: var({{color[1]}});">
{{ frappe.utils.get_abbr(member.full_name) }}
</span>
{% endif %}
</span>
</a>
@@ -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
}
@@ -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 CommunityConference(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 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
+35
View 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.
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Frappe and contributors
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Hackathon', {
@@ -21,9 +21,9 @@
},
{
"fieldname": "organizer",
"fieldtype": "Data",
"fieldtype": "Link",
"label": "Organizer",
"options": "Email"
"options": "User"
},
{
"fieldname": "year",
@@ -34,9 +34,9 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-17 12:44:25.198010",
"modified": "2021-05-21 12:22:26.619776",
"modified_by": "Administrator",
"module": "Community",
"module": "Hackathon",
"name": "Community Hackathon",
"owner": "Administrator",
"permissions": [
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and contributors
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and Contributors
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
from __future__ import unicode_literals
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Frappe and contributors
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Project', {
@@ -1,5 +1,6 @@
{
"actions": [],
"allow_import": 1,
"autoname": "field:project_name",
"creation": "2021-02-12 18:28:33.440328",
"doctype": "DocType",
@@ -7,14 +8,18 @@
"engine": "InnoDB",
"field_order": [
"disabled",
"column_break_2",
"accepting_members",
"section_break_4",
"project_name",
"project_short_intro",
"project_description",
"section_break_8",
"repository_link",
"video_link",
"telegram_id",
"project_description",
"column_break_11",
"hackathon",
"accepting_members",
"telegram_id",
"likes",
"project_search"
],
@@ -58,6 +63,12 @@
"fieldtype": "Markdown Editor",
"label": "Project Description"
},
{
"fieldname": "hackathon",
"fieldtype": "Link",
"label": "Hackathon",
"options": "Community Hackathon"
},
{
"default": "0",
"fieldname": "accepting_members",
@@ -77,17 +88,27 @@
"label": "Project Search"
},
{
"fieldname": "hackathon",
"fieldtype": "Link",
"label": "Hackathon",
"options": "Community Hackathon"
"fieldname": "column_break_2",
"fieldtype": "Column Break"
},
{
"fieldname": "section_break_4",
"fieldtype": "Section Break"
},
{
"fieldname": "section_break_8",
"fieldtype": "Section Break"
},
{
"fieldname": "column_break_11",
"fieldtype": "Column Break"
}
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-23 11:21:47.948253",
"modified": "2021-04-20 13:22:17.248521",
"modified_by": "Administrator",
"module": "Community",
"module": "Hackathon",
"name": "Community Project",
"owner": "Administrator",
"permissions": [
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and contributors
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and Contributors
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
from __future__ import unicode_literals
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Frappe and contributors
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Project Evaluation', {
@@ -123,9 +123,9 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-12 19:44:57.467599",
"modified": "2021-03-04 19:56:53.757808",
"modified_by": "Administrator",
"module": "Community",
"module": "Hackathon",
"name": "Community Project Evaluation",
"owner": "Administrator",
"permissions": [
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and contributors
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and Contributors
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
from __future__ import unicode_literals
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Frappe and contributors
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Project Like', {
@@ -17,9 +17,9 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-12 18:43:24.206708",
"modified": "2021-03-04 18:55:51.877522",
"modified_by": "Administrator",
"module": "Community",
"module": "Hackathon",
"name": "Community Project Like",
"owner": "Administrator",
"permissions": [
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and contributors
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and Contributors
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
from __future__ import unicode_literals
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Frappe and contributors
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Project Member', {
@@ -42,9 +42,9 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-16 19:27:30.842282",
"modified": "2021-03-04 19:44:09.832170",
"modified_by": "Administrator",
"module": "Community",
"module": "Hackathon",
"name": "Community Project Member",
"owner": "Administrator",
"permissions": [
@@ -1,17 +1,17 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and contributors
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from frappe import _
class CommunityProjectMember(Document):
def validate(self):
self.validate_if_already_member()
def validate_if_already_member(self):
if frappe.get_all("Community Project Member", {"owner": self.owner}):
frappe.throw(_("You have already applied for the membership of this project."))
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and Contributors
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
from __future__ import unicode_literals
@@ -1,4 +1,4 @@
// Copyright (c) 2021, Frappe and contributors
// Copyright (c) 2021, FOSS United and contributors
// For license information, please see license.txt
frappe.ui.form.on('Community Project Update', {
@@ -27,9 +27,9 @@
],
"index_web_pages_for_search": 1,
"links": [],
"modified": "2021-02-12 18:45:56.750969",
"modified": "2021-03-04 19:43:10.886773",
"modified_by": "Administrator",
"module": "Community",
"module": "Hackathon",
"name": "Community Project Update",
"owner": "Administrator",
"permissions": [
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and contributors
# Copyright (c) 2021, FOSS United and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2021, Frappe and Contributors
# Copyright (c) 2021, FOSS United and Contributors
# See license.txt
from __future__ import unicode_literals
Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

@@ -0,0 +1,3 @@
frappe.ready(function() {
// bind events here
})
@@ -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": 1,
"max_attachment_size": 0,
"modified": "2021-04-14 13:52:46.135536",
"modified_by": "Administrator",
"module": "Hackathon",
"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
}
]
}
@@ -0,0 +1,7 @@
from __future__ import unicode_literals
import frappe
def get_context(context):
# do your magic here
pass
@@ -0,0 +1,3 @@
frappe.ready(function() {
// bind events here
})
@@ -0,0 +1,49 @@
{
"accept_payment": 0,
"allow_comments": 0,
"allow_delete": 0,
"allow_edit": 1,
"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-04-14 13:11:50.606310",
"doc_type": "Community Project",
"docstatus": 0,
"doctype": "Web Form",
"idx": 0,
"introduction_text": "<div class=\"ql-editor read-mode\"><p>Add details about your project.</p><p><br></p><p><strong>Note:</strong> If you save this project, you won't be able to join another one. If your teammates have already created the project, join it instead.</p></div>",
"is_standard": 1,
"login_required": 1,
"max_attachment_size": 0,
"modified": "2021-04-14 13:11:50.606310",
"modified_by": "Administrator",
"module": "Hackathon",
"name": "project",
"owner": "Administrator",
"payment_button_label": "Buy Now",
"published": 1,
"route": "edit-project",
"route_to_success_link": 0,
"show_attachments": 0,
"show_in_grid": 0,
"show_sidebar": 0,
"sidebar_items": [],
"success_url": "/project",
"title": "Project",
"web_form_fields": [
{
"allow_read_on_all_link_options": 0,
"fieldtype": "Attach",
"hidden": 0,
"max_length": 0,
"max_value": 0,
"read_only": 0,
"reqd": 0,
"show_in_filter": 0
}
]
}
@@ -0,0 +1,7 @@
from __future__ import unicode_literals
import frappe
def get_context(context):
# do your magic here
pass
@@ -0,0 +1,3 @@
frappe.ready(function() {
// bind events here
})
@@ -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-03-04 19:43:28.957577",
"modified_by": "Administrator",
"module": "Hackathon",
"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
}
]
}
@@ -0,0 +1,7 @@
from __future__ import unicode_literals
import frappe
def get_context(context):
# do your magic here
pass
+84 -30
View File
@@ -4,12 +4,12 @@ from . import __version__ as app_version
app_name = "community"
app_title = "Community"
app_publisher = "Frappe"
app_publisher = "FOSS United"
app_description = "Community App"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "jannat@erpnext.com"
app_license = "MIT"
app_license = "AGPL"
# Includes in <head>
# ------------------
@@ -19,6 +19,7 @@ app_license = "MIT"
# app_include_js = "/assets/community/js/community.js"
# include js, css files in header of web template
web_include_css = "community.bundle.css"
# web_include_css = "/assets/community/css/community.css"
# web_include_js = "/assets/community/js/community.js"
@@ -83,42 +84,25 @@ app_license = "MIT"
# ---------------
# Override standard doctype classes
# override_doctype_class = {
# "ToDo": "custom_app.overrides.CustomToDo"
# }
override_doctype_class = {
"User": "community.overrides.user.CustomUser"
}
# Document Events
# ---------------
# Hook on document methods and events
# doc_events = {
# "*": {
# "on_update": "method",
# "on_cancel": "method",
# "on_trash": "method"
# }
# }
doc_events = {
}
# Scheduled Tasks
# ---------------
# scheduler_events = {
# "all": [
# "community.tasks.all"
# ],
# "daily": [
# "community.tasks.daily"
# ],
# "hourly": [
# "community.tasks.hourly"
# ],
# "weekly": [
# "community.tasks.weekly"
# ]
# "monthly": [
# "community.tasks.monthly"
# ]
# }
#scheduler_events = {
# "daily": [
# "erpnext.stock.reorder_item.reorder_item"
# ]
#}
# Testing
# -------
@@ -143,3 +127,73 @@ app_license = "MIT"
#
# auto_cancel_exempted_doctypes = ["Auto Repeat"]
# Add all simple route rules here
primary_rules = [
{"from_route": "/sketches/<sketch>", "to_route": "sketches/sketch"},
{"from_route": "/courses/<course>", "to_route": "courses/course"},
{"from_route": "/courses/<course>/<topic>", "to_route": "courses/topic"},
{"from_route": "/hackathons/<hackathon>", "to_route": "hackathons/hackathon"},
{"from_route": "/hackathons/<hackathon>/<project>", "to_route": "hackathons/project"},
{"from_route": "/dashboard", "to_route": ""},
{"from_route": "/add-a-new-batch", "to_route": "add-a-new-batch"},
{"from_route": "/courses/<course>/home", "to_route": "batch/home"},
{"from_route": "/courses/<course>/learn", "to_route": "batch/learn"},
{"from_route": "/courses/<course>/learn/<int:chapter>.<int:lesson>", "to_route": "batch/learn"},
{"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"
]
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
update_website_context = 'community.widgets.update_website_context'
## Specify the additional tabs to be included in the user profile page.
## Each entry must be a subclass of community.community.plugins.ProfileTab
# profile_tabs = []
## Specify the extension to be used to control what scripts and stylesheets
## to be included in lesson pages. The specified value must be be a
## subclass of community.community.plugins.PageExtension
# community_lesson_page_extension = None
community_lesson_page_extensions = [
"community.plugins.LiveCodeExtension"
]
## Markdown Macros for Lessons
community_markdown_macro_renderers = {
"Exercise": "community.plugins.exercise_renderer",
"Quiz": "community.plugins.quiz_renderer",
"YouTubeVideo": "community.plugins.youtube_video_renderer",
}
View File
+47
View File
@@ -0,0 +1,47 @@
"""API methods for the LMS.
"""
import frappe
@frappe.whitelist()
def autosave_section(section, code):
"""Saves the code edited in one of the sections.
"""
doc = frappe.get_doc(
doctype="Code Revision",
section=section,
code=code,
author=frappe.session.user)
doc.insert()
return {"name": doc.name}
@frappe.whitelist()
def submit_solution(exercise, code):
"""Submits a solution.
@exerecise: name of the exercise to submit
@code: solution to the exercise
"""
ex = frappe.get_doc("Exercise", exercise)
if not ex:
return
doc = ex.submit(code)
return {"name": doc.name, "creation": doc.creation}
@frappe.whitelist()
def save_current_lesson(course_name, lesson_name):
"""Saves the current lesson for a student/mentor.
"""
name = frappe.get_value(
doctype="LMS Batch Membership",
filters={
"course": course_name,
"member": frappe.session.user
},
fieldname="name")
if not name:
return
doc = frappe.get_doc("LMS Batch Membership", name)
doc.current_lesson = lesson_name
doc.save(ignore_permissions=True)
return {"current_lesson": doc.current_lesson}
View File

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