...
 
Commits (36)
# Changelog
## 2.7
Features:
* Users can now delete their own account through the settings panel.
* Admins can now delete any account or session through the settings panel.
Improvements:
* CSV Export: A settings panel has been added. Semicolon and tab can be used
as separator. An Excel-specific header can be added to improve compatibilty.
* The ability to set custom icons for authentication services via backend
configuration has been restored.
* Export/import functionality is no longer disabled for iOS.
Bug fixes:
* The flip animation for flashcards has been disabled to fix rendering issues in
some browsers.
* CSV export now works for flashcards.
* Cloning of sessions from the public pool has been fixed.
Known issues:
* CSV import is not supported for flashcards.
**This version is brought to you by:**
Project management: Klaus Quibeldey-Cirkel
Lead programming: Daniel Gerhardt, Tom "tekay" Käsler
Sponsoring: [AG QLS](https://www.thm.de/site/en/hochschule/service/ag-qls.html),
[HMWK](https://wissenschaft.hessen.de/wissenschaft/it-neue-medien/kompetenznetz-e-learning-hessen)
## 2.6.1
Improvements:
* The web font is now included so modern browsers should no longer fall back to
......
......@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.thm.arsnova</groupId>
<artifactId>arsnova-mobile</artifactId>
<version>2.7.0-SNAPSHOT</version>
<version>2.8.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>ARSnova Mobile</name>
......
# Required metadata
sonar.projectKey=de.thm.arsnova:arsnova-mobile
sonar.projectName=arsnova-mobile
sonar.projectVersion=2.7-SNAPSHOT
sonar.projectVersion=2.8-SNAPSHOT
# Comma-separated paths to directories with sources (required)
sonar.sources=src/main/webapp/app
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -122,7 +122,6 @@ Ext.define('ARSnova.WebSocket', {
}, this));
this.socket.on('activeUserCountData', Ext.bind(function (data) {
console.debug("Socket.IO: activeUserCountData", data);
this.fireEvent("arsnova/socket/activeusercount/update", data);
}, this));
......@@ -135,7 +134,6 @@ Ext.define('ARSnova.WebSocket', {
return;
}
console.debug("Socket.IO: feedbackData", data);
this.fireEvent("arsnova/socket/feedback/update", data);
}, this));
......@@ -147,17 +145,14 @@ Ext.define('ARSnova.WebSocket', {
return;
}
console.debug("Socket.IO: feedbackDataRoundedAverage", average);
this.fireEvent(this.events.feedbackAverage, average);
}, this));
this.socket.on('feedbackReset', Ext.bind(function (affectedSessions) {
console.debug("Socket.IO: feedbackReset", affectedSessions);
this.fireEvent(this.events.feedbackReset, affectedSessions);
}, this));
this.socket.on('lockFeedback', Ext.bind(function (lock) {
console.debug("Socket.IO: lockFeedback", lock);
this.fireEvent(this.events.lockFeedback, lock);
}, this));
......@@ -167,108 +162,87 @@ Ext.define('ARSnova.WebSocket', {
}, this));
this.socket.on('endPiRound', Ext.bind(function (questionId) {
console.debug("Socket.IO: endPiRound", questionId);
this.fireEvent(this.events.endPiRound, questionId);
}, this));
this.socket.on('cancelPiRound', Ext.bind(function (questionId) {
console.debug("Socket.IO: cancelPiRound", questionId);
this.fireEvent(this.events.cancelPiRound, questionId);
}, this));
this.socket.on('resetPiRound', Ext.bind(function (questionId) {
console.debug("Socket.IO: resetPiRound", questionId);
this.fireEvent(this.events.resetPiRound, questionId);
}, this));
this.socket.on('startDelayedPiRound', Ext.bind(function (object) {
console.debug("Socket.IO: startDelayedPiRound", object);
this.fireEvent(this.events.startDelayedPiRound, object);
}, this));
this.socket.on('lecturerQuestionAvailable', Ext.bind(function (questions) {
console.debug("Socket.IO: lecturerQuestionAvailable", questions);
this.fireEvent(this.events.lecturerQuestionAvailable, questions);
}, this));
this.socket.on('lecturerQuestionLocked', Ext.bind(function (questions) {
console.debug("Socket.IO: lecturerQuestionLocked", questions);
this.fireEvent(this.events.lecturerQuestionLocked, questions);
}, this));
this.socket.on('lockVote', Ext.bind(function (object) {
console.debug("Socket.IO: lockVote", object);
this.fireEvent(this.events.lockVote, object);
}, this));
this.socket.on('lockVotes', Ext.bind(function (object) {
console.debug("Socket.IO: lockVotes", object);
this.fireEvent(this.events.lockVotes, object);
}, this));
this.socket.on('unlockVote', Ext.bind(function (object) {
console.debug("Socket.IO: unlockVote", object);
this.fireEvent(this.events.unlockVote, object);
}, this));
this.socket.on('unlockVotes', Ext.bind(function (object) {
console.debug("Socket.IO: unlockVotes", object);
this.fireEvent(this.events.unlockVotes, object);
}, this));
this.socket.on('audQuestionAvail', Ext.bind(function (questionId) {
console.debug("Socket.IO: audQuestionAvail", questionId);
this.fireEvent(this.events.audienceQuestionAvailable, questionId);
}, this));
this.socket.on('unansweredLecturerQuestions', Ext.bind(function (questionIds) {
console.debug("Socket.IO: unansweredLecturerQuestions", questionIds);
this.memoization[this.events.unansweredLecturerQuestions] = questionIds;
this.fireEvent(this.events.unansweredLecturerQuestions, questionIds);
}, this));
this.socket.on('unansweredPreparationQuestions', Ext.bind(function (questionIds) {
console.debug("Socket.IO: unansweredPreparationQuestions", questionIds);
this.fireEvent(this.events.unansweredPreparationQuestions, questionIds);
}, this));
this.socket.on('countQuestionAnswersByQuestionId', Ext.bind(function (object) {
console.debug("Socket.IO: countQuestionAnswersByQuestionId", object);
this.fireEvent(this.events.countQuestionAnswersByQuestionId, object);
}, this));
this.socket.on('countLectureQuestionAnswers', Ext.bind(function (count) {
console.debug("Socket.IO: countLectureQuestionAnswers", count);
this.fireEvent(this.events.countLectureQuestionAnswers, count);
}, this));
this.socket.on('countPreparationQuestionAnswers', Ext.bind(function (count) {
console.debug("Socket.IO: countPreparationQuestionAnswers", count);
this.fireEvent(this.events.countPreparationQuestionAnswers, count);
}, this));
this.socket.on('countFlashcards', Ext.bind(function (count) {
console.debug("Socket.IO: countFlashcards", count);
this.fireEvent(this.events.countFlashcards, count);
}, this));
this.socket.on('flipFlashcards', Ext.bind(function (flip) {
console.debug("Socket.IO: flipFlashcards", flip);
this.fireEvent(this.events.flipFlashcards, flip);
}, this));
this.socket.on('learningProgressOptions', Ext.bind(function (options) {
console.debug("Socket.IO: learningProgressOptions", options);
this.fireEvent(this.events.learningProgressOptions, options);
}, this));
this.socket.on('featureChange', Ext.bind(function (features) {
console.debug("Socket.IO: featureChange", features);
this.fireEvent(this.events.featureChange, features);
}, this));
this.socket.on('learningProgressChange', Ext.Function.createBuffered(function () {
console.debug("Socket.IO: learningProgressChange");
this.fireEvent(this.events.learningProgressChange);
}, 500, this));
}, this));
......@@ -276,27 +250,22 @@ Ext.define('ARSnova.WebSocket', {
setSession: function (sessionKey) {
var data = {keyword: sessionKey};
console.debug("Socket.IO.emit: setSession", data);
this.socket.emit("setSession", data);
},
readInterposedQuestion: function (question) {
console.debug("Socket.IO.emit: readInterposedQuestion", question.getData());
this.socket.emit("readInterposedQuestion", question.getData());
},
readFreetextAnswer: function (answer) {
console.debug("Socket.IO.emit: readFreetextAnswer", answer._id);
this.socket.emit("readFreetextAnswer", answer._id);
},
setLearningProgressOptions: function (data) {
console.debug("Socket.IO.emit: setLearningProgressOptions", data);
this.socket.emit("setLearningProgressOptions", data);
},
setFeedback: function (data) {
console.debug("Socket.IO.emit: setFeedback", data);
this.socket.emit("setFeedback", data);
},
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -21,16 +21,11 @@ Ext.define("ARSnova.controller.FlashcardExport", {
suitableTypes: ['flashcard', 'mc', 'abcd', 'yesno', 'freetext'],
filename: function (format) {
var filename = 'flashcards' + this.getActualDate() + '.' + format;
return filename;
filename: function () {
return 'arsnova-flashcards-' + moment().format('YYYYMMDDHHmm') + '.csv';
},
getActualDate: function () {
return ARSnova.app.getController('QuestionExport').getActualDate();
},
exportFlashcards: function (controller, format) {
exportFlashcards: function (controller, format, delimiter, excel) {
var me = this;
format = format === 'csv' ? 'csv' : 'json';
controller.getQuestions(sessionStorage.getItem('keyword'), {
......@@ -38,8 +33,10 @@ Ext.define("ARSnova.controller.FlashcardExport", {
var resp = Ext.decode(response.responseText);
var flashcards = me.preparseFlashcards(resp, format);
var data = format !== 'csv' ? me.stringifyJson(flashcards) :
ARSnova.utils.CsvUtil.jsonToCsv(flashcards);
ARSnova.utils.CsvUtil.jsonToCsv(flashcards, delimiter);
if (excel && format === 'csv') {
data = 'sep=' + delimiter + '\r\n' + data;
}
me.saveFileOnFileSystem(data, me.filename(format), format);
}
});
......@@ -81,6 +78,7 @@ Ext.define("ARSnova.controller.FlashcardExport", {
parseBackPage: function (questionData) {
switch (questionData.questionType) {
case 'flashcard':
case 'mc':
case 'abcd':
case 'yesno':
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -19,9 +19,8 @@
Ext.define("ARSnova.controller.QuestionExport", {
extend: 'Ext.app.Controller',
filename: function () {
var filename = 'lectureQuestions' + this.getActualDate() + '.csv';
return filename;
filename: function (name) {
return 'arsnova-' + name + '-' + moment().format('YYYYMMDDHHmm') + '.csv';
},
exportCsvFile: function (json) {
......@@ -39,15 +38,6 @@ Ext.define("ARSnova.controller.QuestionExport", {
});
},
getActualDate: function () {
var d = new Date();
return ('0' + d.getFullYear()).slice(-2) + '-'
+ ('0' + (d.getMonth() + 1)).slice(-2) + '-'
+ ('0' + d.getDate()).slice(-2) + '-'
+ ('0' + d.getHours()).slice(-2) + '-'
+ ('0' + d.getMinutes()).slice(-2);
},
getOption: function (answer, type) {
if (answer && type !== 'yesno') {
return answer.text;
......@@ -148,79 +138,43 @@ Ext.define("ARSnova.controller.QuestionExport", {
});
},
saveClickQuestionOnFileSystem: function (questionObj, questionSubject) {
var rawJson = JSON.stringify(questionObj);
var blob = new Blob([rawJson], {type: "application/json;charset=utf-8"});
this.makeAndClickDownloadLink(blob, localStorage.getItem('shortName') + "_" + questionSubject + ".json");
},
parseJsonToCsv: function (records, delimiter, excel) {
var preparsedQuestion = this.preparseJsontoCsv(records);
var csv = ARSnova.utils.CsvUtil.jsonToCsv(preparsedQuestion, delimiter);
if (excel) {
csv = 'sep=' + delimiter + '\r\n' + csv;
}
this.saveFileOnFileSystem(csv, this.filename());
this.saveFileOnFileSystem(csv, this.filename("contents"));
},
downloadQuestionAnswers: function (questionObj, answers) {
downloadQuestionAnswers: function (questionObj, answers, delimiter, excel) {
var header, rows = [];
if (questionObj.questionType === 'freetext') {
header = Messages.QUESTION_DATE + "," + Messages.QUESTIONS_CSV_EXPORT_ANSWERS_TIME + "," + Messages.QUESTIONS_CSV_EXPORT_ANSWERS_SUBJECT + "," + Messages.FREETEXT_DETAIL_ANSWER + ",Timestamp";
rows.push([
Messages.QUESTION_DATE,
Messages.QUESTIONS_CSV_EXPORT_ANSWERS_TIME,
Messages.QUESTIONS_CSV_EXPORT_ANSWERS_SUBJECT,
Messages.FREETEXT_DETAIL_ANSWER,
"Timestamp"]);
answers.each(function (record) {
rows.push([record.get('groupDate'), record.get('formattedTime'), record.get('answerSubject'), record.get('answerText'), record.get('timestamp')]);
});
} else {
header = Messages.ANSWERS + ","
+ Messages.FIRST_ROUND + " " + Messages.GRID_LABEL_RELATIVE + "," + Messages.FIRST_ROUND + " " + Messages.GRID_LABEL_ABSOLUTE + ","
+ Messages.SECOND_ROUND + " " + Messages.GRID_LABEL_RELATIVE + "," + Messages.SECOND_ROUND + " " + Messages.GRID_LABEL_ABSOLUTE;
rows.push([
Messages.ANSWERS,
Messages.FIRST_ROUND + " " + Messages.GRID_LABEL_RELATIVE,
Messages.FIRST_ROUND + " " + Messages.GRID_LABEL_ABSOLUTE,
Messages.SECOND_ROUND + " " + Messages.GRID_LABEL_RELATIVE,
Messages.SECOND_ROUND + " " + Messages.GRID_LABEL_ABSOLUTE]);
answers.each(function (record) {
rows.push([record.get('text'), record.get('percent-round1'), record.get('value-round1'), record.get('percent-round2'), record.get('value-round2')]);
});
}
var csv = ARSnova.utils.CsvUtil.jsonToCsv(rows);
this.saveFileOnFileSystem(header + "\n" + csv, "answer-stats-" + this.getActualDate() + ".csv");
},
parseAnswerOptionsForClick: function (question) {
var clickAnswerOptions = [];
if (question.questionType === "freetext" && question.fixedAnswer) {
clickAnswerOptions.push({
hashtag: "ImportFromARSnova",
questionIndex: 0,
answerText: question.correctAnswer,
answerOptionNumber: 0,
configCaseSensitive: !question.ignoreCaseSensitive,
configTrimWhitespaces: !question.ignoreWhiteSpaces,
configUsePunctuation: !question.ignorePunctuation,
configUseKeywords: true,
type: "FreeTextAnswerOption"
});
} else if (question.questionType === "abcd") {
// slice off the "A", "B".. from the answer options
for (var j = 0; j < question.possibleAnswers.length; j++) {
clickAnswerOptions.push({
hashtag: "ImportFromARSnova",
questionIndex: 0,
answerText: question.possibleAnswers[j].text.slice(3),
answerOptionNumber: j,
isCorrect: question.possibleAnswers[j].correct,
type: "DefaultAnswerOption"
});
}
} else {
for (var i = 0; i < question.possibleAnswers.length; i++) {
clickAnswerOptions.push({
hashtag: "ImportFromARSnova",
questionIndex: 0,
answerText: question.possibleAnswers[i].text,
answerOptionNumber: i,
isCorrect: question.possibleAnswers[i].correct,
type: "DefaultAnswerOption"
});
}
var csv = ARSnova.utils.CsvUtil.jsonToCsv(rows, delimiter);
if (excel) {
csv = 'sep=' + delimiter + '\r\n' + csv;
}
return clickAnswerOptions;
this.saveFileOnFileSystem(csv, this.filename(questionObj.questionType === 'freetext' ? 'textanswers' : 'answerstats'));
}
});
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -85,16 +85,9 @@ Ext.define("ARSnova.controller.SessionExport", {
writeExportDataToFile: function (exportData) {
var jsonData = JSON.stringify({exportData: exportData});
var dateString = "";
var d = new Date();
var dateTimeString = moment().format('YYYYMMDDHHmm');
dateString = ('0' + d.getFullYear()).slice(-2) + '-'
+ ('0' + (d.getMonth() + 1)).slice(-2) + '-'
+ ('0' + d.getDate()).slice(-2) + '-'
+ ('0' + d.getHours()).slice(-2) + '-'
+ ('0' + d.getMinutes()).slice(-2);
var filename = exportData.session.name + dateString + ".json";
var filename = 'arsnova-session-' + exportData.session.shortName + '-' + dateTimeString + ".json";
this.saveFileOnFileSystem(jsonData, filename);
return jsonData;
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -29,49 +29,8 @@ Ext.define("ARSnova.controller.SessionImport", {
* Import a single session from a JSON file.
*/
importSession: function (jsonContent) {
var me = this;
var session = {
name: jsonContent.session.name,
shortName: jsonContent.session.shortName,
active: jsonContent.session.active,
sessionFeature: jsonContent.sessionFeature,
publicPool: jsonContent.session.publicPool
};
jsonContent.questions.forEach(function (q) {
q.answers = q.answers || [];
q.answers = q.answers.map(function (a) {
return {
answerSubject: a.answerSubject,
answerText: a.answerText,
abstention: a.abstention
};
}).filter(function (a) {
// remove answers that do not have any content
return a.answerSubject || a.answerText || a.abstention;
});
});
var feedbackQuestions = jsonContent.feedbackQuestions.map(function (q) {
return {
subject: q.subject,
text: q.text,
timestamp: q.timestamp,
read: q.read
};
});
var data = {
session: session,
questions: jsonContent.questions,
feedbackQuestions: feedbackQuestions,
motds: jsonContent.motds
};
var promise = new RSVP.Promise();
ARSnova.app.restProxy.importSession(data, {
ARSnova.app.restProxy.importSession(jsonContent, {
success: function () {
promise.resolve();
},
......@@ -80,5 +39,40 @@ Ext.define("ARSnova.controller.SessionImport", {
}
});
return promise;
},
/**
* Creates a copy of a public pool session.
*
* @param sessionkey Session key of the public pool session
*/
copySessionFromPublicPool: function (sessionkey, sessionAttributes) {
var me = this;
var hideLoadMask = ARSnova.app.showLoadMask(Messages.LOAD_MASK_SESSION_PP_CLONE, 240000);
var showMySessionsPanel = function () {
// forward to session panel
var hTP = ARSnova.app.mainTabPanel.tabPanel.homeTabPanel;
hTP.animateActiveItem(hTP.mySessionsPanel, {
type: 'slide',
direction: 'right',
duration: 700
});
hideLoadMask();
};
var errorHandler = function (error) {
hideLoadMask();
};
ARSnova.app.restProxy.copySessionFromPublicPool(
sessionkey, sessionAttributes, {
success: function (response) {
showMySessionsPanel();
},
failure: function () {
console.log("Could not copy public pool session.");
}
}
);
}
});
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -24,15 +24,15 @@ Ext.define("ARSnova.controller.Tracking", {
/* global _paq */
/* jshint -W020 */
var tracking = ARSnova.app.globalConfig.tracking;
if (tracking && "piwik" === tracking.provider) {
if (tracking && ["matomo", "piwik"].indexOf(tracking.provider) !== -1) {
_paq = [
["trackPageView"],
["enableLinkTracking"],
["setTrackerUrl", tracking.trackerUrl + "piwik.php"],
["setTrackerUrl", tracking.trackerUrl + "matomo.php"],
["setSiteId", tracking.siteId]
];
var trackerScript = document.createElement("script");
trackerScript.src = tracking.trackerUrl + "piwik.js";
trackerScript.src = tracking.trackerUrl + "matomo.js";
document.body.appendChild(trackerScript);
}
});
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -386,7 +386,10 @@
DELETE_FLASHCARD_TITLE: "Lernkarte löschen",
DELETE_FLASHCARDS_TITLE: "Lernkarten löschen",
DELETE_SESSION_TITLE: "Session löschen",
DELETE_SESSION_NOTICE: "Es werden alle Fragen und Antworten der Session gelöscht",
DELETE_SESSION_NOTICE: "Möchten Sie die Session und alle zugehörigen Daten wirklich löschen?",
DELETE_SESSION_SUCCESS: "Die Session wurde gelöscht.",
DELETE_SESSION_ERROR: "Die Session konnte nicht gelöscht werden.",
DELETE_SESSION_ADMIN: "Session löschen",
CATEGORY: "Thema",
CATEGORY_PLACEHOLDER: "Thema",
ABSTENTION: 'Enthaltung',
......@@ -522,7 +525,6 @@
EXPORT_SELECTED_SESSIONS_MSG: "Wohin möchten Sie die Session(s) exportieren?",
EXPORT_SESSION_INFORMATION: "Neben Hörsaal- und Vorbereitungsaufgaben der ausgewählten Sessions werden zusätzlich exportiert...",
EXPORT_NOTIFICATION: "Es wurde keine Session ausgewählt",
EXPORT_IOS_NOTIFICATION: "Ein Export kann auf iOS-Geräten nicht durchgeführt werden",
EXPORT_BUTTON_FS: "Mein System",
EXPORT_BUTTON_PP: "Public Pool",
EXPORT_PP_NOTIFICATION: 'Als "Gast" können Sie keine Session in den Public Pool exportieren. Bitte melden Sie sich über einen der anderen Zugänge an.',
......@@ -574,8 +576,8 @@
EDITOR_BOLD_TOOLTIP: "Fett",
EDITOR_HEADER_TOOLTIP: "Überschrift",
EDITOR_HYPERLINK_TOOLTIP: "Hyperlink",
EDITOR_ULIST_TOOLTIP: "Unsortierte Liste",
EDITOR_OLIST_TOOLTIP: "Sortierte Liste",
EDITOR_ULIST_TOOLTIP: "Unnummerierte Liste",
EDITOR_OLIST_TOOLTIP: "Nummerierte Liste",
EDITOR_LATEX_TOOLTIP: "LaTex-Auszeichnung",
EDITOR_CODE_TOOLTIP: "Code-Auszeichnung",
EDITOR_QUOTE_TOOLTIP: "Zitat",
......@@ -746,6 +748,11 @@
BROWSER_INFO: "Browser-Informationen",
ARSNOVA_INFO: "ARSnova-Version",
ARSNOVA_RELOAD: "ARSnova neu laden",
DELETE_ACCOUNT: "Account löschen",
DELETE_ACCOUNT_INFO: "Wenn Sie fortfahren, werden Ihr Account und alle von Ihnen erstellten Sessions unwiederbringlich gelöscht.",
DELETE_ACCOUNT_INFO_ADMIN: "Geben Sie den Namen des Accounts ein. Der Account und alle mit diesem erstellten Sessions werden unwiederbringlich gelöscht.",
DELETE_ACCOUNT_SUCCESS: "Der Account wurde gelöscht.",
DELETE_ACCOUNT_ERROR: "Der Account konnte nicht gelöscht werden.",
VOTINGS: "Abstimmungen",
SESSION_OWNERS: "Rolle Dozent/in",
LEARNING_PROGRESS: "Lernstandsberechnung",
......@@ -838,6 +845,7 @@
QUESTIONS_IMPORT_ABSTENTION_ERROR: "Fehler im Feld 'abstention'",
QUESTIONS_IMPORT_INVALID_FORMAT: "Ungültiges Dateiformat",
QUESTIONS_IMPORT_INVALID_CHARSET: "Ungültiger Zeichensatz",
FLASHCARD_IMPORT_NOT_SUPPORTED: "Der CSV-Import von Lernkarten wird nicht unterstützt.",
FLASHCARDS_CHOOSE_SUBJECT: "Legen Sie ein Thema für das zu importierende Lernkarten-Set fest",
CSV_FILE: "CSV-Datei"
};
......@@ -1264,7 +1272,10 @@
DELETE_FLASHCARD_TITLE: "Delete flashcard",
DELETE_FLASHCARDS_TITLE: "Delete flashcards",
DELETE_SESSION_TITLE: "Delete session",
DELETE_SESSION_NOTICE: "All questions and answers of this session will be deleted.",
DELETE_SESSION_NOTICE: "Do you want to delete the session and all related data?",
DELETE_SESSION_SUCCESS: "The session has been deleted.",
DELETE_SESSION_ERROR: "The session could not be deleted.",
DELETE_SESSION_ADMIN: "Delete session",
CATEGORY: "Subject",
CATEGORY_PLACEHOLDER: "Enter subject",
ABSTENTION: 'Abstention',
......@@ -1405,7 +1416,6 @@
EXPORT_SELECTED_SESSIONS_MSG: "Where should the session(s) be exported?",
EXPORT_SESSION_INFORMATION: "Auditorium questions and preparation tasks questions for the selected sessions will be exported.",
EXPORT_NOTIFICATION: "No session selected.",
EXPORT_IOS_NOTIFICATION: "An export can not be performed on iOS devices.",
EXPORT_BUTTON_FS: "My System",
EXPORT_BUTTON_PP: "Public Pool",
EXPORT_PP_NOTIFICATION: 'As a "guest" you can not export a session in the public pool. Please log in using one of the other approaches.',
......@@ -1458,8 +1468,8 @@
EDITOR_BOLD_TOOLTIP: "Bold",
EDITOR_HEADER_TOOLTIP: "Header",
EDITOR_HYPERLINK_TOOLTIP: "Hyperlink",
EDITOR_ULIST_TOOLTIP: "Unsorted list",
EDITOR_OLIST_TOOLTIP: "Sorted list",
EDITOR_ULIST_TOOLTIP: "Unordered list",
EDITOR_OLIST_TOOLTIP: "Ordered list",
EDITOR_LATEX_TOOLTIP: "LaTex",
EDITOR_CODE_TOOLTIP: "Code",
EDITOR_QUOTE_TOOLTIP: "Quotation",
......@@ -1632,6 +1642,11 @@
BROWSER_INFO: "Browser information",
ARSNOVA_INFO: "ARSnova version",
ARSNOVA_RELOAD: "Reload ARSnova",
DELETE_ACCOUNT: "Delete account",
DELETE_ACCOUNT_INFO: "By continuing, your account and any sessions you created will be irretrievably deleted.",
DELETE_ACCOUNT_INFO_ADMIN: "Enter the name of the user account. The account and any sessions created with it will be irretrievably deleted.",
DELETE_ACCOUNT_SUCCESS: "The account has been deleted.",
DELETE_ACCOUNT_ERROR: "The account could not be deleted.",
VOTINGS: "Votings",
SESSION_OWNERS: "Users in a teacher's role",
PEER_INSTRUCTION_QUESTIONS: "Two-round votings",
......@@ -1724,6 +1739,7 @@
QUESTIONS_IMPORT_ABSTENTION_ERROR: "Error in field 'abstention'",
QUESTIONS_IMPORT_INVALID_FORMAT: "Invalid file format",
QUESTIONS_IMPORT_INVALID_CHARSET: "Invalid charset",
FLASHCARD_IMPORT_NOT_SUPPORTED: "Importing from CSV is not supported for flashcards.",
FLASHCARDS_CHOOSE_SUBJECT: "Enter a subject for the imported flashcard-set",
CSV_FILE: "CSV file"
};
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -1081,6 +1081,16 @@ Ext.define('ARSnova.proxy.RestProxy', {
});
},
copySessionFromPublicPool: function (keyword, sessionAttributes, callbacks) {
this.arsjax.request({
url: "session/" + keyword + "/copyfrompublicpool",
method: "POST",
jsonData: sessionAttributes,
success: callbacks.success,
failure: callbacks.failure
});
},
getSubjectSort: function (sessionKeyword, isPreparation, callbacks) {
this.arsjax.request({
url: "lecturerquestion/subjectsort?sessionkey=" + sessionKeyword +
......@@ -1296,5 +1306,14 @@ Ext.define('ARSnova.proxy.RestProxy', {
jsonData: motdlist,
success: function (response) {}
});
},
deleteUserAccount: function (username, callbacks) {
this.arsjax.request({
url: "user/" + encodeURIComponent(username) + "/",
method: "DELETE",
success: callbacks.success,
failure: callbacks.failure
});
}
});
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2015 The ARSnova Team
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* This file is part of ARSnova Mobile.
* Copyright (C) 2011-2012 Christian Thomas Weber
* Copyright (C) 2012-2018 The ARSnova Team and Contributors
* Copyright (C) 2012-2019 The ARSnova Team and Contributors
*
* ARSnova Mobile is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -119,13 +119,18 @@ Ext.define('ARSnova.view.FreetextAnswerPanel', {
}
});
this.exportCsvPanel = Ext.create('ARSnova.view.components.CsvExportMessageBox', {
exportCallback: Ext.bind(this.exportCsv, this)
});
this.exportButton = Ext.create('Ext.Button', {
xtype: 'button',
text: Messages.EXPORT_BUTTON_LABEL,
align: 'right',
handler: function () {
ARSnova.app.getController('QuestionExport').downloadQuestionAnswers(self.questionObj, self.freetextAnswerStore);
this.exportCsvPanel.show(