added html tags for show_answer

This commit is contained in:
Lyla Fischer
2012-04-28 20:41:49 -04:00
parent 08d789d963
commit 4bbce591a0

View File

@@ -51,7 +51,13 @@ function ${ id }_load() {
$('#show_${ id }').click(function() {
postJSON('/modx/problem/${ id }/problem_show', {}, function(data) {
for (var key in data) {
$("#answer_"+key).text(data[key]);
if ($.isArray(data[key])){
for (var ans_index in data[key]){
var choice_id = 'input_'+key+'_'+data[key][ans_index];
$("label[for="+choice_id+"]").attr("correct_answer", "true");
}
}
$("#answer_"+key).text(data[key]);
}
});