diff --git a/problem.html b/problem.html index 6196f7998c..6e003ca7c0 100644 --- a/problem.html +++ b/problem.html @@ -9,3 +9,6 @@ % if save_button: % endif +% if answer_available: + +% endif diff --git a/problem.js b/problem.js index f72d5b6276..f003d0cd82 100644 --- a/problem.js +++ b/problem.js @@ -22,6 +22,13 @@ function ${ id }_load() { }); } }); + $('#show_${ id }').click(function() { + $.getJSON('/modx/problem/${ id }/problem_show', function(data) { + for (var key in data) { + $("#answer_${ id }_"+key).text(data[key]); + } + }); + }); $('#save_${ id }').click(function() { var submit_data={}; $.each($("[id^=input_${ id }_]"), function(index,value){