Open actual-saurabh opened 6 years ago
So, the envisioned behaviour is like this:
Complete
action. This woul be irrespective of whether any preceding steps are already complete. Any incomplete Quizzes or Assignments in the sequence would turn red to indicate that additional options need to be selected for them. Hitting complete before setting them up would display an error or warning (depending on as yet undiscussed conditions) or the complete button can be disabled.Reset
action.Agree.
I would like all of this to exist in a way that could be utilized from other areas of the application as well. EG: If an admin is reviewing a student's progress from reporting screens it would be nice if they could reset (or complete) a course for that student without leaving the screen. I like having a specific auto-pilot area (this would especially be useful for us during support requests or users who are testing things like engagements and notifications). But connecting to these same functions from other areas would make smoother UX for admins as well.
I like auto-pilot hidden as a solid first step towards working this into the codebase though!
i wonder if deleting records from $prefix_lifterlms_user_postmeta table is enough to reset things
This worked for me. Its easy to reset all courses of a student. If you need to reset a specific course it requires coding:
my user_id=2 and the couse_id is 130 wptr1 is my table prefix
Remove lesson completion:
delete from wptr1_lifterlms_user_postmeta where user_id=2 and ( meta_key='_is_complete' or meta_key='_completion_trigger' );
To remove a specific course the "post_id" of the specific lesson must be added to the where.
Remove quizzes:
delete from wptr1_lifterlms_quiz_attempts where student_id=2;
Same as above, for specific course you need to add quiz_id to the where clause with the post_id of the lesson.
Remove overalls: Finally remove the meta key with the course id (130 in my case).
delete from wptr1_usermeta where user_id=2 and meta_key='llms_course_130_progress';
@badpenguin your queries ~will~ should do the trick but we of course want to have a UI to make course progress resetting simple for everyone, not only those with SQL knowledge.
@badpenguin your queries ~will~ should do the trick but we of course want to have a UI to make course progress resetting simple for everyone, not only those with SQL knowledge.
That means that you will accept a patch that will introduce this features?
@badpenguin
Possibly. We haven't marked this as a good first issue
or as help wanted
as it does require us to do a lot of UX development / design and will require probably quite a few changes across various areas of the codebase. We don't mind collaborating on more complicated things -- of course -- but please note that if you are going to patch it we're probably going to request changes and work on it for a few weeks with you before it can be merged in.
As this is currently prioritized for future development I don't have very specific guidelines on exactly how we want this to work or what it will look like.
If you want to collaborate about it it would probably be best to first draft a proposal (as a new issue referencing this one) and we can "design" it there before you start writing any code.
Thanks!
Possibly. We haven't marked this as a
good first issue
or ashelp wanted
as it does require us to do Possibly :) Resetting all the users course make sense for when developing new courses, that my use's case. Its also the easier to do from an SQL point of view.
I've added a red danger link in /wp-admin/admin.php?page=llms-reporting&tab=students&stab=courses&student_id=2 - just below the list of the user's courses
And then i use an admin_post hook to call a function that executes the SQL operations, only if you are logged as system admins (easy to implement a role anyway), and then i redirect back.
So i've it already implemented.
If that's ok for you we can agree where to put that button.
@badpenguin
Can you post a screencap for me please?
@badpenguin
Can you post a screencap for me please?
Here is where i put the link: https://snag.gy/1KAGj2.jpg
If you can describe me wich is the button to copy the css style, where to place it, and what to do after the operation is finished, i think i'll have a little time to do it.
Is there also a dev chat on slack, spectrum, gitter, etc. somewhere?
Here is where i put the link: https://snag.gy/1KAGj2.jpg
Thanks
If you can describe me wich is the button to copy the css style, where to place it, and what to do after the operation is finished, i think i'll have a little time to do it.
Button classes provided by LifterLMS can be found here: https://github.com/gocodebox/lifterlms/blob/master/assets/scss/_includes/_buttons.scss#L102
This kind of button should be llms-button-danger
However what we'd actually prefer here is that each row has an action button to reset progress on that course specifically. This could look something like the student management table on each course / membership
There should also be a checkbox for selecting multiple courses and resetting the progress on all those courses.
While having a "nuke all" button as you've built may be useful, I don't believe it's the most elegant way to construct this feature.
If you'd like to work on this given this information let me know, I'll open a new issue and outline the specs of the feature as we'd like it constructed.
Thanks
On the admin dashboard, through a hidden screen like
/wp-admin/options.php
that site administrators (and support team) can use to test and validate behaviour and recreate exact states of the course experience:complete
orreset
the whole course.complete
elements of a course.incomplete
elements of the course.pass
orfail
quizzes with particular grades.Once it is tested to work well, this can be migrated into a user friendly UI into regular visible settings.