pull/3063/head
jmontoyaa 8 years ago
parent 1a3e5c752f
commit e62face7db
  1. 14
      main/exercise/multiple_answer_true_false.class.php
  2. 33
      main/exercise/question_list_admin.inc.php

@ -303,7 +303,7 @@ class MultipleAnswerTrueFalse extends Question
$objAnswer->save();
// sets the total weighting of the question
$this->updateWeighting($questionWeighting);
$this->save();
$this->save($exercise);
}
/**
@ -318,12 +318,12 @@ class MultipleAnswerTrueFalse extends Question
<th width="15%">'. get_lang("ExpectedChoice").'</th>
<th>'. get_lang("Answer").'</th>';
$header .= '<th>'.get_lang('Status').'</th>';
if ($exercise->feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
$header .= '<th>'.get_lang("Comment").'</th>';
} else {
$header .= '<th>&nbsp;</th>';
}
if ($exercise->feedback_type != EXERCISE_FEEDBACK_TYPE_EXAM) {
$header .= '<th>'.get_lang("Comment").'</th>';
} else {
$header .= '<th>&nbsp;</th>';
}
$header .= '</tr>';
return $header;
}
}
}

@ -27,8 +27,7 @@ if ($deleteQuestion) {
// destruction of the Question object
unset($objQuestionTmp);
}
$ajax_url = api_get_path(WEB_AJAX_PATH)."exercise.ajax.php?".api_get_cidreq()
."&exercise_id=".intval($exerciseId);
$ajax_url = api_get_path(WEB_AJAX_PATH)."exercise.ajax.php?".api_get_cidreq()."&exercise_id=".intval($exerciseId);
?>
<div id="dialog-confirm"
title="<?php echo get_lang("ConfirmYourChoice"); ?>"
@ -125,21 +124,21 @@ $ajax_url = api_get_path(WEB_AJAX_PATH)."exercise.ajax.php?".api_get_cidreq()
});
}
})
.sortable({
cursor: "move", // works?
update: function (event, ui) {
var order = $(this).sortable("serialize") + "&a=update_question_order&exercise_id=<?php echo intval($_GET['exerciseId']); ?>";
$.post("<?php echo $ajax_url ?>", order, function (reponse) {
$("#message").html(reponse);
});
},
axis: "y",
placeholder: "ui-state-highlight", //defines the yellow highlight
handle: ".moved", //only the class "moved"
stop: function () {
stop = true;
}
});
.sortable({
cursor: "move", // works?
update: function (event, ui) {
var order = $(this).sortable("serialize") + "&a=update_question_order&exercise_id=<?php echo $exerciseId; ?>";
$.post("<?php echo $ajax_url ?>", order, function (reponse) {
$("#message").html(reponse);
});
},
axis: "y",
placeholder: "ui-state-highlight", //defines the yellow highlight
handle: ".moved", //only the class "moved"
stop: function () {
stop = true;
}
});
});
</script>
<?php

Loading…
Cancel
Save