Computing the final mark

The calculation of the final mark is processed in the following way:

Indicating with i the question number i, we define:

- n = number of questions
- minMark = minimum mark
- maxMark = maximum mark
- pi = weight of question number i; a number between 1 and 99
- fi = valuation of question number i; a real number between 0 and 1, so computed:

  * questions with multiple answer (or multiple choice)
    (of right or wrong type): 

    fi=0 or fi=1

  * questions with answer true or false, or
    gap filling exercises, or
    questions with matching words

                guess sentences/words
    fi = -------------------------------------
         total number of guess sentences/words

- S = p1 + p2 + ... + pn   ;   weight sum
- F = p1*f1 + p2*f2 + .... + pn*fn 

the final mark is computed as:

                                F * (maxMark - minMark)
             mark = minMark + --------------------------
                                         S


Mark rounding rule

If mark round is different from 1, the final mark is rounded to the nearest mark fraction.
Here some examples:

Round 1 / 2 = (0.5)
In a range from 0 to 10, the marks are:

0; 0.5; 1; 1.5; 2; 2.5; 3; 3.5 ..... 9; 9.5; 10

The rule is:
·     If the decimal part of a mark is less then 0.25, the mark will be rounded to lower integer;
·     if the decimal part of a mark is between 0.25 and 0.75, it will be rounded to 0.5;
·     if the decimal part of a mark is more than 0.75, it will be rounded to upper integer.

Round 1 / 4 = (0.25)
In a range from 0 to 10, the marks are:

0; 0.25; 0.5; 0.75; 1; 1.25; 1.5; 1.75; 2; 2.25; 2.5; 2.75; 3; 3.25; 3.5 ..... 9; 9.25; 9.5; 9.75; 10

The rule is:
·     If the decimal part of a mark is less then 0.125, the mark will be rounded to lower integer;
·     if the decimal part of a mark is between 0.125 and 0.375, it will be rounded to 0.25;
·     if the decimal part of a mark is between 0.375 e 0.625, it will be rounded to 0.5;
·     if the decimal part of a mark is between 0.625 e 0.875, it will be rounded to 0.75;
·     if the decimal part of a mark is more than 0.875, it will be rounded to upper integer.