Giter VIP home page Giter VIP logo

tutor-notes's Introduction

Students notes plugin for Tutor

This is a plugin for Tutor to easily add the Open edX note-taking app to an Open edX platform. This app allows students to annotate portions of the courseware (see the official documentation).

Notes in action

Installation

The plugin is currently bundled with the binary releases of Tutor. If you have installed Tutor from source, you will have to install this plugin from source, too:

tutor plugins install notes

Then, to enable this plugin, run:

tutor plugins enable notes

Then, to make migrations & tasks:

tutor local launch

You should beware that the notes.<LMS_HOST> domain name should exist and point to your server. For instance, if your LMS is hosted at http://myopenedx.com, the notes service should be found at http://notes.myopenedx.com.

If you would like to host the notes service at a different domain name, you can set the NOTES_HOST configuration variable (see below). When testing Tutor on a local computer, this will be automatically set to notes.local.edly.io.

To enable student notes for a specific course, you should go to the course advanced settings in the studio, and set "Enable Student Notes" to "true". Then, hit "save changes".

Configuration

  • NOTES_MYSQL_PASSWORD (default: "{{ 8|random_string }}")
  • NOTES_SECRET_KEY (default: "{{ 24|random_string }}")
  • NOTES_OAUTH2_SECRET (default: "{{ 24|random_string }}")
  • NOTES_DOCKER_IMAGE (default: "{{ DOCKER_REGISTRY }}overhangio/openedx-notes:{{ NOTES_VERSION }}")
  • 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.

Debugging

To debug the notes API service, you are encouraged to mount the edx-notes-api repo from the host in the development container:

tutor dev start --mount /path/to/edx-notes-api

Feel free to add breakpoints (breakpoint()) anywhere in your source code to debug your application.

Troubleshooting

This Tutor plugin is maintained by Jhony Avella from eduNEXT. Community support is available from the official Open edX forum. Do you need help with this plugin? See the troubleshooting section from the Tutor documentation.

License

This software is licensed under the terms of the GNU Affero General Public License (AGPL).

tutor-notes's People

Contributors

angonz avatar codewithemad avatar crtmneric avatar felipemontoya avatar gabor-boros avatar jfavellar90 avatar kdmccormick avatar lucgranato avatar navinkarkera avatar neonesoft avatar regisb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tutor-notes's Issues

`BrowsableAPIRenderer` in production

Having a browsable API is not necessarily a bad thing, but since this is an API Server, and there are no static files, shouldn't we replace that with JSONRenderer?

Screenshot from 2024-02-27 17-02-04

I'm aware of the notes-settings patch, but I think this should be handled by the plugin.

Issue with Elasticsearch in SSL

Adding or updating a note raises an error:

image

This is the output of tutor k8s logs notes:

POST http://my-es-domain.us-east-1.es.amazonaws.com:443/_bulk?refresh=true [status:400 request:0.027s]
Undecodable raw error response from server: Expecting value: line 1 column 1 (char 0)
Internal Server Error: /api/v1/annotations/
Traceback (most recent call last):
  File "/app/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/app/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/app/venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
    return view_func(*args, **kwargs)
  File "/app/venv/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/app/venv/lib/python3.8/site-packages/rest_framework/views.py", line 509, in dispatch
    response = self.handle_exception(exc)
  File "/app/venv/lib/python3.8/site-packages/rest_framework/views.py", line 469, in handle_exception
    self.raise_uncaught_exception(exc)
  File "/app/venv/lib/python3.8/site-packages/rest_framework/views.py", line 480, in raise_uncaught_exception
    raise exc
  File "/app/venv/lib/python3.8/site-packages/rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "/app/edx-notes-api/notesapi/v1/views.py", line 476, in post
    note.save()
  File "/app/venv/lib/python3.8/site-packages/django/db/models/base.py", line 739, in save
    self.save_base(using=using, force_insert=force_insert,
  File "/app/venv/lib/python3.8/site-packages/django/db/models/base.py", line 787, in save_base
    post_save.send(
  File "/app/venv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 180, in send
    return [
  File "/app/venv/lib/python3.8/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
    (receiver, receiver(signal=self, sender=sender, **named))
  File "/app/venv/lib/python3.8/site-packages/django_elasticsearch_dsl/signals.py", line 58, in handle_save
    registry.update(instance)
  File "/app/venv/lib/python3.8/site-packages/django_elasticsearch_dsl/registries.py", line 141, in update
    doc().update(instance, **kwargs)
  File "/app/venv/lib/python3.8/site-packages/django_elasticsearch_dsl/documents.py", line 225, in update
    return self._bulk(
  File "/app/venv/lib/python3.8/site-packages/django_elasticsearch_dsl/documents.py", line 202, in _bulk
    return self.bulk(*args, **kwargs)
  File "/app/venv/lib/python3.8/site-packages/django_elasticsearch_dsl/documents.py", line 151, in bulk
    response = bulk(client=self._get_connection(), actions=actions, **kwargs)
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/helpers/actions.py", line 410, in bulk
    for ok, item in streaming_bulk(
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/helpers/actions.py", line 329, in streaming_bulk
    for data, (ok, info) in zip(
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/helpers/actions.py", line 256, in _process_bulk_chunk
    for item in gen:
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/helpers/actions.py", line 195, in _process_bulk_chunk_error
    raise error
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/helpers/actions.py", line 240, in _process_bulk_chunk
    resp = client.bulk("\n".join(bulk_actions) + "\n", *args, **kwargs)
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 168, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/client/__init__.py", line 463, in bulk
    return self.transport.perform_request(
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 415, in perform_request
    raise e
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/transport.py", line 381, in perform_request
    status, headers_response, data = connection.perform_request(
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/connection/http_urllib3.py", line 277, in perform_request
    self._raise_error(response.status, raw_data)
  File "/app/venv/lib/python3.8/site-packages/elasticsearch/connection/base.py", line 330, in _raise_error
    raise HTTP_EXCEPTIONS.get(status_code, TransportError)(
elasticsearch.exceptions.RequestError: RequestError(400, '<html>\r\n<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>\r\n<body>\r\n<center><h1>400 Bad Request</h1></center>\r\n<center>The plain HTTP request was sent to HTTPS port</center>\r\n</body>\r\n</html>\r\n')

I've seen that the plugin sets the variable ELASTICSEARCH_DSL. However, it doesn't include the ELASTICSEARCH_SCHEMA.
We are using an ES service with SSL enabled, and the POST is sent to HTTP. I guess this is the problem.

tutor-notes codebase Python 3.12 upgrade

  • Ensure tutor-notes codebase is compatible with Python 3.12
  • Update Python to 3.12 in Dockerfile for nightly and ensure the image builds as expected. The changes would be merged to nightly. This task would rely on upgrade of edx-notes-api to Python 3.12

See overhangio/tutor#1004 for the context.

Ubuntu 24.04 Upgrade

  • Ensure CI uses the latest ubuntu
  • Ensure dockerfile is updated to use ubuntu 24.04
  • Ensure any documentation/references are updated
  • Ensure the change works as expected post-upstream release

See overhangio/tutor#1113 for context.
Additionally, tutor-notes moved to a different base image in #36. We would need to revert that to ensure tutor plugin has same config specs as upstream.

tutornotes/templates/notes /tasks/ are not working

so i installed notes as shown like "tutor plugins install notes". then i noticed that nat a single task is done coz first it said that there is no "notes" user in logs, then no "notes" oauth app, i created these 2 manually, then it said no "notes" db then i created manually and now it says | django.db.utils.ProgrammingError: (1146, "Table 'notes.v1_note' doesn't exist"

Any suggestions ?

Version 15.0.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.