GET -> POST
This commit is contained in:
@@ -9,7 +9,7 @@ function ${ id }_load() {
|
||||
$.each($("[id^=input_${ id }_]"), function(index,value){
|
||||
submit_data[value.id]=value.value;
|
||||
});
|
||||
$.getJSON('/modx/problem/${ id }/problem_check',
|
||||
postJSON('/modx/problem/${ id }/problem_check',
|
||||
submit_data,
|
||||
function(json) {
|
||||
${ id }_load();
|
||||
@@ -23,14 +23,14 @@ function ${ id }_load() {
|
||||
submit_data[value.id]=value.value;
|
||||
});
|
||||
|
||||
$.getJSON('/modx/problem/${ id }/problem_reset', {'id':'${ id }'}, function(json) {
|
||||
postJSON('/modx/problem/${ id }/problem_reset', {'id':'${ id }'}, function(json) {
|
||||
${ id }_load();
|
||||
});
|
||||
log_event('problem_reset', submit_data);
|
||||
});
|
||||
|
||||
$('#show_${ id }').click(function() {
|
||||
$.getJSON('/modx/problem/${ id }/problem_show', function(data) {
|
||||
postJSON('/modx/problem/${ id }/problem_show', function(data) {
|
||||
for (var key in data) {
|
||||
$("#answer_${ id }_"+key).text(data[key]);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ function ${ id }_load() {
|
||||
var submit_data={};
|
||||
$.each($("[id^=input_${ id }_]"), function(index,value){
|
||||
submit_data[value.id]=value.value;});
|
||||
$.getJSON('/modx/problem/${ id }/problem_save',
|
||||
postJSON('/modx/problem/${ id }/problem_save',
|
||||
submit_data, function(data){
|
||||
if(data.success) {
|
||||
alert('Saved');
|
||||
|
||||
Reference in New Issue
Block a user