* Array of optional table fields, must start with 'id'.
     * @var array $required_fields
     */
    public $optional_fields = array();
    /**
	* evalcomix ID associated
	* @var int $evxid
	*/
    public $evxid;
    /**
	* Tool title
	* @var string $title
	*/
    public $title;
    /**
	* Tool type
	* @var string $type
	*/
    public $type;
    /**
	* ID of Web tool
	* @var string $idtool
 global $CFG;
 $serverurl = GET_TOOLS . '?format=xml';
 if (!isset($params['courseid']) || !isset($params['module']) || !isset($params['activity']) || !isset($params['student']) || !isset($params['assessor']) || !isset($params['mode']) || !isset($params['lms'])) {
     throw new Exception('Missing Params');
 }
 $countModules = count($params['module']);
 $countActivities = count($params['activity']);
 $countStudents = count($params['student']);
 $countAssessors = count($params['mode']);
 if ($countModules != $countActivities || $countStudents != $countAssessors) {
     throw new Exception('Wrong Params');
 }
 $xml = '<assessments>';
 $courseid = $params['courseid'];
 $lms = $params['lms'];
 for ($i = 0; $i < $countModules; ++$i) {
     $xml .= '<assessment>';
     $module = $params['module'][$i];
     $activity = $params['activity'][$i];
     $student = $params['student'][$i];
     $assessor = $params['assessor'][$i];
     $mode = $params['mode'][$i];
     $str = $courseid . '_' . $module . '_' . $activity . '_' . $student . '_' . $assessor . '_' . $mode . '_' . $lms;
     $assessmentid = md5($str);
     $xml .= $assessmentid;