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

Fixed progress page update on save ccx and grade book crash issue #13019

Merged
merged 2 commits into from
Jul 29, 2016

Conversation

amir-qayyum-khan
Copy link
Contributor

@amir-qayyum-khan amir-qayyum-khan commented Jul 18, 2016

Background

fixes mitocw#252 https://openedx.atlassian.net/browse/TNL-4892

What is done in this PR

Studio Updates: None.
LMS Updates:

  • Add signal on save_ccx api, So that other application can be up to date when ccx contents change,

@pdpinch @giocalitri

To test:

  • Create a coach
  • create a student
  • Login to edX platform as coach, open coach dashboard. change schedule of subsection aka sequential and press save.
    screen shot 2016-07-14 at 7 32 14 pm
    screen shot 2016-07-14 at 7 32 23 pm
  • Login as student (CCX enrolled student). Go to dashboard then open ccx course and go to progress and see the due date of that subsection(problem).
    screen shot 2016-07-14 at 7 34 41 pm
    screen shot 2016-07-14 at 7 34 52 pm
    screen shot 2016-07-14 at 7 37 25 pm

@openedx-webhooks
Copy link

Thanks for the pull request, @amir-qayyum-khan! I've created OSPR-1346 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams.

Feel free to add as much of the following information to the ticket:

  • supporting documentation
  • edx-code email threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here.

@@ -131,6 +134,16 @@ def setup_students_and_grades(context):
)


def unhide(unit):
"""
Recursively unhide a unit and all of its children in the CCX
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this was a pre-existing function, but why recursion? A simple loop would do! :)

@nedbat
Copy link
Contributor

nedbat commented Jul 20, 2016

@cahrens @doctoryes CCX stuff often goes to platform, but this seems to affect touch UI, I wonder if TNL should take it?

@cahrens
Copy link

cahrens commented Jul 20, 2016

I can take it-- I've reviewed #11647.

@cahrens
Copy link

cahrens commented Jul 20, 2016

Though note that there are only Python files in this PR... So if @doctoryes WANTS to take the PR, I'm fine with that.

@cahrens
Copy link

cahrens commented Jul 20, 2016

And furthermore, @nasthagiri may wish to review since she opened the bug initially.

@doctoryes
Copy link
Contributor

@cahrens I will review it.

@cahrens
Copy link

cahrens commented Jul 25, 2016

Great!

@amir-qayyum-khan amir-qayyum-khan force-pushed the fix/aq/emit_course_published_event branch from bcdf670 to 71b0174 Compare July 26, 2016 14:45
@doctoryes
Copy link
Contributor

LGTM. One question:
Are there other places that need to send the course_published signal? For example, there's a create_ccx view - why does it and potentially other create/update operations not need to send this signal for other parts of the system to consume?

@pdpinch
Copy link
Contributor

pdpinch commented Jul 26, 2016

That's a good question.

@amir-qayyum-khan can you confirm that adding this signal to save_ccx catches all potential changes, i.e., changes to the schedule or the grading policy?

The CCX isn't very interested at the point of create_ccx, but it seems like we should add the signal there as well for completeness.

I can't think of any other places whether the coach can modify the ccx overrides.

@amir-qayyum-khan
Copy link
Contributor Author

yes i verified changes for schedule save but need to double check policy
because there is another api in ccx app to save grading policy.

No need to add signal on ccx create api, because when ccx create after
that we enroll students and they see all updates in ccx.

On Jul 26, 2016 9:12 PM, "Peter Pinch" [email protected] wrote:

That's a good question.

@amir-qayyum-khan https://github.com/amir-qayyum-khan can you confirm
that adding this signal to save_ccx catches all potential changes, i.e.,
changes to the schedule or the grading policy?

The CCX isn't very interested at the point of create_ccx, but it seems
like we should add the signal there as well for completeness.

I can't think of any other places whether the coach can modify the ccx
overrides.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/edx/edx-platform/pull/13019#issuecomment-235319405,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJ8rEhNmJv6ztg5IyHl5vPunEu5O1cCpks5qZjHRgaJpZM4JO0Se
.

@openedx-webhooks openedx-webhooks added engineering review waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed awaiting prioritization engineering review labels Jul 26, 2016
@amir-qayyum-khan amir-qayyum-khan force-pushed the fix/aq/emit_course_published_event branch 4 times, most recently from 13ca30a to 5a32672 Compare July 29, 2016 13:00
@amir-qayyum-khan amir-qayyum-khan force-pushed the fix/aq/emit_course_published_event branch from 5a32672 to d5fcb60 Compare July 29, 2016 13:12
@amir-qayyum-khan
Copy link
Contributor Author

amir-qayyum-khan commented Jul 29, 2016

@doctoryes made some changes, i am sorry I squashed commits. here are the changes listed below:

  1. Added signal in all paths where ccx course is change including rest api
  2. fixed issue related to gradebook and csv files. Made ccx id unicode to fix grade book crash issue when getting course_structure = get_course_blocks(student, course.location)
  3. add test case

cc @pdpinch

@amir-qayyum-khan amir-qayyum-khan changed the title Fixed progress page update on save ccx Fixed progress page update on save ccx and grade book crash issue Jul 29, 2016
@amir-qayyum-khan
Copy link
Contributor Author

jenkins run bokchoy

)
for rec, response in responses:
log.info('Signal fired when course is published. Receiver: %s. Response: %s', rec, response)

url = reverse(
'ccx_coach_dashboard',
kwargs={'course_id': CCXLocator.from_course_locator(course.id, ccx.id)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Why does the signal line above need a unicode(ccx.id) but this course_id construction does not?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it should be, but CCXLocator with non unicode also works, it only give issues when we compare same CCXLocator one with ccx.id unicode and one with not.

let me fix through out views

@doctoryes
Copy link
Contributor

While this change seems good enough to merge (after tests pass), I'd like to see some follow-on work:

  • Check all instances of this construction to determine whether ccx.id needs to be wrapped in unicode():
  • Determine whether tests already exist for checking the correct number of signals are emitted when performing the operations for which course_published signals were added.
    • No tests were added which confirm that the added signals are sent at all for some operations and the correct number of signals are sent.

@pdpinch Thoughts?

P.S. Ah - I see @amir-qayyum-khan has already submitted a commit partially addressing my first point (while I was typing this list).

@amir-qayyum-khan amir-qayyum-khan force-pushed the fix/aq/emit_course_published_event branch from a4d3e7d to 34034aa Compare July 29, 2016 14:38
@amir-qayyum-khan
Copy link
Contributor Author

jenkins run bokchoy

@amir-qayyum-khan
Copy link
Contributor Author

@doctoryes all test are complete, can u give thumbs up on this?

@doctoryes
Copy link
Contributor

👍

@doctoryes doctoryes merged commit 70929ff into openedx:master Jul 29, 2016
@pdpinch pdpinch deleted the fix/aq/emit_course_published_event branch August 5, 2016 12:42
@amir-qayyum-khan
Copy link
Contributor Author

@doctoryes done with verification on stage.

@doctoryes
Copy link
Contributor

@amir-qayyum-khan Thanks! I'll mark testing as complete on the release page.

@amir-qayyum-khan
Copy link
Contributor Author

thank you @doctoryes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

On saving a CCX, emit a course_published event
6 participants