Skip to content

Reset state fix - #11422

Merged
efischer19 merged 1 commit into
masterfrom
efischer/reset_state_fix
Feb 18, 2016
Merged

Reset state fix#11422
efischer19 merged 1 commit into
masterfrom
efischer/reset_state_fix

Conversation

@efischer19

Copy link
Copy Markdown
Contributor

The fix here will be resolved by a change to the submissions API,
and this code will need to call the new method.

TNL-3880
Sibling changes:

Comment thread requirements/edx/github.txt Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch label is just for sandbox testing; I'll update it with a properly-released new edx-submissions version before merging to master.

@efischer19
efischer19 force-pushed the efischer/reset_state_fix branch 2 times, most recently from bc138d5 to 02e4263 Compare February 5, 2016 20:43

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since platform no longer calls into submissions directly, this test no longer belongs here. I'll add it to edx-ora2 as part of the sibling change,

@efischer19
efischer19 force-pushed the efischer/reset_state_fix branch from fbaf324 to 74adfb4 Compare February 8, 2016 20:35
anonymous_id_for_user(student, course_id),
course_id.to_deprecated_string(),
module_state_key.to_deprecated_string(),
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ORA2 is not the only thing that uses submissions, though the number of third party blocks that do is limited. Submissions was meant to be an API usable by other XBlocks, for storing more easily audited submission and scoring information, especially across users.

@efischer19
efischer19 force-pushed the efischer/reset_state_fix branch 3 times, most recently from d01212b to 695c383 Compare February 10, 2016 14:39
@efischer19

Copy link
Copy Markdown
Contributor Author

jenkins run bokchoy

@efischer19

Copy link
Copy Markdown
Contributor Author

jenkins run python

Comment thread requirements/edx/github.txt Outdated
-e git+https://github.com/edx/edx-ora2.git@0.2.7#egg=ora2==0.2.7
-e git+https://github.com/edx/edx-submissions.git@0.1.3#egg=edx-submissions==0.1.3
-e git+https://github.com/edx/edx-ora2.git@efischer/clear_submission#egg=ora2
-e git+https://github.com/edx/edx-submissions.git@efischer/soft_delete_sub#egg=edx-submissions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These will be updated to proper release versions before merging this PR, this was just to get my sandbox set up.

@efischer19

Copy link
Copy Markdown
Contributor Author

This PR is ready for review. @cahrens and @dianakhuang, could you look it over when you get a chance?

I've run this LMS->xblock communication approach by the Arch Council, they are on board with using it here but have some further discussion regarding documentation that don't need to block this.

The sibling change for ORA is also ready for review, but the edx-submissions one is still undergoing devops vetting. Regardless of what we do there, the API connection point to ORA will remain the same.

The behavior can be tested at https://efischer19.sandbox.edx.org/

Comment thread lms/djangoapps/instructor/enrollment.py Outdated
if callable(clear_submission):
clear_submission(
user_id=user_id,
course_id=course_id.to_deprecated_string(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use to_deprecated_string. You should be able to do unicode(course_id).

Same thing below.

@efischer19

Copy link
Copy Markdown
Contributor Author

@robrap and @dianakhuang This final piece of the puzzle is also ready to be reviewed at your convenience. I'm working to get all 3 in-flight PRs onto my sandbox for testing.

@efischer19

Copy link
Copy Markdown
Contributor Author

https://efischer19.sandbox.edx.org/ is updated with the latest version of this PR and the code specified in the branches listed in github.txt.

Comment thread lms/djangoapps/instructor/enrollment.py Outdated
pass
# Some blocks (openassessment) use StudentModule data as a key for internal submission data.
# Inform these blocks of the reset and allow them to handle their data.
clear_submission = getattr(block, "clear_submission", None)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, change this to "clear_student_state".

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this needs to be wrapped with an if delete_module:.

@efischer19
efischer19 force-pushed the efischer/reset_state_fix branch 2 times, most recently from a6ae0d1 to 23b7b1b Compare February 17, 2016 14:34
@efischer19

Copy link
Copy Markdown
Contributor Author

@robrap I've addressed your comments and squashed, would you mind re-reviewing?

Comment thread lms/djangoapps/instructor/enrollment.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to something like:

# TODO: Remove this once we've finalized and communicated how xblocks should handle clear_student_state
# and made sure that other xblocks relying on the submission api understand this is going away.

@robrap

robrap commented Feb 17, 2016

Copy link
Copy Markdown
Contributor

@efischer19 Can you make the one comment change as part of your squash? I don't need to review again.

👍 once this is done. Thanks!

@efischer19
efischer19 force-pushed the efischer/reset_state_fix branch from 23b7b1b to 9a9acb5 Compare February 17, 2016 15:55
@efischer19

Copy link
Copy Markdown
Contributor Author

Thanks for the suggestion @robrap, I've added that TODO as a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants