kartoza / prj.app

A django app for creating visual changelogs for software releases
29 stars 32 forks source link

We need to implement the lessons app #657

Open timlinux opened 6 years ago

timlinux commented 6 years ago

This is the specification for a new lessons app in projecta. The idea is that each project can create one or more lessons that teach people how to use their app. The lessons follow the same layout and approach as our work here:

https://github.com/kartoza/QGISTrainingWorkshop

The app should implement the following models / schema:

screen shot 2018-01-23 at 09 29 21

We will add word / character count limits to the various sections to constrain the content to around 2 pages. The outcome should be:

  1. everything should be multilingual supported so that you can add translations for all parts of the lesson and render it in different languages
  2. a form where you can CRUD lessons
  3. a subform where you can CRUD lesson questions
  4. a subform where you can CRUD the answers for questions
  5. a subform where you can CRUD specifications for the exercise part
  6. a form where you can CRUD sections
  7. a form where you can drag and drop to order sections
  8. a form where you can drag and drop to order specifications (or do in the same step as creation would be better)
  9. a form where you can drag and drop to order questions (od do in the same place as creation would be better)
  10. form where you can drag and drop the lesson order within a section
  11. an index page that lists all lessons, grouped by section for a project
  12. a view where the lesson is rendered similar to the example below:

screen shot 2018-01-04 at 09 30 27

screen shot 2018-01-04 at 09 30 46

On the view we should add logic (@ann26 has previously done similar) to render the view as a PDF.

In a future ticket we will extend the lessons index page with a form which lets you tick a collection of lessons and generate a PDF containing only those lessons.

There should be an additional option to set a stylesheet on a per-project basis that will inform the look and feel of the worksheets. Maybe more simply we can just do this by letting the user provider two or three accent colours that are used for the margin icons, underlines etc. The project logo can appear at the start of every page.

timlinux commented 6 years ago

CC for your interest @charlotte-morgan

Charlotte-Morgan commented 6 years ago

@timlinux - thanks for tagging me here. I hope CRUD docs are not the same as CRAP maps :)

timlinux commented 6 years ago

@Charlotte-Morgan :-)

CRUD - Create, Read, Update, Delete

ismailsunni commented 6 years ago

More task:

ismailsunni commented 6 years ago

Tasks: https://docs.google.com/spreadsheets/u/1/d/1hpCL1ZreIDWBreaF_nWuqwrQROV4bRmAS3tcvaCefyk/edit?usp=drive_web

ismailsunni commented 6 years ago

Hi @timlinux

new project role here for lessons_manager...and make it editable by staff, lessons manager or project owner...

Can we just use group permission for this? And check the permission for CRUD-ing lesson?

timlinux commented 6 years ago

Can we just use group permission for this? And check the permission for CRUD-ing lesson?

I think it is better model it as I described @ismailsunni - the permissions are specific to a particular project or organisation - IIRC the groups in django will be global across all projects which wont work.

@Gustry @ismailsunni @myarjunar Sorry I didnt make it clear but we should copy the interactions from changelogs: Show the section / lesson list in the side box, clicking on the box will take you to a menu of all sections / lessons, clicking on a specific lesson will take you to a read only render of that lesson

lessons

At the top right corner of the read only lesson render (which should look just like the worksheet example above) should show three icons:

  1. print icon (print to pdf using js pdf generator)
  2. edit pencil icon (available to lesson managers, project admins and staff only) - takes you to the lesson form to tweak it
  3. remove icon (available to lesson managers, project admins and staff only) - lets you remove the lesson
timlinux commented 6 years ago

Here are the mappings of the worksheet fields to the content on the rendered worksheet:

1-introduction-to-inasafe copy.pdf

Gustry commented 6 years ago

Notes from @timlinux on Gitter: :point_up: January 24, 2018 8:07 AM

timlinux commented 6 years ago
Gustry commented 6 years ago

For the table on the rendered lesson: The table should not be rendered if it is empty (we should still have the hover over star to add a specification). Once the first spec. is added the table can be rendered.

This one looks weird for me. We have no idea that there is hidden table and a hidden button to add a requirement It's quite hard to find the add new requirement button. Maybe we should still add a text if there is no table?

timlinux commented 6 years ago

This one looks weird for me. We have no idea that there is hidden table and a hidden button to add a requirement It's quite hard to find the add new requirement button. Maybe we should still add a text if there is no table?

It also looks wierd having an empty table. As we discussed on zoom though, just make the whole div of the exercise section a hover target.

timlinux commented 6 years ago

More niggles:

Gustry commented 6 years ago

I thought the table is compulsory. If it's compulsory, when it's empty, it reminds you to fill it. You said we don't want a placeholder.

christodewit commented 6 years ago
Gustry commented 6 years ago

When you submit a new lesson there is no way afterwards to attach files or set the youtube or author details

I can't replicate this one. I can add new/edit youtube link or author.

christodewit commented 6 years ago

screen shot 2018-01-25 at 11 16 52 screen shot 2018-01-25 at 11 16 22

christodewit commented 6 years ago

Markdown in GitHub: screen shot 2018-01-25 at 13 24 06

Display in GitHub: screen shot 2018-01-25 at 13 24 15

Display in Projecta: screen shot 2018-01-25 at 13 27 56

Gustry commented 6 years ago

@christodewit I moved the table with markdown to a separate issue: #723

I fixed your first problem when you remove an answer. But I can't replicate your bug about adding a second question.