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:
2. Expand the tree and open the questionnaire template properties.
3. Click New to create a scoring rule.
4. Specify the Name of the scoring rule.
5. Select the characteristics of the object this rule applies to.
6. (optional) Select the questions to use in the computation.
7. 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.
Implementing the macro
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.