From e2dd4a2b1b9dee857ba73e6f2965d87500db6714 Mon Sep 17 00:00:00 2001 From: Friederike Schwager <schwager@itc.rwth-aachen.de> Date: Thu, 6 Feb 2020 14:00:01 +0100 Subject: [PATCH] update readme and thirdpartylibs.xml --- README.md | 4 ++-- shared/index.js | 3 --- thirdpartylibs.xml | 7 +++++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3bfb695..e2f78c2 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ You should have received a copy of the GNU General Public License along with Moodle. If not, see <http://www.gnu.org/licenses/>. Please note that this plugin also contains files that are under the -- MIT License: namely index.js, jquery-3.2.1, textclipper.js, chart.js +- MIT License: namely index.js, jquery-3.2.1, textclipper.js, chart.js, jsPDF - Apache License, Version 2.0: namely pdf.js. -Google Charts API is used in download function to convert [LaTeX](https://www.latex-project.org/) formulae to PNG: <https://chart.googleapis.com/chart>. +Optionally Google Charts API can be used in download function to convert [LaTeX](https://www.latex-project.org/) formulae to PNG: <https://chart.googleapis.com/chart>. ### Installation: diff --git a/shared/index.js b/shared/index.js index 04bd7ef..4f75b7d 100644 --- a/shared/index.js +++ b/shared/index.js @@ -720,7 +720,6 @@ function startIndex(Y,_cm,_documentObject,_userid,_capabilities, _toolbarSetting function openCommentsCallback() { _2.default.getStoreAdapter().getCommentsToPrint(RENDER_OPTIONS.documentId) .then(function(data){ - if(data.status === "success") { // Get annotation type images. @@ -786,7 +785,6 @@ function startIndex(Y,_cm,_documentObject,_userid,_capabilities, _toolbarSetting var timeasked = post['timemodified']; doc.setTextColor(0,84,159); breakLines(author, timeasked, question); - // Add answers to the question in black (extremely dark blue which looks better). doc.setTextColor(0,0,51); var answers = post['answers']; @@ -808,7 +806,6 @@ function startIndex(Y,_cm,_documentObject,_userid,_capabilities, _toolbarSetting * it contains latex formulae images or not and place its text and/or images on the pdf */ function breakLines(author=null, timemodified=null, post, characters = 150) { - if (typeof post === "string") { // Answer contains text only. printTextblock(author, timemodified, post); } diff --git a/thirdpartylibs.xml b/thirdpartylibs.xml index 2a687fd..2a0accf 100644 --- a/thirdpartylibs.xml +++ b/thirdpartylibs.xml @@ -36,5 +36,12 @@ <license>MIT</license> <licenseversion></licenseversion> </library> + <library> + <location>amd/src/jspdf.js</location> + <name>jsPDF</name> + <version>1.4.1</version> + <license>MIT</license> + <licenseversion></licenseversion> + </library> </libraries> -- GitLab