Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
[BD-24] [TNL-7661] [BB-3172] LTI Improvements - Use declarative grading model on XBlock launch #116
[BD-24] [TNL-7661] [BB-3172] LTI Improvements - Use declarative grading model on XBlock launch #116
Changes from all commits
b6bff61
0f51530
89a0a17
dbe4dd8
0ede3f3
4a3175b
f414206
2616d43
74772e1
45c8ad2
e93a29f
30e3286
978e7f8
476d2d3
bdc3f53
404091a
1530cad
b54c193
09c1e0a
6538c36
a9edcdb
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing a few parameters. Check https://github.com/edx/xblock-lti-consumer/blob/master/docs/decisions/0003-lti-1p3-score-linking.rst#declarative-grade-handling for details on all attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added
lti_configuration
,resource_id
,label
,score_maximum
(weight
). I didn't find others in attributes. Let me know if I've missed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's
start_date_time
andend_date_time
which might be available on some cases.You can check if the problem is past due by looking at https://github.com/edx/xblock-lti-consumer/blob/bcdcf218096d63b88a8d8c56e027c0910814c381/lti_consumer/lti_xblock.py#L828
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shimulch
resource_link_id
is missing and should be set to the problem's location.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giovannicimolin I've put
resource_link_id
as same asself.block.location
. Also checked ifstart
anddue
is set. If set then saved asstart_date_time
andend_date_time
accordingly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not working for me, I'm getting a 500 error when doing the request:
Loading the block here (on signals.py) is erroring out for me. Can you check what's causing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giovannicimolin, It seems to be causing from
django-crum
module. As per documentation here it returnsuser=None
when not in request scope. I couldn't figure out why xblock signal is outside the request scope, when some other places seems to be working fine like here.Anyhow, I fixed the issue by impersonating as
AnonymousUser
here. But I'm not sure if this is the right way to do it. Adding this to Author's concern section.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This solution works and given it is present in the official documentation, I don't see a reason not to use it.