Skip to content

Commit

Permalink
fix: update legacy dev docs to build on new site
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-smith-tcril authored and sarina committed Aug 2, 2023
1 parent e3ca6d3 commit d4c5dfd
Show file tree
Hide file tree
Showing 8 changed files with 1,857 additions and 5 deletions.
2 changes: 1 addition & 1 deletion source/developers/references/legacy_guide/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ strategy will help manage the complexity of the edx-platform code base to make
it as easy as possible for developers to approach and contribute to the
project.

.. image:: ../../shared/images/edx-architecture.png
.. image:: ./images/edx-architecture.png
:width: 700
:alt: A diagram of the components and technologies that make up an edX site.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ steps.
Note the name ``your-block`` used in Studio must exactly match the key you used
to add your block to your ``setup.py`` ``entry_points`` list. (If you are still
discovering XBlocks and simply used the ``workbench-make-new.py`` script as
described in the :ref:`xblocktutorial:Open edX XBlock Tutorial`, look in the
described in the `xblocktutorial:Open edX XBlock Tutorial`, look in the
``setup.py`` file that was created.)

*********************
Expand All @@ -179,4 +179,56 @@ the list of ``ADVANCED_COMPONENT_TYPES`` in

.. _XBlock URL Dev:

.. include:: ../../../shared/dev/Section_XBlock_URL.rst
**************************************
Rendering XBlocks with the XBlock URL
**************************************

The XBlock URL supports HTML rendering of an individual XBlock without the user
interface of the LMS.

To use the XBlock URL and return the HTML rendering of an individual XBlock,
you use the following URL path for an XBlock on an edX site.

``https://{host}/xblock/{usage_id}``

========================
Finding the ``usage_id``
========================

The ``usage_id`` is the unique identifier for the problem, video, text, or
other course content component, or for sequential or vertical course container
component. There are several ways to find the ``usage_id`` for an XBlock in the
LMS, including viewing either the staff debug info or the page source. For more
information, see
`opencoursestaff:Finding the Usage ID for Course Content`.

===================
Example XBlock URLs
===================

For example, a video component in the "Creating Video for the edX Platform"
course on the edx.org site has the following URL.

``https://courses.edx.org/courses/course-v1:edX+VideoX+1T2016/courseware/ccc7c32c65d342618ac76409254ac238/1a52e689bcec4a9eb9b7da0bf16f682d/``

This video component appears as follows in the LMS.

.. image:: ../images/XBlock_URL_example_before.png
:alt: A video component presented in the context of the edX LMS, with
navigational options to reach all other course content.

To construct the XBlock URL for the same video component, you obtain its
``usage_id`` and then use the following URL format.

``https://courses.edx.org/xblock/block-v1:edX+VideoX+1T2016+type@video+block@47faf3a03c4f4023b187528c25932e0a``

When you use this URL, the video component appears in your browser as follows.

.. image:: ../images/XBlock_URL_example_after.png
:alt: A video component presented without any options for accessing other
course content.

For courses created prior to October 2014, the ``usage_id`` begins with
``i4x://``, as in the following example.

``https://courses.edx.org/xblock/i4x://edX/DemoX.1/problem/47bf6dbce8374b789e3ebdefd74db332``
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
.. include:: ../../../shared/browsers.rst
.. _Browsers:

########################
Open edX Browser Support
########################

TODO: This needs to be removed from all of the books that reference it and be updated for the Open edX community.
Loading

0 comments on commit d4c5dfd

Please sign in to comment.