|
|
|
@ -29,6 +29,15 @@ function updateFlashVar() |
|
|
|
|
flashVar++; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* Save the results of the positioning of a point by the user on top of |
|
|
|
|
* the answer area. |
|
|
|
|
* @param int Question ID |
|
|
|
|
* @param int ID of the area (square or ellipse) |
|
|
|
|
* @param int Whether the answer is correct or not |
|
|
|
|
* @param int X-coordinate (horizontal) of the answer point |
|
|
|
|
* @param int Y-coordinate (vertical) of the answer point
|
|
|
|
|
*/ |
|
|
|
|
function saveHotspot(question_id, hotspot_id, answer, hotspot_x, hotspot_y) |
|
|
|
|
{ |
|
|
|
|
newHotspot = document.createElement("input"); |
|
|
|
@ -43,13 +52,20 @@ function saveHotspot(question_id, hotspot_id, answer, hotspot_x, hotspot_y) |
|
|
|
|
newHotspot.value = answer;
|
|
|
|
|
document.frm_exercise.appendChild(newHotspot); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* Save the results of the positioning of a point by the user on top of |
|
|
|
|
* the answer area ( for polygons and delineation ) |
|
|
|
|
* @param int Question ID |
|
|
|
|
* @param int ID of the area (square or ellipse) |
|
|
|
|
* @param int Whether the answer is correct or not |
|
|
|
|
* @param array Coordinates (horizontal+vertical) of the answer points, in an array |
|
|
|
|
*/ |
|
|
|
|
function saveDelineationUserAnswer(question_id, hotspot_id, answer, coordinates) |
|
|
|
|
{ |
|
|
|
|
newHotspot = document.createElement("input"); |
|
|
|
|
newHotspot.type = "hidden"; |
|
|
|
|
newHotspot.name = "hotspot["+question_id+"]["+hotspot_id+"]"; |
|
|
|
|
newHotspot.value = coordinates;
|
|
|
|
|
newHotspot.value = coordinates; |
|
|
|
|
document.frm_exercise.appendChild(newHotspot); |
|
|
|
|
|
|
|
|
|
newHotspot = document.createElement("input"); |
|
|
|
|