Git Product home page Git Product logo

openfun / richie Goto Github PK

View Code? Open in Web Editor NEW
252.0 14.0 80.0 49.99 MB

:pencil: An opensource CMS to build education portals

Home Page: https://richie.education

License: MIT License

Python 47.23% HTML 4.77% CSS 0.14% TypeScript 39.49% JavaScript 0.95% Makefile 0.41% Shell 0.63% API Blueprint 0.19% Dockerfile 0.14% SCSS 5.84% Smarty 0.06% HCL 0.14% MDX 0.01%
lms openeducation cms openedx moodle catalog hacktoberfest django

richie's Introduction

Richie, the best OpenSource CMS to build education portals

CircleCI

Overview

Learning Management Systems (LMS) are great tools for hosting and playing interactive online courses and MOOCs.

However, if you need to build a complete website with flexible content to aggregate your courses, in several languages and from different sources, you will soon need a CMS.

At "France Université Numérique", we wanted to build an OpenSource portal with Python and Django. That's why we built Richie on top of DjangoCMS, one of the best CMS on the market, as a toolbox to easily create full fledged websites with a catalog of online courses.

Among the features that Richie offers out of the box:

  • multi-lingual by default,
  • advanced access rights and moderation,
  • catalog of courses synchronized with one or more LMS instances,
  • search engine based on Elasticsearch and pre-configured to offer full-text queries, multi-facetting, auto-complete,...
  • flexible custom pages for courses, organizations, categories, teachers, blog posts, programs (and their inter-relations),
  • Extensible with any third-party DjangoCMS plugin or any third-party Django application.

Discover Richie

If you're looking for a quick preview of Richie, you can take a look and have a tour of Richie on our dedicated demo site.

It is connected back-to-back with a demo of OpenEdX running on OpenEdX Docker.

Two users are available for testing:

The database is regularly flushed.

Getting started

Take a look at our documentation to get started with Richie.

Contributing

Read our contributing guide to learn about our development process and get started developing on Richie.

License

This work is released under the MIT License (see LICENSE).

richie's People

Contributors

2018d avatar adrien-fun avatar carofun avatar dependabot[bot] avatar gegeturambar avatar greenkeeper[bot] avatar hmoreno-fun avatar igobranco avatar jamoqs avatar jbpenrath avatar jmaupetit avatar kbneedscoffee avatar kernicpanel avatar lunika avatar madmatah avatar manuhabitela avatar mbenadda avatar nathanvss avatar panchoutnathan avatar pyup-bot avatar renovate-bot avatar renovate[bot] avatar riezebos avatar rlecellier avatar rmoch avatar sampaccoud avatar sandroscosta avatar sveetch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

richie's Issues

Optimal CKeditor configuration

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
CKeditor could be nicer for cms page edition.

Describe the solution you'd like
We can have a better CKeditor configuration, like removing some buttons that are not allways accurate like indent, format style, paragraph formatting that are not really responsive (because of inline styling with pixel values).

Also we could enable some other CKeditor plugin and make a minimal css to improve ckeditor preview to be more similar to final content render from frontend.

Describe alternatives you've considered
Define settings.CKEDITOR_SETTINGS to declare our own CKeditor config.

Discovery, Documentation, Adoption, Migration Strategy

cleaned_toolbar

codemirror

Do you want to work on it through a Pull Request?
Yep.

Add a plugin to define the publishing licenses of a course

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
We need a plugin to define a licenses for:

  • the content of a course
  • the content created by participants in a course

Describe the solution you'd like
To add a license to the course content, the person editing the page can add a "license" plugin and choose from 8 possible licenses in a select box:

A free text input is available for the person to give details (e.g. version of the cc license, adaptated version, etc.).

The license is displayed on the site with the free text and a set of logo+name+description defined by us (in the code) for each of the possible licenses.

Discovery, Documentation, Adoption, Migration Strategy
This is what we have today on the site:
image

Use `main_organization` on courses in the search app & in the frontend

Bug Report

Expected behavior/code
Any use of related organizations for a course should use the main_organization field to identify the main org (for search, display etc.)

Actual Behavior
The search app does not make use of the main_organization field on courses and instead relies on the ordering of the organizations field to pick out the first org as the main one.
This behavior is not consistent with the way it is implemented in the new Course model.

Steps to Reproduce

  1. Open the frontend to check out API responses & displayed elements in the list of courses

Environment
N/A

Possible Solution
Add main_organization in the ES index (for higher-priority in search results later on) and in the API responses in search. Make use of it on the frontend to display a course's main org.

Additional context/Screenshots
N/A

Person plugin template escape html

Bug Report

Expected behavior/code
Rendered person plugin should display its resume should not escape its HTML.

Actual Behavior
Every HTML is escaped, aka we see tags like <p> in resume.

Steps to Reproduce

  1. Add a Person plugin in a placeholder from a page;
  2. Select a Person page;
  3. Open your eyes and it's full of escaped HTML.

Environment

  • Richie version: 0.1.0
  • Platform: Ubuntu 18.04

Possible Solution
In src/richie/apps/persons/templates/persons/plugins/person.html just change:

<p class="person-plugin__body__text">{{ related_plugins.resume.0.body }}</p>

With:

<p class="person-plugin__body__text">{{ related_plugins.resume.0.body|safe }}</p>

Additional context/Screenshots
It's probably due to how you reach the resume content (.0.body).

Show *why* a course appears in search results

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
Sometimes it is non-obvious why a course appears in the list of results, even when search is properly configured and the course does belong in the results.

The first example of such behavior we've encountered is filtering by organizations:

  • a course can have several linked organizations and therefore appear in the search results for any of them;
  • however we only display the main organization for each course in the search results (for lack of space to show more);
  • users will probably see this as a bug ("Why is this course from University X appearing in my search for University Y? This is broken!").

Describe the solution you'd like
There are two ways to go about this: either consider this a general problem — understanding search result relevance — and find a general solution, or solve it for the organizations case only as hopefully other cases don't suffer from this (because the reason is obvious or because the relevant information does not appear in the search results at all)

Describe alternatives you've considered
Note all of these but the last one involve showing the org the user searched for when there is a mismatch between an active org filter and a course's main org.

General solutions:

  • Typography, like bold or colored org name when the filter is applied
  • Visual cue next to the org name

Specific solutions:

  • Show a helpful "in collaboration with X" before the name of matched secondary orgs
  • Show a separate subtitle "Courses made in collaboration with Univ Z, Univ Z2, Univ Z3" without those courses below

Discovery, Documentation, Adoption, Migration Strategy
N/A

Do you want to work on it through a Pull Request?

Course listing from edx is broken

Bug Report

Expected behavior/code
From page "Courses" (aka /courses/) there was a listing of Course resumes taken from edx backend.

Actual Behavior
Actually listing stay empty when page is loaded and a Javascript occurs in browser console:

[React Intl] Missing locale data for locale: "undefined". Using default locale: "en" as fallback. index.es.js:850
Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `SearchFiltersPane`. See https://fb.me/react-warning-keys for more information.
    in Connect(SearchFilterGroup) (created by SearchFiltersPane)
    in SearchFiltersPane (created by Search)
    in div (created by Search)
    in div (created by Search)
    in Search (created by Connect(Search))
    in Connect(Search)
    in Provider
    in IntlProvider 

Steps to Reproduce

  1. Get the last richie version from master
  2. make bootstrap then make demo-site to minimal page tree;
  3. Go to Courses page /en/course/

Environment

  • Richie version: 0.1.0 (b2e97fc)
  • Platform: Ubuntu 18.04

Pytest does not play the tests in the "plugings" directory

Expected Behavior

Pytest and Django's test runner should run the same number of test.

Actual Behavior

There are 6 tests that Django's test runner plays that are not played by pytest. I identified these 6 tests to be the ones for the "large_banner" plugin.

Steps to Reproduce

The cause may be that the "plugins" directory has to be declared somewhere for pytest to consider it?

Define settings in a TS file instead of JSON

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
We need to translate a lot of strings in the settings (for #89). This is somewhat painful to handle in a JSON file and would require some code.

Describe the solution you'd like
If the settings are a TS file, the react-intl babel plugin will take care of string extraction for us.

Describe alternatives you've considered
Writing a script to pick up message descriptors in JSON settings.

Discovery, Documentation, Adoption, Migration Strategy
Will work out of the box. Consumers who want to extend/modify the default settings will just have to replace the module and import+extend it from their own settings module.

Do you want to work on it through a Pull Request?
In progress.

Consider distributing sandbox' templates with Richie

Purpose

Some templates have been left in the sandbox:

sandbox/templates/
├── menu
│   ├── menu.html
│   └── _menu.scss
└── richie
    ├── base.html
    └── fullwidth.html

2 directories, 4 files

We should decide whether or not they must be distributed with the Richie Django application.

Proposal

I would distribute the base & fullwidth templates but not the menu template as it's tightly bounded to
Django-CMS but not Richie.

In this case, one problem remains: menu styles; our scss build mixes scss in Richie's apps templates directories and the sandbox (doh!).

Filter related PageExtension items following page language

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
Currently we don't bother of languages in manager methods to get PageExtension draft or published items, we just get the PageExtension, no matter the parent is translated in different language from the default one.

I just tested to fill draft and published versions of Organizations in french and it almost works when listed from a Page course in french.

I mean almost because french version is showed instead of english one when it exist (draft or published) but if an organization item does not exist in french, the english version is showed anyway. I think it should not display.. no ?

Describe the solution you'd like
First, ensure we don't want to display PageExtension items from default language when querying from another language. If we want to keep showing the default language items, this is issue can be closed.

If we don't want to display default language items, we have to find a way to filter items depending from current Page language.

Describe alternatives you've considered
Keep showing default language items as a fallback when there is no translation available, but it seems troubling for users.

Discovery, Documentation, Adoption, Migration Strategy
First we should try to find a query selector to filter from sql schema.

It seems extended_object__languages is relevant but it's a comma separated list of language codes (aka en,fr) so we will have to make a complex query to perform accurate selection, remember a language code can be something like fr or fr-be.

Finally we may filter item from a Python loop looking at available language for the item through Page model method like get_title. But this will trigger an additional query for each loop item.

Do you want to work on it through a Pull Request?
I may be able to make at least some R&D on this.

Add babel to the build process

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
The main thrust behind the idea to add babel to our process is that we'll need it to use react-intl extractor. See #89 for more about this.
Side bonuses: we get to use babel-polyfill as well as babel-preset-env.

Describe the solution you'd like
Add babel as a second loader after Typescript for ts/tsx files. Tweak tsconfig.json to output ES6 and keep import statements intact, while still being able to resolve deps and import JSON.

Describe alternatives you've considered
Not use babel, find other solutions for string extraction & i18n. Other solutions were not satisfying and harder to automate.

Discovery, Documentation, Adoption, Migration Strategy
No changes to yarn build use. We'll need to add some docs on the build.

Do you want to work on it through a Pull Request?
Yes.

Generate container version.json outside from the CI

Purpose

At the time of writing, we generate container's version.json file during the CI build. We think this file should be generated every time we build the container, whatever the context is (CI, local build, etc.).

Proposal

Move the version.json file generation to the make build rule. If no CI environment variable is found, fallback to local files (using git, etc.).

Basic Standard template and look

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
The basic template and static files in the app are barebone. I'd like to flesh it out so that right out the box we can have a nice portal website. Starting with the course-detail page.

Describe the solution you'd like
I'll edit the templates and the static files.
The templates will have limited placeholder to allow anyone to edit on the cms without breaking the webpage's structure. The limited placeholder will make up a form that people fill in.

Describe alternatives you've considered
Without the limited placeholder, you would have a lot of difficulty maintaining the same look and feel throughout the whole website, especially if you hand it over to non web designer.

Discovery, Documentation, Adoption, Migration Strategy
I'll use {% extends template %} on the plugins to have it as modular as possible. Basic look and feel will be maintained by the django-cms core.

Do you want to work on it through a Pull Request?
I'll make a pull request as soon as I'll have the course_detail page working how I want it to.

Organization list page

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
I want a page similar to these for the organization list page:
https://www.fun-mooc.fr/universities/
https://www.edx.org/schools-partners

Describe the solution you'd like
Use a version of list-of-child template using course-glimpse style to show the blocks.

Discovery, Documentation, Adoption, Migration Strategy

  • Obtain either logo or banner (both?) data of the child pages to show it on parent page.
  • Complete the layout of the parent organization page.

Do you want to work on it through a Pull Request?

I've started on the layout. I will need some pointers to obtain the childs' data.

Include schema.org markup

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
We could improve the markup of Richie powered websites by including schema.org annotations to our pages.

Describe the solution you'd like
Include markup as described in this issue schemaorg/schemaorg#195

Follow-up

  • Course detail. Mostly done in PR #1390 . TODO: add categories to schema.org and to opengraph
  • Category detail
  • Person
  • Organization
  • Program
  • BlogPost

Make richie a distributable / packaged Django application

Purpose

At the time of writing, Richie is a Django project embedding FUN's opinionated vision of what such portal should be. Let's make Richie a distributable Django app that can be customized and integrated in an existing Django (CMS) project.

Proposal

We need to make the project tree evolve to a more standard distributed app tree. I think the Django-Oscar project is a good example of what our repository should look like:

  • make richie a meta application that bundles sub-apps (core, courses, persons, search, etc.)
  • move the application to a src/ directory
  • move tests in a test/ directory
  • add a sandbox/ directory (the minimal Django project that will be used for development/tests)
  • package the application (setup.{py,cfg})*
  • automate packaging in the CI*

* Those two last points the latest point can be handled in a separated PR.

Edit: we need to package the app to make the whole refactoring working

Course glimpse from course content

Feature Request

While making course glimpses (each course a card object inside a flex grid), i figured some things that not works very well with current course content.

Course has no image preview

There is only a video teaser, enforced by plugin settings. Video does not work very well inside glimpse, i mean the video is working, but it takes more time to load every video (and i just tested with three items, in real production site case the page loading could be huge).

Also visually this is not really nice since video preview is often blur because video size is often largely higher than card size.

Current course session is not really reachable

As already discussed with @sampaccoud there is some algorithm to introduce into a helper in model (or through a template tag) to get the current session object, since we need to display current session name and date in course cards.

However @sampaccoud has offered to implement it in coming commit, this point is here just to remember this issue.

'course_syllabus' too long for a glimpse

Since we moved everything to placeholder, i included 'course_syllabus' in course fragment but this has issue since this is content writed in CKEditor so it can be one or more paragraph without any limits on their text size.

Glimpses are some little cards in a grid and having these long syllabus take too much size and does not display very well.

Commonly with some simple text we can use builtin template tags to nicely cut text but this is impossible with placeholder, either we take all the rendered placeholder content or not at all.

And since syllabus is displayed on course detail page i don't think we can stand on user to write very short syllabus with only 6/7 words as we can see it in fun-mooc.fr course cards.

Describe the solution you'd like

I think we should go back to include some content like image preview and short resume on Course model object instead of the "everything as placeholder".

I don't think image preview has meaning to be displayed on course detail and short resume may conflict with syllabus. Also it could be safer to be able to use builting template tag to ensure the resume never exceed some maximum height inside card.

Describe alternatives you've considered

Image preview and short resume could be placeholder, hided with css in course detail page but this will be a very bad and dirty way in my opinion.

Screenshots

Current course card from fun-mooc.fr

funmooc-card

On work course card from richie
Not finished but give an idea of related problems.

onwork-card

Adding description to organization

Bug Report

Expected behavior/code
On an organization detail page:

  • Add text plugin to description placeholder
  • Write said description

Actual Behavior
Cannot add text plugin to description placeholder. It gives this error message even if placeholder is empty:
"This placeholder already has the maximum number (1) of allowed Text plugins."

Steps to Reproduce

  1. Create new organization
  2. Add text plugin to description placeholder.
  3. And then the bug happens!

Alternate:

  1. Go on existing factory created organization
  2. Delete existing text plugin from description placeholder.
  3. Add text plugin to description placeholder.
  4. And then the bug happens!

Environment

  • Richie version: master of 16 july 2018
  • Platform: firefox/chrome

Possible Solution

Additional context/Screenshots
screenshot_2018-07-16 hernandez rodriguez and sullivan

Move dependencies to an "app logic"

Purpose

Following #254, we need to move dependencies from a project logic (all pinned primary and secondary dependencies) to an app logic (unpinned primary dependencies only).

Proposal

  • list primary dependencies
  • add version restrictions (if any) for each primary dependency

Manage i18n/l10n for TS & TSX files

Right now all user-facing text in the frontend is written in English with no support for localization and no i18n infrastructure.

We should add some i18n management facilities and a way to tag, collect and load translatable/translated strings.

  • Add a babel transpilation step so we can use react-intl's babel plugin string extractor (prerequisite)
  • Define settings in a TS file so strings in there can be easily extracted
  • Add react-intl and MessageDescriptors for translatable strings
  • Automatically extract strings with the babel plugin
  • Fetch translations to be injected in the app at runtime

🚧 Manage translations => for now we will be pulling & committing them manually into the repository.

Remove unused sandbox statics

Purpose

The sandbox static folder (e.g. sandbox/static) contains historical fixtures that are no longer used.

Proposal

Remove those legacy fixtures.

Add tests for the create_demo_site management command

Feature Request

PR #345 removed tests for the "create_demo_site" command. We should find a solution to better test this command.

Describe the solution you'd like

  1. Test the "create_demo_site" method by mocking all factories AND the "recursive_page_creation" method.
  2. Test the "recursive_page_creation" method by mocking the PAGE_INFOS dictionary with a minimal configuration:
{
    "my-page": {
        "content": {"en": "my page", "fr": "ma page"},
        "in_navigation": False,
        "kwargs": {
            "template": "richie/fullwidth.html",
            "reverse_id": "my_page",
        },
        "children": {
            "my-sub-page": {
                "content": {"en": "my sub page", "fr": "ma sous page"},
                "in_navigation": True,
                "kwargs": {"template": "richie/fullwidth.html"},
            }
        },
    },

Update README to container-native development

Purpose

The README file should be in line with FUN's approach to container-native development.

Proposal

  • Move "standard" installation procedure to /docs
  • How to build/run/lint/test Richie using Docker
  • Code formatting expectations

Move psycopg2 dependency to psycopg2-binary for the sandbox

Purpose

The next release of psycopg2 (2.8) wheel package will be renamed to psycopg2-binary instead of psycopg2.

Warning log message:

/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.

From the documentation:

Note: The -binary package is meant for beginners to start playing with Python and PostgreSQL without the need to meet the build requirements. If you are the maintainer of a publish package depending on psycopg2 you shouldn’t use psycopg2-binary as a module dependency. For production use you are advised to use the source distribution.

Proposal

  • Move to psycopg2-binary for sandbox requirements

Resource names should be consistent throughout the project

Expected behavior

Resources have a canonical name that is reused throughout all the places where their name is expressed as a string, such as URL routes, keys in objects or serializable elements, etc.

Actual behavior

Resources are named by their plural or singular forms alternatively, eg.

  • organization in API routes, client state keys, facet names...
  • organizations in foreign keys on eg. courses, in API filters...

Proposed solution

Standardize on the plural form as suggested by https://swaggerhub.com/blog/api-design/api-design-best-practices/.

This will prevent us from running into issues due to inconsistent naming and having to transform singulars into plurals and plurals into singulars when reaching for a resource using its name in different places.

App container is launched with wrong user ID

Bug Report

Expected behavior/code
App container should be launched with user ID 1000 as configured with container FS permissions. This is required to create file like uploading image file in page contents.

Actual Behavior
Actually app container seems launched with user ID 10000 and so trying to upload a file lead to an error like [Errno 13] Permission denied: '/data/media/organizations/logo/6.jpg'.

Steps to Reproduce

  1. Launch richie app container with make run;
  2. Go to a page (logged as admin) where you can upload an image or any other file kind;
  3. Upload a file;
  4. You get a Permission denied error.

Environment

  • Richie version: 0.1.0 (1696320)
  • Platform: Ubuntu 18.04

Possible Solution
From @jmaupetit it seems related to our usage of docker-compose up -d in make run where we don't set an user.

Make organization logo a placeholder

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
To standardize the organization html with the subject html.

Describe the solution you'd like

  • Remove the logo as an organization setting
  • make it a placeholder
  • Modify code of organization plugin.
  • Adapt automated test.

Describe alternatives you've considered
Keep current code.

Discovery, Documentation, Adoption, Migration Strategy

Do you want to work on it through a Pull Request?

Switch to a non-privileged USER for the development Docker image

Purpose

As discussed in #279, running tests in the container using the root user may hide potential issues of the application (e.g. permission-related issues). We need to make our test suite more reliable and trustworthy by running the test suite using a non-privileged user.

Proposal

  • Switch to the user ID=10000 when new dependencies have been installed in the development image
  • Configure pytest and the linters to run tests with the app in read-only mode

Use isort to automate import statements ordering

Purpose

isort is a wonderful tool to automate import statement ordering, and, it plays well with black. Let's use this to increase our code base quality (and predictability).

Proposal

  • Add isort dependency
  • Configure isort to play well with Black, see [1, 2]
  • Add a CircleCI lint-back-isort job that runs isort in check mode
  • Update README file

[1] https://github.com/timothycrosley/isort#configuring-isort
[2] https://github.com/ambv/black#how-black-wraps-lines

Consider adding a new console logger with INFO level

Purpose

As discussed with @mbenadda [1] some relevant logs may get lost if we only use sentry for logs with a level >= WARNING.

Proposal

Add a new logger using the console handler with the INFO level so that we can store and use them at a system level depending on the infrastructure (e.g. OpenShift + ELK).

Reference(s)

[1] #112 (comment)

Rename fun_cms project to richie

Purpose

We recently decided to rename our fun_cms project to richie. There is still work to do to be fully consistent.

Proposal

Rename the django project and ensure all references ot fun_cms have been moved with a grep fun-cms at the project's root.

Use TypeScript's `strict` mode

TypeScript has a strict mode (nothing to do with the browser's) that enables stricter compilation errors, and will evolve over time as new, more stringent compiler options are added in.

Right now it already enables a bunch of options we did not manually enable (https://www.typescriptlang.org/docs/handbook/compiler-options.html), the most significant of which is strictNullChecks.

We'll have to do some cleaning up after we enable it but it should help avoid errors.

Consider re-organizing front-end tree

Purpose

The current front-end sources and build targets organization in not obvious. I think we might consider at least discussing design decisions here.

This is a follow-up issue after two conversations that started here:

Proposal

  1. build targets should be placed in the project main static directory, e.g. richie/static/js and richie/static/css,
  2. targets build directories must be added to the project .gitignore,
  3. front-end sources should stand in a separated directory, e.g. richie/assets/{scss,js},
  4. all SCSS sources should be in the same directory, e.g. richie/assets/scss, each file corresponding to styles for an application's components (e.g. _search.scss for the search application), or a directory (e.g. richie/assets/scss/search/*.scss) if styles related to an application becomes too big.
.
└── richie
    ├── assets
    │   ├── js
    │   └── scss
    │       └── search
    └── static
        ├── css
        ├── images
        └── js

Add a plugin to create course plans

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
We need a plugin to easily build a course plan

Describe the solution you'd like
A course plan looks like the screenshot below.
It could also be a more structured index with nested subtitles.
The plugin should allow adding titles by level.

Describe alternatives you've considered
Should we allow markdown?

Discovery, Documentation, Adoption, Migration Strategy
image

Add courseRun

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
We need to add the courseRun to complete course session information(startDate, endDate, subscriptionDate,etc.)

Describe the solution you'd like
Add a page model that we can attach by plugin to course page.

Describe alternatives you've considered
Have the courseRun created as plugin of course. What do you think @sveetch ?

Discovery, Documentation, Adoption, Migration Strategy
schemaRichie.pdf

Do you want to work on it through a Pull Request?
Proof of concept within the next 2 weeks.

Layout & style the organization view

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
The organization view is implemented in Django but it's missing any layout or styling.

capture d ecran 2018-06-18 a 10 57 30

Describe the solution you'd like
Use BEM classes and bootstrap defaults to make a proper layout for the organization view.

Describe alternatives you've considered
N/A

Discovery, Documentation, Adoption, Migration Strategy
This is roughly what I'm going for:

+------------------------------------------------------------------------------+
+                                                                              +
+                                  * image *                                   +
+                                                                              +
+                                                                              +
+                                                                              +
+                                                     +------------------+     +
+                                                     +                  +     +
+                                                     +                  +     +
+-----------------------------------------------------+                  +-----+
                                                      +       logo       +
                                                      +                  +
  The Incredible Course title                         +                  +
                                                      +------------------+

  Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed turpis arcu,
  vulputate a orci vitae, semper molestie quam. Vivamus quam enim, tincidunt
  eget lorem eget, consequat volutpat odio. Cras eget mi sed elit tincidunt
  fringilla a a sapien. Mauris at luctus diam. Suspendisse condimentum, arcu
  eu ullamcorper pretium, elit sapien iaculis lacus, quis auctor risus quam in.
  Praesent interdum metus turpis, quis mattis ligula imperdiet sed. Nam in
  tortor non magna blandit hendrerit in eu odio. Duis luctus rutrum nisi, in
  dignissim lectus. Maecenas vel ante fermentum, mollis massa eget, sollicitudin
  odio. Maecenas malesuada pulvinar dictum. Phasellus vel porttitor tellus. Ut
  varius orci sed dapibus aliquet.

  Duis in dapibus mi, non porttitor libero. Cras tristique purus sed mauris
  feugiat, vel egestas diam fringilla. Pellentesque sit amet mauris quis libero
  molestie interdum. Donec nec sodales dolor, lacinia interdum mi. Suspendisse
  ac est purus. Nullam vel sapien ante. Maecenas hendrerit leo vitae iaculis
  facilisis. Phasellus ornare pellentesque imperdiet. Nam cursus bibendum
  feugiat. Etiam efficitur nunc id dictum varius. Vestibulum porttitor ac justo
  vitae tincidunt.


  Courses

  +--------------+    +--------------+    +--------------+    +--------------+  
  +   *image*    +    +   *image*    +    +   *image*    +    +   *image*    +
  +              +    +              +    +              +    +              +
  +--------------+    +--------------+    +--------------+    +--------------+
  + Course Title +    + Course Title +    + Course Title +    + Course Title +
  +              +    +              +    +              +    +              +
  +              +    +              +    +              +    +              +
  + From X to Y  +    + From X to Y  +    + From X to Y  +    + From X to Y  +
  +--------------+    +--------------+    +--------------+    +--------------+

  +--------------+    +--------------+    +--------------+ 
  +   *image*    +    +   *image*    +    +   *image*    + 
  +              +    +              +    +              + 
  +--------------+    +--------------+    +--------------+ 
  + Course Title +    + Course Title +    + Course Title + 
  +              +    +              +    +              + 
  +              +    +              +    +              + 
  + From X to Y  +    + From X to Y  +    + From X to Y  + 
  +--------------+    +--------------+    +--------------+ 

Do you want to work on it through a Pull Request?
Will be linked here when it's open.

Steps:

  • Lay out the organization page in general
  • Reuse styles from CourseGlimpse to show the list of courses

Add & configure raven.js

Purpose

As mentioned in #112, we need to integrate and configure Raven.js to also catch front-end application errors [1, 2].

Proposal

  • load the raven template tag library in the base Django template
  • define a sentry_public_dsn JavaScript variable in a script block from the Django base template (using {% sentry_public_dsn %})
  • add raven.js to front-end dependencies and build
  • configure the client via Raven.config(sentry_public_dsn).install()
  • wrap front-end app using Raven.context

References

[1] https://docs.sentry.io/clients/python/integrations/django/#using-with-raven-js
[2] https://docs.sentry.io/clients/javascript/

Multi-site support?

In the meeting today, there was talk of configuration through settings files. Is multi-site support something that is being considered for this project? A use case for this would be to give different companies separately branded portal experiences to access the courses that are relevant for their employees.

Configure access rights to each type of page

Purpose

We need to define access rights on each type of page depending on the role of a user.

Proposal

As a first approach, here are what I think the access rights could be:

  • Any page:
    • add/edit/publish/delete: only staff users
  • Organization
    • add/publish/delete: only staff users
    • edit: staff users or organization admin
  • Person
    • add: only staff users
    • edit: staff users or user linked to the person
    • publish: only staff users
    • delete: only staff users
  • Subject
    • add/edit/publish/delete: only staff users
  • Course
    • add: staff users, teachers or admin of the linked organization
    • edit: staff users, teachers of the course or admin of the linked organization
    • publish: only staff users
    • delete: only staff users

The right to add a page involves configuring the page creation wizard. I didn't figure out yet if this is possible and how we would do that.

This feature probably requires modifications to the existing models:

  • add a OneToOne relation from a person to a user. required=False.
  • add a ManyToMany relation between organizations and users with a through on OrganizationAccess to be able to define roles (admin, teacher)
  • add a ManyToMany relation between courses and users with a through on CourseAccess to be able to define roles (admin, teacher)

Person plugin form list every pages, not only Person pages

Bug Report

Expected behavior/code
Select box in PersonPlugin form should list only extended page with Person model.

Actual Behavior
Currently the select box is listing every CMS pages.

Steps to Reproduce

  1. Edit a page;
  2. Try to add a Person plugin into a placeholder which allow it;
  3. Click to open the select box from opened form for added Person plugin.

Environment

  • Richie version: 0.1.0 (from my own branch synchronized from master 200c8a3)
  • Platform: Ubuntu 18.04 LTS

Possible Solution
Adding a filter inside plugin form machinery to retain only the extend page with Person.

Add a course plugin

Feature Request

We would like to be able to publish a course glimpse for any course on any page of the CMS.

Describe the solution you'd like

Add a course plugin similar to the existing Person and Organization plugins.
Use the existing course glimpse fragment to display the course glimpse.

Logotype Design

Hi, I would like to know what do you want for this logo, can you give me something to get inspired?

Thank you!

Best Regards!

Upgrade html5lib to >0.9999999

Purpose

This is a follow-up issue of PR #103 [1].

Due to security issue, we need to upgrade html5lib to a release >1.0b8:

The serializer in html5lib before 0.99999999 might allow remote attackers to conduct cross-site scripting (XSS) attacks by leveraging mishandling of the < (less than) character in attribute values.

html5lib is a dependency of djangocms-text-ckeditor, the problem has already been reported [2] and this upgrade is still pending [3].

[1] #103 (comment)
[2] django-cms/djangocms-text-ckeditor#403
[3] django-cms/djangocms-text-ckeditor#464

Proposal

IMO we have two options here:

  1. wait for a new release of djangocms-text-ckeditor bundled with a recent release of html5lib, or,
  2. use an alternative content editor for Django CMS

Implement default additional filters on the backend side

Feature Request

Is your feature request related to a problem or unsupported use case? Please describe.
The 'new', 'availability' and 'language' filters are described by the frontend's default settings; they are expected and displayed but not yet implemented in the API.

Describe the solution you'd like
We need to add the corresponding queries to the default backend settings and implement the logic that can handle settings-defined filters in the ViewSet itself.

Describe alternatives you've considered
N/A. Right now this is our best proposal for filters extensibility.

Discovery, Documentation, Adoption, Migration Strategy
We will need to document this feature, using the default filters as an example: users can extend/replace frontend and backend settings to customize filters and hand custom-made ES requests to our code.

Do you want to work on it through a Pull Request?
👍

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.