Closed jennlove-um closed 5 years ago
Outstanding questions: Should changing preferences be done in a separate Preferences (or Settings) section of the Dashboard? Should changing preferences be done by simply persisting the student's most recent choice in the visualization?
So far I have created a DB table that looks like this and I have made the default value selection in json so that user in a course would have one record.
This is the query that does both insert/update the table as approperiate insert into user_views_default_selection values (17700000000245664, 'user5','{"assignment":50}') on duplicate key update default_types_value = json_set(default_types_value,'$.assignment',50);
Note: please ignore the grades
json property it will be actually be files as it is associated with that view.
MySQL version 5.7.22 supports JSON data types and this will allow for using the json structure. Let me know if any questions
I suggested we could just have 2 columns key/value instead of a single one holding both in a json array.
Also do you need to have course_id? I feel like the user preference system wide is enough. Would someone really want/need a different setting per course? (I don't think this was a requirement?)
I don't think there was a mention if the user needs defaults per course. The user might want a different selection per course that's what I felt should happen. But @jennlove-um what do you think should the behavior in case a user is part of 2 courses in MyLA? how are his/her selections should be chosen?
@jonespm why do you think we should have 2 columns holding different default selection instead of a JSON array?
My inclination is to allow students to set the default on a per course basis for now.
This feels like a great question to ask users. Maybe it's something that we could have the SI UX/UI course look into if MyLA gets picked up as a project for one of their student teams.
I was just thinking we could do key value instead of the JSON column
key | value |
---|---|
assignment | 5 |
grade | 60-70 |
It just might be easier and less risky when doing the update. I can see if it's just a single value that a bad update might wipe out the whole user preference record, so it's just going to need to have more checks. Either way is probably okay though if you get the JSON to work.
My feeling is that if it's "per course" it might be annoying to the user as they have to set it on every course. Maybe it won't be too bad. I'd just like to apply "KISS" and have low complexity/confusion . . . I guess we "probably" won't have too many cases for awhile of a student in multiple courses.
In Canvas I don't believe they have many per course preferences on the student side. There's no per-course notification preferences though that idea does have a lot of votes. (And is much more involved than this)
It could be annoying to have to set it for every course, but it could also be frustrating for students if they want to use different defaults for each course and can't.
We could consider allowing them either option somehow. Maybe a setting to choose whether defaults are set on a course by course basis or for all courses. But it would be helpful to get feedback from users to see if that's even something they care about.
TestPlan:
user_default_selection
table hold the values. Do a simple select
statement to see if defaults are captured eventlog_log
table as VIEW_SET_DEFAULT
. Also, test other actions from before are captured as well
data as {'course_id': '17700000000245664', 'default_type': 'files', 'default_value': '90-100'}
Testing passes. I tested the Assignment Planning and Files Accessed defaults as described in the test plan.
I was able to log in as a student, see the current default, and set a new default for both the Assignment Planning and Files Accessed views.
I verified that the defaults showed up in the user_default_selection table. I also verified that when I changed the defaults, the row was updated in the table.
I verified that setting the default was captured in the evenlog_log table. When I changed the defaults and viewed the pages, those events were captured as well.
I also tested going away from the pages and returning to verify that the selected defaults displayed each time I returned to the page. I also logged out as the user and logged back in to make sure the selected defaults still displayed.
Provide a way for students to set their defaults for the Files and Assignment views:
File page: Allow them to set the default for files accessed by students in grade group All grades, 90-100%, 80-89%, or 70-79%.
Assignment page: Allow them to set the default for the assignment weight.
The default should persist until they change their preference.