[FC-0047] - Requirements for the offline xblocks running

  1. Table of Drag and Drop actions:

Action

Description

Screenshot

Action

Description

Screenshot

  1. Click to item

  1. Click to the Drag and Drop item:

    Event: publish_event is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/publish_event
    Request Method: POST
    Payload: (Form Data)
    {"event_type":"edx.drag_and_drop_v2.item.picked_up","item_id":0}
    Response: {"result": "success"}

 

Screenshot 2024-05-14 at 16.59.42.png
Clicking to the Drag and Drop item.

 

  1. Click and move item

  1. Click and move item to the Drag and Drop zone:

    1. Event: publish_event is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/publish_event
    Request Method: POST
    Payload: (Form Data)
    {"event_type":"edx.drag_and_drop_v2.item.picked_up","item_id":0}
    Response: {"result": "success"}

    2. Event: drop_item is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/drop_item
    Request Method: POST
    Payload: (Form Data)
    {"val":0,"zone":"top"}
    Response:

    { "correct": true, "grade": 0.4, "finished": false, "overall_feedback": [ { "message": "Drag the items onto the image above.", "message_class": "initial" } ], "feedback": [ { "message": "Correct! This one belongs to The Top Zone.", "message_class": null } ] }


    3. Event: publish_event is sent.

    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/publish_event
    Request Method: POST
    Payload: (Form Data)
    {"event_type":"edx.drag_and_drop_v2.feedback.opened","content":"Correct! This one belongs to The Top Zone.","truncated":false}
    Response: {"result": "success"}

 

 

 

Screenshot 2024-05-14 at 17.25.00.png
Move Drag and Drop item to the Drag and Drop zone.

 

  1. Close

  1. Close Drag and Drop feedback message:
    Event: publish_event is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/publish_event
    Request Method: POST
    Payload: (Form Data)
    {"event_type":"edx.drag_and_drop_v2.feedback.closed","content":"Correct! This one belongs to The Bottom Zone.","manually":true,"truncated":false}
    Response: {"result": "success"}

 

Close feedback message.

  1. Chose incorrect

  1. Incorrect answer:

    1. Event: publish_event is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/publish_event
    Request Method: POST
    Payload: (Form Data)
    {"event_type":"edx.drag_and_drop_v2.item.picked_up","item_id":4}
    Response: {"result": "success"}

    2. Event: drop_item is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/drop_item
    Request Method: POST
    Payload: (Form Data)
    {"val":4,"zone":"middle"}
    Response:

    { "correct": false, "grade": 0.6, "finished": false, "overall_feedback": [ { "message": "Drag the items onto the image above.", "message_class": "initial" } ], "feedback": [ { "message": "You silly, there are no zones for this one.", "message_class": null } ] }

     

    3. Event: publish_event is sent.

    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/publish_event
    Request Method: POST
    Payload: (Form Data)
    {"event_type":"edx.drag_and_drop_v2.feedback.opened","content":"You silly, there are no zones for this one.","truncated":false}
    Response: {"result": "success"}

 

Incorrect answer.

  1. Reset

  1. Reset student answer:
    Event: reset is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@drag-and-drop-v2+block@92cea1db16524b0baad9edb5f7e773dc/handler/reset
    Request Method: POST
    Payload: (Form Data)
    {}
    Response:

    { "items": {}, "finished": false, "attempts": 0, "grade": 1.0, "overall_feedback": [ { "message": "Drag the items onto the image above.", "message_class": "initial" } ] }

 

 

 

  1. Keyboard Help.
    Don’t need requests and responses from server.

 

 

  1. Library content with offline mode.
    The components from Library behave the same way as the components inherit from capa problem (Checkboxes, Multiple Choice, Numerical Input, Text Input etc.)
    Implementation for text problem and video problem already exist.

  2. Staff Graded Assignment actions table.

Action

Description

Screenshot

Action

Description

Screenshot

  1. Upload assignment

  1. Click to the 'Upload your assignment' button and upload file (picture, audio, video, pdf):

    Event: upload_assignment is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@edx_sga+block@6e0fd8e8cb3b41bfbe8dc10cba835f0c/handler/upload_assignment
    Request Method: POST
    Payload:
    ------WebKitFormBoundaryeJ0dBLCR091snpxM Content-Disposition: form-data; name="assignment"; filename="smile_742751.png" Content-Type: image/png ------WebKitFormBoundaryeJ0dBLCR091snpxM--

    Response:

 

 

  1. Grade Submissions

  1. Press GRADE SUBMISSIONS button (it works only for the staff or course instructor)
    Event: get_staff_grading_data is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@edx_sga+block@6e0fd8e8cb3b41bfbe8dc10cba835f0c/handler/get_staff_grading_data
    Request Method: GET
    Preview:

    Response:Screenshot 2024-05-16 at 12.18.12.png

 

 

 

  1. Submit file

  1. Submit uploaded file:
    Event: finalize_uploaded_assignment is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@edx_sga+block@6e0fd8e8cb3b41bfbe8dc10cba835f0c/handler/finalize_uploaded_assignment
    Request Method: POST
    Payload: None
    Response:

 

 

  1. Enter Grade

  1. Enter Grade in staff modal window and submit:
    Event: enter_grade is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@edx_sga+block@6e0fd8e8cb3b41bfbe8dc10cba835f0c/handler/enter_grade
    Request Method: POST
    Payload:

    Response:

 

 

 

 

  1. Upload annotated file

  1. Upload annotated file (for staff or instructor)
    Event: staff_upload_annotated is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@edx_sga+block@6e0fd8e8cb3b41bfbe8dc10cba835f0c/handler/staff_upload_annotated?module_id=65
    Request Method: POST
    Payload: (Form Data)

    Response:

 

 

  1. Annotatable problem table.
    Requests and responses to the server almost completely correspond to those described in the capa problem article. The only difference is in the Payload of the the request problem_check.

Action

Description

Screenshot

Action

Description

Screenshot

Submit

Submit answer and annotation:

Event: problem_check is sent.
Request URL:
http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@problem+block@273825134dcc433abbb012fa5e660d4d/handler/xmodule_handler/problem_check
Request Method: POST
Payload: (Form Data)

Response:

 

 

  1. Poll offline mode table

Action

Description

Screenshot

Action

Description

Screenshot

  1. Submit

Submit student response:

  1. Vote:
    Event: vote is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@poll+block@d15a5fab48ad444db05ba5170758fa4c/handler/vote
    Request Method: POST
    Payload: (Form Data) {"choice":"R"}
    Response:

  2. Get results:
    Event: get_results is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@poll+block@d15a5fab48ad444db05ba5170758fa4c/handler/get_results
    Request Method: POST
    Payload: (Form Data) {}
    Response:

 

 

  1. View results

  1. View results.
    The same as Get results event in the answer submission.

 

  1. Export results to CSV

  1. Export results to CSV
    Event: csv_export is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@poll+block@d15a5fab48ad444db05ba5170758fa4c/handler/csv_export
    Request Method: POST
    Payload: (Form Data) {}
    Response:

 

 

  1. Download CSV

  1. Download CSV
    Doesn’t work for now (Quince release, tutor local installation)
    The link to download the CSV file is not generated with error: local.edly.io refused to connect.

 

  1. Survey offline mode table.

Action

Description

Screenshot

Action

Description

Screenshot

  1. Submit

Submit student answer:

  1. Vote:
    Event: vote is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@survey+block@f2768608de5a45b0952fa73efa1e1e5e/handler/vote
    Request Method: POST
    Payload: (Form Data) {"enjoy":"Y","recommend":"N","learn":"M"}
    Response:

  2. Get results:
    Event: get_results is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@survey+block@f2768608de5a45b0952fa73efa1e1e5e/handler/get_results
    Request Method: POST
    Payload: (Form Data) {}
    Response:

 

 

  1. View results

  1. View results.
    The same as Get results event in the answer submission.

 

  1. Export results to CSV

  1. Export results to CSV
    Event: csv_export is sent.
    Request URL:
    http://local.edly.io:8000/courses/course-v1:f+f+f/xblock/block-v1:f+f+f+type@survey+block@f2768608de5a45b0952fa73efa1e1e5e/handler/csv_export
    Request Method: POST
    Payload: (Form Data) {}
    Response:

 

  1. Download CSV

  1. Download CSV
    Doesn’t work for now (Quince release, tutor local installation)
    The link to download the CSV file is not generated with error: local.edly.io refused to connect.

 

 

  1. Done xBlock offline mode table.

Action

Description

Screenshot

Action

Description

Screenshot

Complete

  1. Mark as complete
    Event: toggle_button is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@done+block@b945afa1f8b547a1ad2090ee370b979b/handler/toggle_button
    Request Method: POST
    Payload: (Form Data) {"done":true}
    Response: {"state": true}

  2. Unmark
    Event: toggle_button is sent.
    Request URL:
    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@done+block@b945afa1f8b547a1ad2090ee370b979b/handler/toggle_button
    Request Method: POST
    Payload: (Form Data) {"done":false}
    Response: {"state": false}

 

 

 

 

  1. Word cloud xBlock offline mode table.

Action

Description

Screenshot

Action

Description

Screenshot

Save

Press save button

Event: submit is sent.
Request URL:
http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@word_cloud+block@d81b6465f3b54c0eb3be0e873f311fda/handler/xmodule_handler/submit
Request Method: POST
Payload: (Form Data)

Response:

 

 

  1. Recommender xBlock offline mode table.

Action

Description

Screenshot

Action

Description

Screenshot

  1. Show and hide related resources

  1. Show related resources

    Event: event is sent.
    Request URL:

    http://local.overhang.io:8000/event
    Request Method: POST
    Payload: (Form Data)

    Response: success

  2. Hide related resources
    Event: event is sent.
    Request URL:

    http://local.overhang.io:8000/event
    Request Method: POST
    Payload: (Form Data)

    Response: success


 

 

  1. Upload resources

Press upload resources button

  1. Event: event is sent.
    Request URL:

    http://local.overhang.io:8000/event
    Request Method: POST
    Payload: (Form Data)

    Response: success

  2. Event: import_resources is sent.
    Request URL:

    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@recommender+block@9a9fb119dccc4387be5ecbf06b985167/handler/import_resources
    Request Method: POST
    Payload: (Form Data)

 

 

  1. Download resources

Press button Download resources

  1. Event: export_resources is sent.
    Request URL:

    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@recommender+block@9a9fb119dccc4387be5ecbf06b985167/handler/export_resources
    Request Method: POST
    Payload: (Form Data) {}

    Response:

  2. Event: event is sent.
    Request URL:

    http://local.overhang.io:8000/event
    Request Method: POST
    Payload: (Form Data)

    Response: success

 

 

  1. Add new resource

Press button Add new resource

  1. Event: event is sent.
    Request URL:

    http://local.overhang.io:8000/event
    Request Method: POST
    Payload: (Form Data)

    Response: success

  2. Event: event is sent.
    Request URL:

    http://local.overhang.io:8000/event
    Request Method: POST
    Payload: (Form Data)

    Response: success

  3. Event: upload_screenshot is sent.
    Request URL:

    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@recommender+block@9a9fb119dccc4387be5ecbf06b985167/handler/upload_screenshot
    Request Method: POST
    Payload: (Form Data)

    Response: {"file_name": "fs://6e0ac0d5e8b61274199e225a229209fa.png"}

  4. Event: add_resource is sent.
    Request URL:

    http://local.overhang.io:8000/courses/course-v1:d+d+d/xblock/block-v1:d+d+d+type@recommender+block@9a9fb119dccc4387be5ecbf06b985167/handler/add_resource
    Request Method: POST
    Payload: (Form Data)

    Response:

 

 

  1. Requirements for the offline ORA xblock running