-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On assignments allow the instructor to set a day/time for it to be make visible #466
Comments
I can take on this issue! |
I'm not sure what the best way to handle this is... Right now we have a simple switch It would be nice to not have both the switch and the date, and I really don't want to have both a show date and a hide date. @barbarer @bhoffman0 What is the right flow here that will not confuse people? |
I agree that we need a show date and time and optionally a hide again date
and time.
Dr. Barbara Ericson
Associate Professor, School of Information
University of Michigan
…On Fri, Jun 7, 2024 at 1:44 PM Bradley Miller ***@***.***> wrote:
I'm not sure what the best way to handle this is...
Right now we have a simple switch
If we add a date/time then we can just check that before showing the
assignment. But what if you want to hide the assignment again, like after
an exam? Just set the visible date to something far in the future?
It would be nice to not have both the switch and the date, and I really
don't want to have both a show date and a hide date.
@barbarer <https://github.com/barbarer> @bhoffman0
<https://github.com/bhoffman0> What is the right flow here that will not
confuse people?
—
Reply to this email directly, view it on GitHub
<#466 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AKOZ7MYPT433KCTAJWPCSBLZGHWRLAVCNFSM6AAAAABCMXJLZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJVGI3DINRUGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hypothetically, wouldn't the hide date fall under the due date system? Or would we still have the same issue of having the calendar and switch in that case as well? If we want things to be automatic, the due date system would close the assignment once the specific time passes while the visibility just controls when it is seen, maybe? |
Every instructor has their own tolerance for how late to accept work. So you can't just hide the assignment on the due date or even X days after the due date. In my case I said I would accept late work until I got around to grading it. So sometimes it was days and sometimes a week or more. |
My feeling is that we eliminate the switch, replacing it on the main panel with a date/time picker for when to make the assignment visible. It should default to the current time. Then inside the "More Options" panel we add a "Hide After " date / time picker. The logic in the chooseAssignment and doAssignment endpoints will need to be updated to use the dates if they are there, but fall back on the We don't have a background task to monitor the time to make something visible or invisible we just control what can be seen in the two endpoints we have for choosing and doing an assignment. |
I see now, that makes sense. I'll have to explore the files more for the "More Options" and to better understand eliminating the switch over the weekend. In the meantime, if we get rid of the switch for the new date system, how do we keep it partially intact for old assignments? |
The visibility of an assignment is represented in the model/database by the
Again, both the |
So, where exactly do I start with that process? I think we should go with the second option if we're keeping previous assignments in mind. However, if it would be better for any future growth, it'd be best to go with the first option and just have everything updated. It's just a matter of what would benefit the platform overall and the easiest way of going about it at this point, I think. |
Well, On the UI side:
On the server side:
|
Okay! I'm sure I can do both sides with guidance/instructions! I'll work the server side first since that's what my internship centers. I've been looking through the files and have seen that multiple contain chooseAssignment and doAssignment, which specific one do I need to update and how? Forgive me for asking so many questions, this is my first time working on the backend and being a student developer! |
What you should be looking at is in the student.py file under Anything under |
Hi, is it okay if we follow up on my previous question since you were absent yesterday? I'm still not quite sure how to update the logic. At first, I had changed the is_visible to visible_on but, I wasn't sure if that was correct and put it back. I was wondering if I needed to on create a new object visible_on using utcnow like the timestamp does. |
Its more than that, the visible_on value needs to be persistent, which means it needs to be stored in the database. So you are going to have to change the model to have a new column to keep track of the visible_on value for each assignment. Then I think you should probably write a function that takes all the assignment data and returns true if the assignment should be visible and false if not. It may help to follow the code down a couple of levels to help you understand what is going on. It may also help you to go through the tutorial here: https://runestone-monorepo.readthedocs.io/en/latest/tutorial.html |
Okay, thank you so much! |
This is how we construct a query dynamically. We want to select assignments for our course. Sometimes we want ALL the assignments and sometimes only the visible assignments. We only want the rows from the table where all three of the clauses in the |
Thank you for that! So I wanted to know if I'm going down the right path logically. Crud.py uses models.py, student.py and instructor.py use crud.py, correct? If I change the models .visible from boolean to datetime like duedate, how would that affect that dynamic query? I feel like there could be a way to still use that boolean and hook the date system up to it, if that makes sense? Like, would it be possible to still use that dynamic query you have set up but somehow change that if statement to fit a schedule? I hade originally planned it (in crud.py) this way before asking for help from you: line 1260 - vis_date=datetime.datetime.utcnow(), line 1273 - if curr_date >= vis_date and curr_date < hid_date: I was going off your previous messages here that said to follow this sort of logic in student.py but, if I keep the boolean, is there a way to use that with vclause/dynamic query? |
The The status of an assignment will be in exactly one of the following states:
All of these states can be inferred by using the current time and comparing that against the |
Okay, I'll work towards that, thank you! |
So, if the vis_date and hid_date shouldn't be set utcnow, can I still keep the datetime.datetime so they're still time objects to be used for comparison? I saw other ones that did this but, their times were preset like (2020, 1, 1, 0, 0, 0). I'm also not sure how to do those conditionals, would they something like this?: line 1273 - if is_visible: So, it compares the dates and has the flags if needed. I looked at the fetch_questions_by_search_criteria like you told me. I saw a parameter that holds the conditions. Criteria, then it's ".author", ".base_course", etc, would I need to set up some variables in a separate file (models maybe?) for this? |
No, you actually want to make clauses to check whether the current_date is > vis_date I think it would be worth your while to learn a little about sqlalchemy and how we use that to make database queries. Also, I would be much easier for me to see what you are doing if you just past the code using the triple backticks (check out github flavored markdown) You can also make a draft pull request so that I can see your actual code. |
Ah, sorry about the formatting. I'll fix it in the future, these were just plans that I did on stickynotes. However, could you look at the changes I made in assignSlice.js and assignment.jsx with a draft pull request? That's what I said did successfully yesterday but, I want to make sure it is up to your standards. I'll comment them properly if you approve of them afterward of course. |
Hello Dr. Brad @bnmnetp
However, when I restart the servers, I get an error saying that Assinment.visible does not exist. Should I update every function that uses |
Right now I have to go into the instructor page and make my assignments for lecture visible just before or during lecture. It would be nice to have them automatically become visible at set day/time.
The text was updated successfully, but these errors were encountered: