Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added source/img/manage_organization/addprompt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 20 additions & 15 deletions source/instructors/admin/organization/organisation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Organization settings
llms
webhook
course-action-data
prompt-management



Expand All @@ -53,9 +54,11 @@ The person who creates the organization in Codio is the owner and is given the a
- :ref:`Set Organization Contact URL <org-contact-url>`
- :ref:`Enable/Disable Release Grade Automatically <auto-release-grades>`
- :ref:`Hide A/V calls <hideav>`
- :ref:`SSO Integration <sso-integration>`
- :ref:`LLMs <org_llm>`

- :ref:`Set up SSO Integration <sso-integration>`
- :ref:`Provide your own LLM keys <org_llm>`
- :ref:`Create a webhook to receive Codio events <webhooks>`
- :ref:`Download Course Activity Data <course-action-data>`
- :ref:`Manage Prompts for your Organization <prompt-management>`


To access the **Organizations** page, follow these steps:
Expand All @@ -71,15 +74,17 @@ Organization owners can add other owners to an organization and view all members

The following Codio features are only accessible to Organization owners:

- **Overview** - Update organization profile, enable or disable the ability to create public objects, enable or disable Codio support access, obtain invitation token, manage education settings, and delete the organization.
- **Members** - View, add, and remove users in your organization and invite teachers to the organization.
- **Billing** - View your Codio plan information.
- **Rubrics** - Create and manage your grading templates.
- **Dashboard** - Specify the Student Dashboard default page (My Projects or Courses), and specify whether to hide/show Courses.
- **IP Consent** - Enable or disable IP Consent and manage the versions.
- **Custom Scripts** - Manage custom scripts used to integrate third-party systems to help and track students.
- **Extensions** - Add and enable custom extensions for the organization.
- **LTI Integrations** - Specify and manage LTI integration settings.
- **Integrations** - Specify API key for Sense.Network integration, and add other API integrations.
- **Assessment Libraries** - Create and manage assessment libraries for your organization.
- **LLMs** - Specify API keys for LLM models or add a custom LLM provider.
- **Overview** - Update organization profile, manage the ability to create public objects, manage Codio support access, manage education settings, and delete the organization.
- **Members** - View, add, and remove users in your organization and invite teachers to the organization.
- **Billing** - View your Codio subscription information.
- **Rubrics** - Create and manage your grading templates.
- **Dashboard** - Specify Dashboard configurations for students, teachers and read-only teachers.
- **IP Consent** - Enable or disable IP Consent and manage the versions.
- **Custom Scripts** - Manage custom scripts used to integrate third-party systems to help and track students.
- **Extensions** - Add and enable custom extensions for the organization.
- **LTI Integrations** - View and manage LTI integration settings.
- **Integrations** - Specify API integrations, Webhooks and SSO Integration.
- **Assessment Libraries** - Create and manage assessment libraries for your organization.
- **LLMs** - Specify API keys for LLM models or add a custom LLM provider.
- **Course Action Data** - Download a report of all course management activities for the entire organization.
- **Prompt Management** - Manage prompts, used in custom extensions, for the entire organization.
113 changes: 113 additions & 0 deletions source/instructors/admin/organization/prompt-management.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
.. meta::
:description: Prompt management for an organization.

.. _prompt-management:


Prompt Management
=================

This feature allows instructors to store prompts at an organization level. These prompts have unique **Prompt IDs** that can be used in custom assistants.

1. Click your username in the top-right corner, then select **Organization** from the menu.

2. In the **Organizations** tab, click the name of your organization.

3. Click the **Prompt Management** tab and then click **Add Prompt**.

.. image:: /img/manage_organization/addprompt.png
:alt: Add a prompt

Creating the Prompt
~~~~~~~~~~~~~~~~~~~

Enter your prompt text and specify the data you want to include as context.

- Each Prompt must have a unique **Prompt ID**. Prompt IDs can only contain uppercase letters, numbers, and underscores.
- In the **Text Area**, enter your prompt text (user prompt or system prompt).
- Use the buttons to create templates to specify the data you want to add to your prompt as context:
- **Add Variable**: Pass dynamic variables as context to your prompt (e.g., open guide page, open file, error message, etc.).
- **Add Instructor View**: Pass a file from the ``.guides`` folder (hidden from students) or a file from the student workspace with solution file templating. For example, ``{{"type": "INSTRUCTOR_VIEW", "filepath": "<path/to/file>"}}`` will pull the contents of the specified file.
- **Add Starter Code**: Pass a file from the student workspace provided by the instructor with no student edits (starter code/boilerplate).
- You can use this feature to access solutions in the ``.guides/secure`` folder. See the example below.
- Click **Create** once you have entered all the information.

.. note::
Files are retrieved dynamically on the server when the assistant is used. If a referenced file is deleted or doesn’t exist after the prompt is created, an empty string is sent as context.

.. image:: /img/manage_organization/promptmanagement.png
:alt: The prompt management dialog

Example Prompts
~~~~~~~~~~~~~~~

**Prompt Example 1: Secure Folder File**

.. code:: none
Here is the question the student is working on:
<assignment>
{{"type": "VARIABLE", "name": "GUIDE_CONTENT"}}
</assignment>
Here's the sample solution for the question:
<solution>
{{"type": "INSTRUCTOR_VIEW", "filepath": ".guides/secure/exercise-solutions/solution1.py"}}
</solution>
Answer any questions the student has about this assignment without providing the solution directly.
Respond only with suggestions to help them make progress by themselves.
**Prompt Example 2: Starter Code and Solution File**

.. code:: none
Here is the question the student is working on:
<assignment>
{{"type": "VARIABLE", "name": "GUIDE_CONTENT"}}
</assignment>
Here is the solution file:
<solution>
{{"type": "INSTRUCTOR_VIEW", "filepath": "code/exercise1.py"}}
</solution>
Here's the starter code provided to the student:
<starter_code>
{{"type": "STARTER_CODE", "filepath": "code/exercise1.py"}}
</starter_code>
Here's the student current code file:
<student_code>
{{"type": "VARIABLE", "name": "STUDENT_FILE_CONTENT"}}
</student_code>
Provide 1-2 hints as suggestions to help them make progress. Do not give away the solution. Do not include code snippets in your hints.
Using the Prompt in a Custom Extension
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: javascript
(async function(codioIDE, window) {
const systemPrompt = "System Prompt for the LLM goes here"
codioIDE.coachBot.register("iNeedHelpButton", "I have a question", onButtonPress)
async function onButtonPress() {
const context = await codioIDE.coachBot.getContext()
const userPrompt = "{% prompt 'TEST_PROMPT_1' %}"
const result = await codioIDE.coachBot.ask({
systemPrompt: systemPrompt,
userPrompt: userPrompt,
vars: {
"GUIDE_CONTENT": context.guidesPage.content,
}
})
}
})(window.codioIDE, window)
23 changes: 14 additions & 9 deletions source/instructors/admin/organization/webhook.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
.. meta::
:description: Allow webhoooks to support passing of student data to extenal servers
:description: Allow webhooks to support passing of student data to external servers

.. _webhooks:

Webhooks
========
Webbhooks allow receiving Codio events by calling your endpoint.

The system won’t retry webhook calls for any missed events you can query the API event object using loadEvents function.
Webhooks provide a way to receive Codio events at an endpoint you specify.

You can add your own Webhooks to your Codio organization from the **Organization > Integrations** page in Codio.
The system does not retry webhook calls for missed events. You can query the API event object using the ``loadEvents`` function.

Go to the **Webhooks** area and **Add Webhook**
You can add Webhooks for your Codio organization from the **Organization > Integrations** page.

To add a webhook enter the URL of your server and press create, the system will send a test request to check endpoint validity.
1. Click your username in the top-right corner, then select **Organization** from the menu.

.. image:: /img/createwebhook.png
2. In the **Organizations** tab, click the name of your organization.

.. image:: /img/class_administration/createanorganization/organizations.png
:alt: My Organizations

All requests contain a JWT signature you can verify using codio keys https://apollo.codio.com/lti/oidc/certs (or https://apollo.codio.co.uk/lti/oidc/certs if working on codio.co.uk)
3. Click the **Integrations** tab and go to the **Webhooks** area and click **Add Webhook**.

4. Enter the URL of your server and click **Create**. The system will send a test request to validate endpoint connectivity.


All requests contain a JWT signature you can verify using Codio keys https://apollo.codio.com/lti/oidc/certs (or https://apollo.codio.co.uk/lti/oidc/certs if you are working on codio.co.uk).

Example app to receive webhooks into a Codio project can be found here: https://github.com/iyashtykov/webhook-server
View an example here: https://github.com/iyashtykov/webhook-server