Skip to content
Snippets Groups Projects
Commit 26d09ede authored by Tom Käsler's avatar Tom Käsler Committed by Andreas Gärtner
Browse files

change file name to <sessionShortName>_<subject>.json

change type to application/json
parent 27131212
No related merge requests found
This commit is part of merge request !39. Comments created here will be created in the context of that merge request.
......@@ -147,10 +147,10 @@ Ext.define("ARSnova.controller.QuestionExport", {
});
},
saveClickQuestionOnFileSystem: function (questionObj) {
saveClickQuestionOnFileSystem: function (questionObj, questionSubject) {
var rawJson = JSON.stringify(questionObj);
var blob = new Blob([rawJson], {type: "text/plain;charset=utf-8"});
this.makeAndClickDownloadLink(blob, "ARSnovaClickQuestion");
var blob = new Blob([rawJson], {type: "application/json;charset=utf-8"});
this.makeAndClickDownloadLink(blob, localStorage.getItem('shortName') + "_" + questionSubject + ".json");
},
parseJsonToCsv: function (records) {
......
......@@ -143,7 +143,7 @@ Ext.define('ARSnova.view.speaker.ShowcaseEditButtons', {
handler: function () {
var questionExportController = ARSnova.app.getController('QuestionExport');
var clickQuestionObject = questionExportController.exportQuestionToClick(this.questionObj);
questionExportController.saveClickQuestionOnFileSystem(clickQuestionObject);
questionExportController.saveClickQuestionOnFileSystem(clickQuestionObject, this.questionObj.subject);
}
});
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment