Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Address feedback

...

However, for options 1-3, the new capabilities need to be added to hard-coded lists in the platform. For example, there is a list of URLs, a list of tab types, a list of reports, a list of instructor dashboard components etc. This seems simple to update, but it means that the platform has to be changed to receive each new feature.

...

 

 

Use Cases

Here is a quick summary of how four recent features were implemented. For more details, see the Appendix: Recent Feature Audit.

...

  • There is no way to extend the platform SASS, so instead independent SASS was written which is included in addition. This won't play well with theming.
  • XBlocks do not support RequireJS 
    • This made it hard to ensure that the block has the dependencies it needs
    • It also required that a custom mechanism be used to modularize the code into smaller files 
  • Studio authoring view is not truly integrated for xblocks
    • ORA 2 had to fake out the Save and Cancel buttons as Studio can only save changes to xmodules today
  • The only option for admin views is through the Studio authoring view or through staff-level features added to the courseware block
    • It is painful to have to navigate to the component to be able to administer it. It would be preferable to have ORA 2 admin views in Studio and in the Instructor DashboardAdding admin views inside an xblock is powerful but constrained by the space provided
      • It could be better to have links from the xblock to a full-page admin view (maybe as a tab on the instructor dashboard)
    • It would be useful to add ORA 2 reports to the "Data Downloads" tab
  • There was no easy way to write integration tests that get run with the platform release
    • Separate sandbox was provisioned for automated tests but it stopped working and has been disabled

...

  • New configuration settings were added to lms/envs/common.py
  • New course settings were added to InheritanceMixin in common/lib/xmodule/xmodule/modulestore/inheritance.py
  • The core HTML component was updated to render notes inline
  • The AnnotatorJS library was added as a vendor library to common/static/js/vendor
  • A new LMS "Notes" tab was added to common/lib/xmodule/xmodule/tabs.py
    • The URL for the new tab was added to lms/urls.py
    • Mako templates for the new tab were added to lms/templates
    • CSS for the new tab was added to lms/static/sass
    • The JavaScript Backbone views were added to lms/static/js
  • Tests were written for all the new UI
    • Jasmine tests were added to lms/static/js/spec
    • Jasmine HTML fixtures were added to lms/static/js/fixtures
    • Bok Choy tests were added to common/tests/acceptance

Plug-in Architecture

...

5. Student Data Tab

Here is an upcoming use case from Braden MacDonald:

We have a custom XBlock used throughout certain Harvard courses, and their instructors want to export all the student data associated with those XBlocks (stored in edx-submissions). So we want to be able to add an instructor-only tab to the course in the LMS, where we can put a new UI for instructors to generate .CSV exports of that data.

Plug-in Architecture

There are a number of changes that are needed to support the ability for a new feature to be implemented purely within its own Django app:

  • Stevedore extension points should be provided for each of the common UX changes that need to be made
    • Note: see the Audit below for a comprehensive listAn initial list would includeAudit below for a comprehensive list
    • The first such extension point has been provided by PR 8015
      • This allows any Django app to provide new views for a course
      • These views are shown as tabs in the current web client
    • Some important first extension points are as follows:
      • "Feature flag"
        • Note: this will be a ConfigurationModel derivative (which includes a built-in enabled column)
        • We recommend this over using a Django settings feature flag
        • It would be useful to allow all associated extensions to obey the feature flag automatically
      • URLs for new UI and REST APIsLMS tabs (although the concept should be more general as mobile won't render these items as tabs)
      • Instructor Dashboard components/tabs
  • XBlocks should be extended to provide more capabilities
    • Course-scoped fields for configuration settings
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-1804
    • Studio editing tabs for xblocks
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-850
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-851
    • Admin views for both Studio and LMS
    • Need built-in support for RequireJS or AMD compliant dependency management
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyPLAT-481
  • The Django asset pipeline needs to be improved
    • Have the pipeline pick up assets from all installed Django apps (to support CDNs, minification etc)
    • RequireJS Optimizer support should be added to the LMS
      • Jira Legacy
        serverJIRA (openedx.atlassian.net)
        serverId13fd1930-5608-3aac-a5dd-21b934d3a4b4
        keyTNL-1322
      • See also RequireJS in the LMS
  • There are some interesting aspects of supporting arbitrary plug-ins
    • An order must be established for visual aspects such as tabs. Today the order is implicit in the hard-coded list.
      • If in doubt, sort the items alphabetically by name
    • How can plug-ins adopt the correct look-and-feel?An initial thought is that we could view plug-ins render the correct page
      • For example, how does a new tab render the correct header and footer for itself?
      • The simplest solution is to document the boilerplate that each plug-in type should is required to include
      • Miki suggests that maybe we should use inheritance to our benefit here, where the superclass renders the boilerplate
      • Eventually we might want to use a mechanism more like XBlock that can be rendered inlineso that a plug-in only owns a block and not the entire page
        • A possible challenge with this is that it is subverting the Django framework
    • It needs to be decided how mobile can benefit from these plug-ins
      • If they provide new UI as URLs then they won't just drop in to mobile
      • XBlocks will just appear, but only by using a web view to render the HTML
      • React, a JavaScript library from Facebook, might help with native rendering of HTML

...