From 652390874d4eab00d93b0954663a3ede1ee8378b Mon Sep 17 00:00:00 2001 From: sarina Date: Tue, 24 Mar 2026 13:42:58 -0400 Subject: [PATCH] Update and refactor XQueue documentation --- .../exercise_tools/about_external_graders.rst | 46 +-- .../exercise_tools/add_external_grader.rst | 74 +++- .../navigation/components_activities.rst | 1 - .../external_grader_requirements.rst | 231 ------------ source/site_ops/how-tos/enable_xqueue.md | 339 ++++++++++++++++++ .../references/xqueue_custom_watcher.rst | 101 ++++++ .../references/xqueue_external_grader.rst | 179 +++++++++ 7 files changed, 693 insertions(+), 278 deletions(-) delete mode 100644 source/educators/references/course_development/exercise_tools/external_grader_requirements.rst create mode 100644 source/site_ops/how-tos/enable_xqueue.md create mode 100644 source/site_ops/references/xqueue_custom_watcher.rst create mode 100644 source/site_ops/references/xqueue_external_grader.rst diff --git a/source/educators/concepts/exercise_tools/about_external_graders.rst b/source/educators/concepts/exercise_tools/about_external_graders.rst index bcb39a96d..38e8a619a 100644 --- a/source/educators/concepts/exercise_tools/about_external_graders.rst +++ b/source/educators/concepts/exercise_tools/about_external_graders.rst @@ -62,59 +62,19 @@ following example. :alt: A learner's view of a programming problem that uses an external grader, with an incorrect result. -.. _External Grader Requirements: External Grader Requirements ============================ -The course team builds and deploys the external grader. +Your site operations team :ref:`builds and deploys the external grader `. -When you build your external grader, keep the following requirements in mind. - -* To communicate with XQueue, the grader must accept and return JSON objects. - For more information, see :ref:`XQueue JSON Objects`. - -* The external grader must actively retrieve, or pull, submissions from the - XQueue through a RESTful interface at regular intervals. - -* The grader must be scalable. Many learners might submit responses at one - time, such as shortly before an exam is due. The grader must be able to - process many submissions in a limited time, without failure or unexpected - delays. - -* The grader must not constantly send queries unless the grader detects that - the ``queuelen`` value is growing. If XQueue receives too many requests from - a grader, the XQueue system administrator may apply throttling to the grader. - -* The grader must implement security features. - - You are responsible for the server that runs the code that learners submit. - Your system must protect against learners who might submit malicious code and - ensure that the external grader runs only code that is relevant to the course - problems. Your specific security implementation depends on the programming - language that you are using and your deployment architecture. You must ensure - that malicious code will not damage your server. - - -* You must have a plan to immediately notify the team that operates your - grader, as well as your Open edX system administrator, if the grader fails. - You must also have a process to quickly identify the cause of the failure, - whether the problem is with your grader or XQueue. - - If you know the grader will be unavailable at a certain time for maintenance, - you should :ref:`add a course update `. - -* You must test the grader thoroughly before your course starts. Be sure to - test incorrect code as well as correct code to ensure that the grader - responds with appropriate scores and messages. .. seealso:: - - - :ref:`External Grader Problem Requirements` (reference) :ref:`Add an External Grader Problem` (how-to) + :ref:`Enable XQueue` (site operators how-to) + **Maintenance chart** diff --git a/source/educators/how-tos/course_development/exercise_tools/add_external_grader.rst b/source/educators/how-tos/course_development/exercise_tools/add_external_grader.rst index e7d21eaa2..8887947f1 100644 --- a/source/educators/how-tos/course_development/exercise_tools/add_external_grader.rst +++ b/source/educators/how-tos/course_development/exercise_tools/add_external_grader.rst @@ -15,7 +15,7 @@ To create a code response problem in Studio, follow these steps. #. In the new component, select **Edit**. -#. In the problem editor, enter the online learning XML (OLX) definition for +#. In the problem editor, enter the :ref:`online learning XML (OLX) definition ` for the problem that you created. #. Select **Save**. @@ -23,16 +23,84 @@ To create a code response problem in Studio, follow these steps. #. Test the problem in the LMS. .. note:: + To validate your external grader and test a problem, you must view the component in a published unit in the LMS. If you test a problem in Studio, you receive an “Error: No grader has been set up for this problem” message. +.. _OLX Definition: + +OLX Definition +============== + +To create an external grader problem in Studio, you create an Open Learning XML +(OLX) definition of the problem, and then add the code to a problem component. + +.. note:: + + Your site operations team will need to first :ref:`Enable XQueue`, and then give you the ``queuename`` to use in your problem. + +The OLX definition of a problem contains the following information. + +* A ``queuename`` attribute that specifies the name of the XQueue that your site operations team + created. + +* A ``