# Triggers and Action Execution in Assessment

## Design

### Data Model

It was necessary to add several tables to support the trigger and action execution.

## User Manual

Here are some statements to create triggers to branch between sections or execute actions:

### Manage Permissions

To create an assessment is necessary to have create permissions over the assessment instance. This permission can be inherit or can be granted by a site wide administrator. This permissions can be managed by the site wide administrator following the Permissions link in the assessment admin page.

To create triggers is necessary to have admin permissions over an assessment. The admin permission is inherit to the user that creates an assessment and also can be granted by the assessment administrator. This permissions can be managed folloging the Permission link that appears in the list of assessments.

Both links will lead the user to a page where the necesary permissions can be set.

Also the user can search for another user to manage his permissions:

After clicking OK, the user will appear in the list an the permissions can be set properly.

### Actions Administration

To be able to administrate actions the user must have site wide admin privileges. To admin actions the user must follow the link "Action Administration" in the assessment admin page.

1. Register User: create a new user account in the system.

2. Event Registration: register the user to an event.

3. Add to Community: register the user to dotlrn and also to a dotlrn class/community.

Actions can be also created, following the link "Add new action":

The action is formed mainlly by four things:

1. Name: the desire name that gives an idea of what the action do.

2. Description: short explaination of what the action do, and how its done.

3. Tcl code: the code that its executed to performe the action.

4. Parameter: this are the variables needed in the tcl code, that depends of the user.

After the action is created, a link to add the parameters is shown.

When the link is followed, then a form to create the parameter is shown, there are two types of parameters:

1. Name: this will take the value from a response given by the user to an item of the assessment.

2. Query: for this type of parameter, the field query is used, and the parameter will take the value or values that the query returns.

To delete an action the link "delete" in the action administration page must be followed:

Before deleting an action, a confirm message will be displayed, the action will not be deleted if there is some reference to this action (i.e. a trigger that wil execute this action).

### Trigger Definition

After the assessment is created, the triggers can be defined for questions with multiple choice responses.

There are two type of triggers:

- Branch: This trigger will make that the secuence of sections in the assessment change, depending on the answer that a user gives to the question related to the trigger when the assessment is being responded.

- Action: This trigger will execute the action related, also depending on the answer that the user gives to the question related to the trigger, when the assessment is being responded.

The link to create a trigger appears in the action bar of the items with multiple choice responses of the assessment.

### Branch Triggers

To define a Branch Trigger, the field "Type" in the form must be checked as branch. Is necessary that at least one section is created after the one that is being evaluated.

The condition field shows the question and its possible answers, this means that if a user that respond the assessment choose that response the trigger will be activated, and the section secuence will change.

After the trigger is defined as branch, the section that will be displayed next must be chosen:

### Action Triggers

To define an Action Trigger, the field "Type" in the form must be checked as "Action".

The condition field shows the question and its possible anwers, it means that when the user is responding the assessment, if this answer is given for this question, the action will be executed.

After the trigger is created, the action related must be chosen, also the time when the action will be executed, and the message shown to the user when the action is executed.

The actions can be executed in three different times:

1. Immediately: it means that the action will be executed after the user finish to respond the current section.

2. At the end of this Assessment: it means that the action will be executed when the user finish to respond all the sections of the assessment.

3. Manually:this means that the action will be executed by an administrator (i.e. in case that the request needs approval).

After select the action related to the trigger, the parameters for the action must be set, the select boxes display the options depending on the type of the parameter.

- Query: display the values returned by the query defined for the parameter.

- Name: the options displayed depends on the time of execution:

  - Immediately: display all the questions defined in previuos sections.

  - At the end of the assessment and Manually: display all the questions defined in the assessment.

### Trigger Administration

The trigger administration page can be reached from two different links, the link "Administer Triggers" in the action bar of each section, or from the link that show the number of triggers related to an item.

If the trigger administration page is reached from thi link of the section, all the triggers related to the items of the section will be display, this allowst to manage the order of the execution of the actions when they are executed immediately or at the end or the assessment. When the arrorws that appear beside each trigger is clicked, then the order of execution will change.

If the trigger administration page is reached through the link that show the number of triggers of each item, then the row will not be shown. Through this interface, the trigger can be edited, deleted or can be managed its notifications.

When a trigger is deleted, a confirm message will be display showing all the information related to it.

The link "Notify User" leads to a page a user can request notifications when this trigger is executed. It also allowst to search and register another users to the notifications.

### Request Administration

The request Administration page can be reached following the link in the action bar for a site wide administrator or following the link show in the list of assessments that belong to a user.

The Request Administration interface shows all the requests (action triggers executions) that has been approved, approved with errors and the ones that are waiting to be executed (i.e. Manually executed triggers).

This interface will display those requests related to the assessments that the user owns, if the user is site wide administrator, all the requests related to all the assessments will be display.

An administrator can select requests that want to approve and click in the button "Approve", and also can send mail to several users that requested the action. Through this interface the notifications can also be managed.

## Registration Assessment

To be able to select an assessment that will be related to the registration process is necessary that the user has site wide admin privileges, because the interface can only be reached through the Main Site Administration Page. This link only will appear if the Assessment Package is installed and mounted.

If the Assessment Package is installed and mounted, the link can be follow and will lead to a page that shows all the assessment that can be responded for anonymous users created in all of the diferent instances of the assessment package that could exist. If the option "None" is selected, it means that the registration process will be the same as always has been, if any other option is selected, the assessment will be diplayed when a user creates a new account.

## Authors

Viaro Networks (www.viaro.net)

1. Rocael Hernandez -- roc@viaro.net

   Design

2. Vivian Aguilar -- vivian@viaro.net

   Desing and Development

3. Anny Flores -- annyflores@viaro.net

   Development and Documentation