Skip to content

Commit

Permalink
feat: allowing customization of notes repo and version
Browse files Browse the repository at this point in the history
  • Loading branch information
jfavellar90 authored Feb 28, 2023
1 parent c1360c4 commit 527c3e9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Students notes plugin for `Tutor <https://docs.tutor.overhang.io>`_
===================================================================

This is a plugin for `Tutor <https://docs.tutor.overhang.io>`_ to easily add the `Open edX note-taking app <https://github.com/edx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-olive.master/exercises_tools/notes.html>`_).
This is a plugin for `Tutor <https://docs.tutor.overhang.io>`_ to easily add the `Open edX note-taking app <https://github.com/openedx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-olive.master/exercises_tools/notes.html>`_).

.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-olive.master/_images/SFD_SN_bodyexample.png
:alt: Notes in action
Expand Down Expand Up @@ -33,6 +33,8 @@ Configuration
- ``NOTES_HOST`` (default: ``"notes.{{ LMS_HOST }}"``)
- ``NOTES_MYSQL_DATABASE`` (default: ``"notes"``)
- ``NOTES_MYSQL_USERNAME`` (default: ``"notes"``)
- ``NOTES_REPOSITORY`` (default: ``"https://github.com/openedx/edx-notes-api"``)
- ``NOTES_REPOSITORY_VERSION`` (default: ``"{{ OPENEDX_COMMON_VERSION }}"``)

These values can be modified with ``tutor config save --set PARAM_NAME=VALUE`` commands.

Expand Down
2 changes: 2 additions & 0 deletions tutornotes/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
"HOST": "notes.{{ LMS_HOST }}",
"MYSQL_DATABASE": "notes",
"MYSQL_USERNAME": "notes",
"REPOSITORY": "https://github.com/openedx/edx-notes-api",
"REPOSITORY_VERSION": "{{ OPENEDX_COMMON_VERSION }}",
},
}

Expand Down
2 changes: 1 addition & 1 deletion tutornotes/templates/notes/build/notes/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG APP_USER_ID=1000
RUN useradd --home-dir /app --create-home --shell /bin/bash --uid ${APP_USER_ID} app
USER ${APP_USER_ID}

RUN git clone https://github.com/edx/edx-notes-api --branch {{ OPENEDX_COMMON_VERSION }} --depth 1 /app/edx-notes-api
RUN git clone {{ NOTES_REPOSITORY }} --branch {{ NOTES_REPOSITORY_VERSION }} --depth 1 /app/edx-notes-api
WORKDIR /app/edx-notes-api

RUN python -m venv /app/venv
Expand Down

0 comments on commit 527c3e9

Please sign in to comment.