HttpSession
temporarily. Only they will be persist when the entire authoring page is being
* persisted.
*/
- @RequestMapping("/saveOrUpdateQuestion")
+ @RequestMapping(path = "/saveOrUpdateQuestion", method = RequestMethod.POST)
public String saveOrUpdateQuestion(@ModelAttribute("assessmentQuestionForm") QbQuestionForm form,
HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
-
//find according question
QbQuestion qbQuestion = null;
Long oldQuestionUid = null;
Index: lams_central/src/java/org/lamsfoundation/lams/web/qb/ImsQtiController.java
===================================================================
diff -u -r15e26ff93a8345fa88a194d9344d97870247b63c -r21555f88fd0c63a4a9eb3ae288a2e1d48452aa4b
--- lams_central/src/java/org/lamsfoundation/lams/web/qb/ImsQtiController.java (.../ImsQtiController.java) (revision 15e26ff93a8345fa88a194d9344d97870247b63c)
+++ lams_central/src/java/org/lamsfoundation/lams/web/qb/ImsQtiController.java (.../ImsQtiController.java) (revision 21555f88fd0c63a4a9eb3ae288a2e1d48452aa4b)
@@ -27,10 +27,13 @@
import org.lamsfoundation.lams.util.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.ResponseStatus;
/**
* Exports and imports IMS QTI questions.
@@ -55,7 +58,7 @@
/**
* Parses questions extracted from IMS QTI file and adds them as new QB questions.
*/
- @RequestMapping(path = "/saveQTI", produces = "text/plain")
+ @RequestMapping(path = "/saveQTI", produces = "text/plain", method = RequestMethod.POST)
@ResponseBody
public String saveQTI(HttpServletRequest request, @RequestParam long collectionUid,
@RequestParam(defaultValue = "") String contentFolderID) throws UnsupportedEncodingException {
@@ -356,31 +359,31 @@
/**
* Exports QB question as IMS QTI package.
*/
- @RequestMapping("/exportQuestionAsQTI")
- public String exportQuestionAsQTI(HttpServletRequest request, HttpServletResponse response,
+ @RequestMapping(path = "/exportQuestionAsQTI", method = RequestMethod.POST)
+ @ResponseStatus(HttpStatus.OK)
+ public void exportQuestionAsQTI(HttpServletRequest request, HttpServletResponse response,
@RequestParam long qbQuestionUid) {
QbQuestion qbQuestion = qbService.getQuestionByUid(qbQuestionUid);
List