fix issue editing questions in question banks
fixes CNVS-11006 test plan: - as a teacher - create a question bank with more than 50 questions - edit a question - it should successfully edit the question without adding a new question to the bank - do a regression test around creating and editing questions both in and outside of question banks Change-Id: Iba765cf3b5c5b2687a012e44592e47d8e3ec6716 Reviewed-on: https://gerrit.instructure.com/40260 Tested-by: Jenkins <jenkins@instructure.com> Reviewed-by: Josh Simpson <jsimpson@instructure.com> QA-Review: Trevor deHaan <tdehaan@instructure.com> Product-Review: Derek DeVries <ddevries@instructure.com>
This commit is contained in:
parent
26e7d708b7
commit
ed6acb3e83
|
@ -2841,6 +2841,17 @@ define([
|
|||
$question.find(".question_points").text(questionData.points_possible);
|
||||
quiz.updateDisplayQuestion($question.find(".display_question"), questionData, true);
|
||||
if ($teaser.hasClass('to_edit')) {
|
||||
// we need to explicity set our quiz variables in the dom
|
||||
// or this appears to be adding a new question instead of editing
|
||||
var ques = $question.find(".question");
|
||||
var link = $question.find("a.update_question_url");
|
||||
var qId = $question.find(".assessment_question_id")
|
||||
var href = link.attr('href');
|
||||
|
||||
ques.attr("id", "question_" + question_data.id);
|
||||
link.attr("href", href.replace(/ions\/.*/, "ions/" + question_data.id));
|
||||
qId.html(question_data.id);
|
||||
|
||||
$question.find(".edit_question_link").click();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue