Index: lams_tool_assessment/conf/language/lams/ApplicationResources.properties =================================================================== RCS file: /usr/local/cvsroot/lams_tool_assessment/conf/language/lams/ApplicationResources.properties,v diff -u -r1.34.2.13 -r1.34.2.14 --- lams_tool_assessment/conf/language/lams/ApplicationResources.properties 11 Dec 2016 01:03:16 -0000 1.34.2.13 +++ lams_tool_assessment/conf/language/lams/ApplicationResources.properties 27 Feb 2017 11:24:12 -0000 1.34.2.14 @@ -241,6 +241,7 @@ authoring.import.instruction =Please choose questions to import. button.select.importfile =Select file to import msg.import.file.format =The import file must be .xml file exported from assessment tool. +error.import.file.format =The import file is not an .xml file. label.import.file =Import xml file button.import =Import label.authoring.basic.import.questions =Import Index: lams_tool_assessment/web/WEB-INF/tags/AuthoringButton.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_assessment/web/WEB-INF/tags/AuthoringButton.tag,v diff -u -r1.14.2.2 -r1.14.2.3 --- lams_tool_assessment/web/WEB-INF/tags/AuthoringButton.tag 13 Dec 2016 04:16:02 -0000 1.14.2.2 +++ lams_tool_assessment/web/WEB-INF/tags/AuthoringButton.tag 27 Feb 2017 11:24:12 -0000 1.14.2.3 @@ -123,7 +123,7 @@ }
- + Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_tool_assessment/web/WEB-INF/tags/FileUpload.tag'. Fisheye: No comparison available. Pass `N' to diff? Fisheye: Tag 1.1 refers to a dead (removed) revision in file `lams_tool_assessment/web/WEB-INF/tags/WaitingSpinner.tag'. Fisheye: No comparison available. Pass `N' to diff? Index: lams_tool_assessment/web/WEB-INF/tlds/lams/lams.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_assessment/web/WEB-INF/tlds/lams/lams.tld,v diff -u -r1.7.2.8 -r1.7.2.9 --- lams_tool_assessment/web/WEB-INF/tlds/lams/lams.tld 25 Nov 2016 17:08:53 -0000 1.7.2.8 +++ lams_tool_assessment/web/WEB-INF/tlds/lams/lams.tld 27 Feb 2017 11:24:12 -0000 1.7.2.9 @@ -529,5 +529,13 @@ CommentsAuthor /WEB-INF/tags/CommentsAuthor.tag + + FileUpload + /WEB-INF/tags/FileUpload.tag + + + WaitingSpinner + /WEB-INF/tags/WaitingSpinner.tag + Index: lams_tool_assessment/web/pages/authoring/importQuestions.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_assessment/web/pages/authoring/importQuestions.jsp,v diff -u -r1.3.2.2 -r1.3.2.3 --- lams_tool_assessment/web/pages/authoring/importQuestions.jsp 1 Jun 2016 14:05:16 -0000 1.3.2.2 +++ lams_tool_assessment/web/pages/authoring/importQuestions.jsp 27 Feb 2017 11:24:12 -0000 1.3.2.3 @@ -14,18 +14,34 @@ } function verifyAndSubmit() { - if (document.getElementById("UPLOAD_FILE").value.length == 0) { + debugger; + var filename = document.getElementById("UPLOAD_FILE").value; + if (filename.length == 0) { var msg = ""; alert(msg); return (false); } else { - var options = { - target: parent.jQuery('#questionListArea'), - success: afterRatingSubmit // post-submit callback - }; - - $('#importForm').ajaxSubmit(options); + if ( filename ) { + var msg = ''; + var extname = filename.substr((~-filename.lastIndexOf(".") >>> 0) + 2); + if ( extname.length == 0) { + alert(msg); + return (false); + } else { + extname = extname.toUpperCase(); + if ( "XML" != extname) { + alert(msg); + return (false); + } + } + } + } + var options = { + target: parent.jQuery('#questionListArea'), + success: afterRatingSubmit // post-submit callback + }; + $('#importForm').ajaxSubmit(options); } // post-submit callback function afterRatingSubmit(responseText, statusText) { @@ -52,16 +68,15 @@

?sessionMapID=${sessionMapID}" method="post" enctype="multipart/form-data" id="importForm"> -
- - -
+ - - - +
+ + +   + +