Index: lams_central/web/authoring/template/comms.jsp =================================================================== diff -u -r7b42f38a8e33a8823bc93a5e797ab50db4600385 -r4972b394013bef3bc563652df80d9c2dbb04e238 --- lams_central/web/authoring/template/comms.jsp (.../comms.jsp) (revision 7b42f38a8e33a8823bc93a5e797ab50db4600385) +++ lams_central/web/authoring/template/comms.jsp (.../comms.jsp) (revision 4972b394013bef3bc563652df80d9c2dbb04e238) @@ -292,6 +292,26 @@ }); } + function createPeerReviewCriteria() { + var currNum = $('#numRatingCriterias').val(); + var nextNum = +currNum + 1; + var newDiv = document.createElement("div"); + newDiv.id = 'divrating'+nextNum; + newDiv.className = 'space-top'; + var url=getSubmissionURL()+"?method=createRatingCriteria&criteriaNumber="+nextNum; + $('#divratings').append(newDiv); + $.ajaxSetup({ cache: true }); + $(newDiv).load(url, function( response, status, xhr ) { + if ( status == "error" ) { + console.log( xhr.status + " " + xhr.statusText ); + newDiv.remove(); + } else { + $('#numRatingCriterias').val(nextNum); + newDiv.scrollIntoView(); + } + }); + } + function testURL(urlField) { launchPopup($('#'+urlField).val(),'popupUrl'); }