Skip to content
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

When a course/term has no start/end date message should just be info and indicate which course/term #1198

Closed
jonespm opened this issue Jan 13, 2021 · 8 comments · Fixed by #1362 or #1377

Comments

@jonespm
Copy link
Member

jonespm commented Jan 13, 2021

Expected behavior (A description of what you expected to happen) :

When a course/term doesn't have a date_start or date_end a warning is currently printed from models without any details of the problematic course term. Also this message can just be INFO.

Describe the bug (Tell us what happens instead of the expected behavior) :

The messages are similar to the ones below.


[2021-01-13 08:22:06 -0500] [WARNING] [models.py:219] No date_start value was found for course or term; setting to current date and time
[2021-01-13 08:22:06 -0500] [WARNING] [models.py:226] No date_end value was found for course or term; setting to two weeks from now

Reduce these to INFO and print out the actual course or term that has a problem.

Steps to Reproduce :

  1. Add a course or term without a date_start, date_end and no term. Like a brand new course that hasn't gotten into UDW yet.
  2. You also can just add MyLA to a course that hasn't yet run the cron on it, and launch it. This error will also print for that course, and it shouldn't be a warning.
  3. Add a term that doesn't have date_start or date_end (Might be harder to test, and wasn't the problem here but it does say term in the log message)
@jennlove-um jennlove-um added this to To do in MyLA-Default-Project via automation Nov 17, 2021
@saputran
Copy link
Contributor

Hi - I hope you're doing well! I'm a student in EECS 481 and am interested in working on this issue. One quick question - are we allowed to create test courses within the "admin" page for testing (e.g. with random canvas course ids and names)?

@saputran
Copy link
Contributor

saputran commented Mar 23, 2022

@jonespm I'm trying to reproduce this error but am unable to - I created a new course in admin called "test course" with id "123" but it gave me no errors when I didn't put a start or end date. Where is this error supposed to show up/am I doing the wrong steps to reproduce?
image

@jonespm
Copy link
Member Author

jonespm commented Mar 24, 2022

Hi!

Sure you can create any sites locally.

This error looks like it occurs when you access the site normally as a user. The link on this top of this page View on Site or the course link on the main admin courses page would take you there. You'd see these errors in the logs, if you run docker logs student_dashboard or if you're running the container in the foreground.

It looks like we wanted to adjust these warnings to INFO and ideally include the course ID that was causing the problem.

canvas_id looks like it should be available in that property method.

@saputran
Copy link
Contributor

I see it now - thank you! Is there no front-end warning to the user themselves (e.g. we would only see them in the logs)? How would the user know that there is a warning?

saputran added a commit to saputran/my-learning-analytics that referenced this issue Mar 29, 2022
saputran added a commit to saputran/my-learning-analytics that referenced this issue Mar 29, 2022
@jonespm jonespm closed this as completed in 80fb9c5 Apr 1, 2022
MyLA-Default-Project automation moved this from To do to Review/QA Apr 1, 2022
@jonespm jonespm linked a pull request Apr 13, 2022 that will close this issue
@jonespm jonespm added this to To do in MyLA-2022.01.01 via automation Apr 13, 2022
@jonespm jonespm removed this from Review/QA in MyLA-Default-Project Apr 13, 2022
@jonespm jonespm moved this from To do to QA in MyLA-2022.01.01 Apr 13, 2022
@jennlove-um
Copy link
Contributor

@jonespm Is this something I can test? Or is the error only apparent in the docker logs (which I don't have access to)?

@jonespm
Copy link
Member Author

jonespm commented Apr 14, 2022

Yeah, it's only in the logs, we'll have to verify.

@jonespm jonespm moved this from QA to QA-dev in MyLA-2022.01.01 Apr 14, 2022
@jonespm
Copy link
Member Author

jonespm commented Apr 29, 2022

I do see these two messages in the logs.

It looks like the second should be "No date_end value" though.

[2022-04-29 13:32:04 -0400] [INFO] [models.py:222] No date_start value was found for course Jonespm's it's over 9001 (437407) or term; setting to current date and time
[2022-04-29 13:32:04 -0400] [INFO] [models.py:229] No date_start value was found for course Jonespm's it's over 9001 (437407) or term; setting to current date and time

@jonespm jonespm reopened this Apr 29, 2022
MyLA-2022.01.01 automation moved this from QA-dev to In progress Apr 29, 2022
@ssciolla ssciolla linked a pull request Apr 29, 2022 that will close this issue
MyLA-2022.01.01 automation moved this from In progress to Done Apr 29, 2022
@jonespm jonespm moved this from Done to QA-dev in MyLA-2022.01.01 Apr 29, 2022
@jonespm jonespm moved this from QA-dev to Done in MyLA-2022.01.01 Apr 29, 2022
@jonespm
Copy link
Member Author

jonespm commented Apr 29, 2022

Okay update the message, looks good now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3 participants