Skip to content

Commit

Permalink
Merge pull request #218 from CodeWithEmad/chore/cleanup
Browse files Browse the repository at this point in the history
chore: cleanup
  • Loading branch information
feanil authored Dec 10, 2024
2 parents 2de2c61 + f52b153 commit 5905105
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 28 deletions.
78 changes: 53 additions & 25 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
In Video Quiz XBlock
====================

This XBlock allows for edX components to be displayed to users inside of videos at specific time points.

License
-------

This software was forked from https://github.com/Stanford-Online/xblock-in-video-quiz

All contribution made to those repositories, the last of which is tagged
`final-bsd-3c-contribution`_, are licensed by the original contributors under
the terms of the `BSD 3-Clause License`_.

This software is now maintained for the purpose of the Open edX Project, which
licenses any further contributions to this repository under `the AGPLv3 license`_.

.. _final-bsd-3c-contribution: https://github.com/openedx/xblock-in-video-quiz/releases/tag/final-bsd-3c-contribution
.. _BSD 3-Clause License: ./LICENSE-BSD-3c
.. _the APGLv3 license: ./LICENSE

This XBlock allows for Open edX components to be displayed to users inside of videos at specific time points.

Overview
--------

This XBlock expects to have a Video component and a Problem component
This XBlock expects to have a **Video component** and a **Problem component**
added to the same Unit as itself.

The XBlock is then configured (see below) to map timestamps (in seconds)
Expand All @@ -43,13 +26,42 @@ Multiple timestamps can be configured per video.
Installation
------------

Tutor
*****

To add the In Video Quiz XBlock package to Tutor, follow these steps:

1. Add the package to the ``OPENEDX_EXTRA_PIP_REQUIREMENTS`` using the following command:

.. code:: bash
tutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS="git+https://github.com/openedx/xblock-in-video-quiz@LATEST_RELEASE"
5. Rebuild the Open edX image to include the new package:

.. code:: bash
tutor images build openedx
6. Start or restart the Open edX platform:

.. code:: bash
tutor local start -d
The In Video Quiz XBlock should now be installed and available for use in your Open edX instance.

Other
*****

Install the requirements into the python virtual environment of your
``edx-platform`` installation by running the following command from the
root folder:

.. code:: bash
$ make requirements
make requirements
Enabling in Studio
------------------
Expand All @@ -58,10 +70,15 @@ You can enable the In Video Quiz XBlock in Studio through the
advanced settings.

1. From the main page of a specific course, navigate to
``Settings -> Advanced Settings`` from the top menu.
2. Check for the ``advanced_modules`` policy key, and add
``"invideoquiz"`` to the policy value list.
3. Click the "Save changes" button.
``Settings -> Advanced Settings`` from the top menu.
2. Add the ``"invideoquiz"`` to your ``Advanced module list``.
3. Click the "**Save changes**" button.

.. image:: ./images/advanced-settings.png
:alt: Advanced Settings
:width: 500px
:align: center


Configuration in Studio
-----------------------
Expand Down Expand Up @@ -120,4 +137,15 @@ configuration.
License
-------

The In Video Quiz XBlock is available under the AGPL Version 3.0 License.
This software was forked from https://github.com/Stanford-Online/xblock-in-video-quiz

All contribution made to those repositories, the last of which is tagged
`final-bsd-3c-contribution`_, are licensed by the original contributors under
the terms of the `BSD 3-Clause License`_.

This software is now maintained for the purpose of the Open edX Project, which
licenses any further contributions to this repository under `the AGPLv3 license`_.

.. _final-bsd-3c-contribution: https://github.com/openedx/xblock-in-video-quiz/releases/tag/final-bsd-3c-contribution
.. _BSD 3-Clause License: ./LICENSE-BSD-3c
.. _the AGPLv3 license: ./LICENSE
2 changes: 1 addition & 1 deletion catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ metadata:
annotations:
github.com/project-slug: openedx/xblock-in-video-quiz
spec:
type: xblock
type: xblock
lifecycle: unmaintained
owner: axim-engineering
Binary file added images/advanced-settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion invideoquiz/public/js/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ var InVideoQuizXBlock = InVideoQuizXBlock || {{}};

var videoId = '{video_id}';
// This is (temporary) error handling for previous-submitted invalid timemap.
try {{
try {{
if (videoId) {{
InVideoQuizXBlock.config[videoId] = JSON.parse(`{timemap}`);
}}
Expand Down
2 changes: 1 addition & 1 deletion invideoquiz/public/js/src/invideoquiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function InVideoQuizXBlock(runtime, element) {
}
});
}

function resizeInVideoProblem(currentProblem, dimensions) {
currentProblem.css(dimensions);
}
Expand Down

0 comments on commit 5905105

Please sign in to comment.