Managing Scoring Rules

A scoring rule defines the list of answers used to calculate the value of an assessment characteristic. It also provides the macro enabling calculation.
Each assessed characteristic can be connected to several scoring rules.
A scoring rule can be connected to a macro enabling calculation of values of assessed characteristics. In this case, the definition of a scoring rule consists of two steps:
• Creating scoring rules
• Using Macros
Creating scoring rules
To create a scoring rule:
1. Open a questionnaire template properties.
2. Click New to create a scoring rule.
3. Specify the Name of the scoring rule.
4. Select the characteristics of the object this rule applies to.
5. (optional) Select the questions to use in the computation.
6. Specify the logic of the scoring rule
• Answer value
This type of scoring rule avoids having to use a macro. It is a kind of generic macro which is used in simple cases.
• Macro
In the Select a macro field, connect the macro calculating the assessed characteristic value.

This field appears only if you selected "Macro".

For more details on creation of macros defining scoring rules, see
Using macros.
Using macros
It is possible to calculate an assessed characteristic value via a macro.

For more information on how to use
HOPEX macros, see
All about starting with APIs.
Creating a macro
To create a macro:
1. Open the properties of the scoring rule.
2. Click the arrow on the extreme right of the Select a macro field and click Create.
The macro creation wizard opens.
3. Select the check box corresponding to the type of macro you want to use:
• Create a (VB)script macro
• Create a Java macro
• Create a C# Macro
• Use an existing macro
• Create a component-based macro
4. Click Next.
5. If the macro you have created can be reused for another scoring rule, select the Reusable box.
6. Click OK.
Implementation
This macro should define a method called “compute" and have the following signature:
Sub compute(mgobjScoringRule As MegaObject, mgobjValueContext As MegaObject, mgcolAnswers As MegaCollection , mgobjAssessedValue As MegaObject)
End Sub
List of arguments:
• mgobjScoringRule: current scoring rule.
• mgobjAssessedValue: assessed characteristic value to be computed.
• mgobjValueContext: assessment node of current assessed characteristic value.
• mgcolAnswers: list of answers used to compute the assessed characteristic value.