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

Add option for custom timestamp when publishing grades #229

Open
prayujt opened this issue Jul 19, 2024 · 1 comment
Open

Add option for custom timestamp when publishing grades #229

prayujt opened this issue Jul 19, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@prayujt
Copy link

prayujt commented Jul 19, 2024

Is your feature request related to a problem? Please describe.
When publishing a grade with ltijs's Grade.submitScore service, it sets the timestamp to be the current time by default. However, in the case of our application, grades are being published to the LMS after the assignment's due date, and so they are all showing up as late submissions in the LMS.

Describe the solution you'd like
We store submission times on our third party application, and would like those submission times to be used as the submission times on canvas. Instead of always hardcoding the submission timestamp to the current time, allow the user to optionally pass in the timestamp field in the score object. If it is not provided, it can still be defaulted to the current timestamp.

Additional context
Willing to make a PR, this is a one line fix

@prayujt prayujt added the enhancement New feature or request label Jul 19, 2024
@prayujt
Copy link
Author

prayujt commented Jul 19, 2024

https://github.com/Cvmcosta/ltijs/blob/75fb0895816d9bc036d0e930498ce9e70f7ff823/src/Provider/Services/Grade.js#L301C1-L301C57

this line should just be changed to check if a value exists in score or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants