Skip to content

Add extensible course view types for edX platform#8015

Merged
dianakhuang merged 2 commits intomasterfrom
andya/add-tab-extensions
Jun 2, 2015
Merged

Add extensible course view types for edX platform#8015
dianakhuang merged 2 commits intomasterfrom
andya/add-tab-extensions

Conversation

@andy-armstrong
Copy link
Contributor

This is the first step to supporting pluggable features in the edX platform. A new Stevedore "course_view_type" extension point is added, that allows any Django app to register a new view for the course. Currently, each course view is shown as a tab in the course, but a client is free to choose whether these are shown as tabs. In particular, on mobile there UX may not be represented as tabs.

To prove out this change, the following tabs have been converted to course views:

  • the "Notes" tab provided by Student Notes
  • the "CCX" tab for CCX administration
  • the "Instructor" tab that shows the dashboard

See this wiki page for the background:

https://openedx.atlassian.net/wiki/display/AC/Feature+Plug-Ins+for+edX+Platform

@andy-armstrong andy-armstrong force-pushed the andya/add-tab-extensions branch 2 times, most recently from 4194ec0 to c8d3767 Compare May 13, 2015 13:57
@andy-armstrong
Copy link
Contributor Author

Note: this work has been separated out from https://github.com/edx/edx-platform/pull/7937 where it was originally implemented.

@andy-armstrong andy-armstrong mentioned this pull request May 13, 2015
@andy-armstrong
Copy link
Contributor Author

@cahrens @cpennington please review this newly separated out PR to provide extensible tabs.

FYI: @antoviaque @bradenmacdonald @ormsbee @dan-f @dianakhuang

@andy-armstrong
Copy link
Contributor Author

@nasthagiri We should chat sometime soon about how this extension point (and future ones) can play nicely with mobile.

@andy-armstrong andy-armstrong force-pushed the andya/add-tab-extensions branch from c8d3767 to b76b138 Compare May 13, 2015 15:04
@andy-armstrong
Copy link
Contributor Author

FYI, the build failure is now down to quality issues. I plan on addressing these later today.

@andy-armstrong andy-armstrong force-pushed the andya/add-tab-extensions branch 3 times, most recently from f9eece7 to 92b1f42 Compare May 13, 2015 22:36
Copy link
Contributor

Choose a reason for hiding this comment

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

We already talked about this, but at least for this feature, it doesn't seem necessary to have a separate class for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As we discussed, it seems simpler to have the plugin's define their own name field, rather than have this complicated logic to wrap each plugin. Unfortunately there's an instanceof check that I need to remove, but that should be fine.

@andy-armstrong
Copy link
Contributor Author

@dianakhuang @cpennington I've generalized the logic for how Studio dynamically adds tabs when features are enabled. This should now work for the "Teams" tab which needs to enable itself based upon something other than the existence of a boolean feature flag.

edx@cbe5e18

@dianakhuang
Copy link
Contributor

test this please

Copy link
Contributor

Choose a reason for hiding this comment

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

What API does a Feature have to implement?

Copy link
Contributor

Choose a reason for hiding this comment

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

I imagine that Feature is going to get fleshed out a bit more later when we start implementing teams using it. I can take it out of this PR if it's too distracting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was my mistake. I intended to remove it when I implemented tabs as a first-class extension point. @dianakhuang please go ahead and take it out.

@dianakhuang
Copy link
Contributor

After doing a quick spot-check on devstack, the Instructor tab is not showing up in the LMS. I'm going to investigate.

@dianakhuang
Copy link
Contributor

Huh, maybe I didn't reinstall/run setup.py or something like that, but it seems to be working fine right now.

@dianakhuang dianakhuang force-pushed the andya/add-tab-extensions branch from f31ebca to be4dbc9 Compare May 15, 2015 18:49
Copy link
Contributor

Choose a reason for hiding this comment

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

{p['type]': p for p in [OPEN_ENDED_PANEL, NOTES_PANEL]}

@cpennington
Copy link
Contributor

Done w/ my review pass.

@dianakhuang
Copy link
Contributor

Thanks @cpennington ! I'll get on fixing these.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: it looks like there's a lot of duplicated code in PUT vs POST. Is it worth abstracting, perhaps by using a class-based view?

@cpennington
Copy link
Contributor

Done with this review pass.

@dianakhuang dianakhuang force-pushed the andya/add-tab-extensions branch 2 times, most recently from 8438288 to 4ec6ecd Compare June 2, 2015 15:25
@dianakhuang
Copy link
Contributor

FYI @cpennington I had a commit specifically for addressing your feedback, if you wanted to review that before giving us a thumbs up on this PR.

@cpennington
Copy link
Contributor

👍

@dianakhuang dianakhuang force-pushed the andya/add-tab-extensions branch from 4ec6ecd to 77e560a Compare June 2, 2015 17:14
@dianakhuang dianakhuang force-pushed the andya/add-tab-extensions branch from 77e560a to dae137f Compare June 2, 2015 19:05
@dianakhuang
Copy link
Contributor

The one failing test is flaky. On rerun, it passed: https://build.testeng.edx.org/job/edx-platform-specific-tests/84/

dianakhuang added a commit that referenced this pull request Jun 2, 2015
Add extensible course view types for edX platform
@dianakhuang dianakhuang merged commit 15291aa into master Jun 2, 2015
@andy-armstrong andy-armstrong deleted the andya/add-tab-extensions branch June 4, 2015 17:10
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

Comments