kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

<Improvement> Coach is able to activate the lesson without resource.

Open swapnil106111 opened this issue 7 years ago • 3 comments

Observed behavior

Coach user is able to activate lesson without resources. It must show message like "You can not activate lesson without resources".

Expected behavior

It must show message if coach user trying to activate the lesson without resource.

Steps to reproduce

  1. Login with Coach user.
  2. Create lesson without resource and assign to the class.

Context

  • Kolibri version : Kolibri 0.11.0
  • Operating system : ubuntu 14.04
  • Browser : chrome

Screenshots:

1 2 3

swapnil106111 avatar Dec 14 '18 09:12 swapnil106111

Here are some suggestions that should live in the activation/deactivation process add resources validation (left option) if coach has no resources in lesson, disable active radio option and add messaging explaining why (right option) upon clicking "SAVE", show system error on top of the modal

khangmach avatar Feb 04 '19 18:02 khangmach

Since we've changed the UI to use switches on both the lesson list + lesson management screens, we could look to add a disabled + off state for our switch component. More info about that here.

Some notes...

  • If a lesson was just created and has no resources, the switch needs to be in a disabled + off state by default and hidden from learner view. The switch cannot be in an enabled + off state until a resource is added
  • If a lesson had all its existing resources removed, the switch (enabled on or off) goes back to its disabled + off state and is hidden from learner view.
  • If a lesson is visible to learners and its switch state is enabled + on, and the lesson has all its resources removed, then the lesson should be hidden from learner view and switch state changed to disabled + off
  • We'll need something like a tooltip to show while hovering over the disabled + off switch to explain the coach can't enable the lesson again until they add resources

Another approach, if we want to keep allowing coaches to create resource-less lessons, is to warn them the lesson is resourceless, but not have this as a blocker to activating the lesson. Thoughts @navakk9 @radinamatic @lauradanforth?

khangmach avatar Jul 06 '21 20:07 khangmach

I think this can be simply implemented as this:

If the lesson is empty, and not currently active, then disable the toggle switch. Otherwise, it should be enabled.

rtibbles avatar Jan 03 '24 19:01 rtibbles