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

Course Blocks API #10411

Merged
merged 7 commits into from
Nov 6, 2015
Merged

Course Blocks API #10411

merged 7 commits into from
Nov 6, 2015

Conversation

nasthagiri
Copy link
Contributor

Reviewers: @BenjiLee @jcdyer
Proctored Exam commit: @chrisndodge
FYI @aleffert

"""
Validates and returns the requested_user, while checking permissions.
"""
requested_username = cleaned_data.get('user', '')
Copy link
Contributor

Choose a reason for hiding this comment

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

If user is required, does this need the fallback string?

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably not necessary, but given the TODO note on the user field above, I'm inclined to leave it in place to make later modifications easier.


**Example requests**:

GET /api/courses/v1/blocks/?course_id=<course_id>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the same as the endpoint below.

Copy link
Contributor

Choose a reason for hiding this comment

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

The endpoint below includes all the indented lines prefixed with &, so they're not the same, unless I'm missing what you mean by "below."

Copy link
Contributor

Choose a reason for hiding this comment

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

It's the same endpoint as far as the baseurl goes, but it just includes more parameters.

@jcdyer jcdyer force-pushed the mobile/course-blocks-api branch 4 times, most recently from 456f00e to 8881c30 Compare November 3, 2015 19:19


# pylint: disable=no-member
class TestBlocksView(TestBlocksViewMixin, SharedModuleStoreTestCase): # pylint: disable=missing-docstring
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is this pylint disable still needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nerp. Removed.

@nasthagiri
Copy link
Contributor Author

@jcdyer I've completed my 1st pass. Sorry for putting some of my comments on the commit itself (especially the 1st commit). They'll get lost once we squash, but as long as we go through them beforehand, it should be fine.



@view_auth_classes()
class BlocksView(DeveloperErrorViewMixin, ListAPIView):
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Docstrings to 80 chars

@BenjiLee
Copy link
Contributor

BenjiLee commented Nov 5, 2015

Done with 1st pass.

@BenjiLee
Copy link
Contributor

BenjiLee commented Nov 5, 2015

Done with pass of fixups.

@BenjiLee BenjiLee force-pushed the mobile/course-blocks-api branch 2 times, most recently from 5ff4822 to a5be9d4 Compare November 5, 2015 21:05
@nasthagiri nasthagiri force-pushed the mobile/course-blocks-api branch 2 times, most recently from b331497 to 2f75481 Compare November 5, 2015 22:24
@nasthagiri
Copy link
Contributor Author

👍

@jcdyer
Copy link
Contributor

jcdyer commented Nov 5, 2015

jenkins run quality

1 similar comment
@jcdyer
Copy link
Contributor

jcdyer commented Nov 5, 2015

jenkins run quality

jcdyer added a commit that referenced this pull request Nov 6, 2015
@jcdyer jcdyer merged commit 222bdd9 into master Nov 6, 2015
@nasthagiri nasthagiri deleted the mobile/course-blocks-api branch November 6, 2015 00:41
@BenjiLee
Copy link
Contributor

BenjiLee commented Nov 6, 2015

👍

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.

3 participants