-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Stanford paid course registration #1118
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
Conversation
|
To give a bit of background context, we are going to be running this for Stanford Med School's Continuing Medical Education (CME) program. The students must pay in order to enroll in courses and access content. To set the prices, we'll just create "honor" CourseModes with minimum prices, and use that to create PaidCourseRegistration cart item. |
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 might be the best place to start review? Basically the course_about page will have an "add-to-cart" button instead of a register button.
|
@jbau, thanks for the ping on this. I've chimed in on your front-end code, but would also love to see a local instance of this. Can you list out some simple steps to turn on the features needed and progress through the flows (in order to see all of the views you worked on)? Thanks for the help and nice job getting this up and running. |
lms/djangoapps/courseware/views.py
Outdated
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 know that this isn't part of this pull request, but I think part_of_order is a confusing name. contained_in_order? order_contains?
lms/envs/test.py
Outdated
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 also set further up in test.py, pls remove one reference.
Also it's set twice in dev.py, can you pls remove one from there too.
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.
Duh on me. Thanks for noting.
On Sep 25, 2013, at 11:34 AM, Jay Zoldak notifications@github.com wrote:
In lms/envs/test.py:
@@ -165,7 +165,7 @@
###################### Payment ##############################3Enable fake payment processing page
MITX_FEATURES['ENABLE_PAYMENT_FAKE'] = True
+MITX_FEATURES['ENABLE_SHOPPING_CART'] = True
This is also set further up in test.py, pls remove one reference.—
Reply to this email directly or view it on GitHub.
|
@dianakhuang @talbs |
|
@jbau and @caesar2164, thanks for the discussion and extra revisions. After previewing the UI you're adding for your needs locally, I noticed there were some visual inconsistencies (button styles for the newly added cart button, add to cart/added in cart buttons on course detail view) and more details (typography, alignment, information hierarchy) could be polished on the receipt page itself. These shouldn't stop this PR, as you folks are trying to get a first pass out and the single group using these now - so your design standards and timetable are most important to meet. In the event that we on the east coast get involved with them in the future, I'd want to work further on some of those details. I hope you're okay with that. 👍 |
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 didn't catch this before, but I'm not sure it makes sense to push this through the views. Would it be possible to do the same sort of error handling in the models? Fat models, skinny views, etc.
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'm not quite sure I understand the point you're objecting to here. This particular line of code is calling another view (in shoppingcart).
Do you mean that it should be calling a model function instead?
I have it calling the shopping cart view for code reuse (otherwise it'd have to have all the cases of shoppingcart.views.add_course_to_cart). Also note that in the student app views functions wrap other views all the time (including this function getting called by try_change_enrollment).
Or do you mean that all the clauses in shoppingcart.views.add_course_to_cart should themselves be in the model? In that case I don't think the model function should be returning HttpResponse and its relatives, which doesn't seem like right layer to me.
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.
Or do you mean that the model function PaidCourseRegistration.add_to_order should be raising various subtypes of InvalidCartItem, and shoppingcart.views.add_course_to_cart should be handling those by translating them to HttpResponse codes? I think I'm most amenable to that, though it then doesn't change anything about this particular call.
|
I think other than that one comment, I'm good with this. I'd really like @chrisndodge to give the thumbs up as well, since he has an eye on maybe using it for our own purposes in the future. |
|
@dianakhuang thanks for the consideration. My interests are mainly in terms as to the applicability of this feature to other projects. I've been chatting with Jason and others out-of-band, but I'm fine with the current implementation and it's something we might want to build upon. |
|
Thanks for your review, @talbs. We would absolutely welcome your further involvement. Jason On Sep 26, 2013, at 5:41 AM, Brian Talbot notifications@github.com wrote:
|
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.
The brackets are unnecessary.
|
Other than the above comments, I'm good with this. Thank you. |
With tests, some settings changes (all should default to not breaking anything for edx) Added styling for shopping cart User Experience - Styled shoppingcart list page - Styled navigation shopping cart button - Styled receipt page - Styled course about page for shopping cart courses Addressed HTML/SCSS issues Remove offending body class and unnecessary sass changes Addresses many review comments on stanford shopping cart * framework for generating order instructions on receipt page in shoppingcart.models * move user_cart_has_item into shoppingcart.models * move min_course_price_for_currency into course_modes.models * remove auto activation on purchase * 2-space indents in templates * etc revert indentation on navigation.html for ease of review pep8 pylint move logging/error handling from shoppingcart view to model Addressing @dave changes
|
tests are passing. going to merge this PR. Thanks everyone for the reviews. Any further comments can be address in follow on work. |
Stanford paid course registration
|
ADD DEMOX TO CART ($10) - in course about page but PRICE PER STUDENT: $0.00 in shoppingcart It is one bug? |
|
@miguelurtado this is the original PR for the shoppingcart. A lot has changed since then. I'd recommend that you post to the edx-code mailing list, and perhaps we can help you over there rather than on a closed PR. Thanks. |
…mckin-7806-clean-image.png-2 Bump verison of projects-edx-platform-extensions
We are planning on deprecating this method, and this piece of code has been commented out for a while anyway.
With tests, some settings changes
(all should default to not breaking anything for edx)
Added styling for shopping cart User Experience
@dianakhuang and @talbs for the styling/small bit of front-end.
rake coverage at 100%, rake quality at 100%