Commit Graph

39 Commits

Author SHA1 Message Date
Damyon Wiese
fca211bf05 MDL-55374 mod_assign: Force utf-8 for DOMDocument
This prevents charset issues on some sites.
2016-07-29 10:43:25 +08:00
Damyon Wiese
55907a738a MDL-53822 editpdf: Add a new tool for scrolling
I added a new tool to the toolbar to allow click and drag scrolling (especially useful for touchscreens).
2016-05-06 16:33:31 +08:00
Mark Nelson
fcc9218fb8 MDL-53811 mod_assign: fixed error in convert submissions task 2016-04-19 13:08:27 +08:00
Damyon Wiese
6853cd5ed4 MDL-52954 assign: Fix the reasonable cibot warnings. 2016-03-30 14:07:28 +08:00
Damyon Wiese
bb690849c9 MDL-52954 assign: Rebuild the assignment single grade page. 2016-03-30 13:47:21 +08:00
Damyon Wiese
1356d85151 MDL-52954 core: Change from pandoc to unoconv - it gives better results
Most importantly it retains formatting better, and supports different charsets far better than pandoc.
2016-03-30 11:48:39 +08:00
Damyon Wiese
2e76c14e11 MDL-52954 core: Add a document converter to file_storage
This lets us convert between common office formats. E.g. docx -> pdf
html -> pdf, html -> ods.

This commit also updates assignment editpdf plugin to use this converter
on all compatible submission files.
2016-03-30 11:48:39 +08:00
Syxton
626d833543 MDL-51779 assign: PDF annotate quality
Fixes the quality of pdf content when annotating.
2015-10-23 09:22:38 -04:00
Jun Pataleta
0bf75ff15f MDL-49864 mod_assign: Fix missing annotations when viewing PDF
Added 'draft = 1' criteria for the delete query in
page_editor::set_annotations in order to prevent the deletion of non-draft
annotations while the PDF is being edited.
2015-08-03 09:07:03 +08:00
Eloy Lafuente (stronk7)
46686eafeb MDL-49998 editpdf: Clean code to make it more readable.
There was a big proliferation and reuse of $pdf variable
that was making the code hard to read/review. This commit
does change nothing but makes it more readable.

Also adds a couple of Close() calls, not strictly needed
because they don't have opened files. But think it makes
really clearer the scope of every variable. And, for sure
it frees some resources. That cannot be bad.
2015-04-30 10:55:08 +02:00
Eloy Lafuente (stronk7)
a916d557cf MDL-49998 unit tests: Close the pdf objects when needed.
When a pdf object is instantiated and any file is loaded
with set_pdf() or load_pdf(), the files remain open until
the pdf is saved with pdf_save() or outputted with Output()..

In that cases is needed to perform an explicit Close() in
order to free resources, parsers and, ultimately, fclose()
the files.

Note that only the uses detected in the editpdf unit tests have
been fixed. I'd recommend to analyse every instance of the tcpdf
libs.

Also, there was one incorrecly reused pdf instance in then
generate_combined_pdf_for_attempt() method. Apparently it was not
leading to problems, but better use a separate instance (#246).
2015-04-28 19:46:50 +02:00
Dan Poltawski
861265b43a Merge branch 'MDL-43462_landscape_pdf' of git://github.com/davosmith/moodle 2014-12-16 19:20:22 +00:00
Davo Smith
50c12f01bc MDL-43462 assignfeedback_editpdf: fix display of landscape PDFs
The size of the drawing canvas is now set from the size of the generated page image, with automatic
scrolling if it is too wide to display
Absolutely-positioned nodes (comments + stamps) are repositioned as the drawing canvas is scrolled
2014-12-15 22:01:26 +00:00
Andrew Nicols
9b65a08095 MDL-47475 mod_assign: Copy files to other group members for editpdf 2014-12-15 08:50:31 +08:00
Frederic Massart
20942dd702 MDL-47397 assignfeedback_editpdf: Copy stamps to other students in team
During a team submission the stamps were attached to the user that
was graded and not to the other users. This could lead to errors when
generating the PDF for each user.
2014-10-24 15:09:06 +01:00
Frederic Massart
7dbbb848c6 MDL-45580 assignfeedback_editpdf: Delete draft content on new submission 2014-06-23 14:17:24 +08:00
Frederic Massart
098f7dd438 MDL-45580 assignfeedback_editpdf: Store a readonly version of the PDF 2014-06-23 14:16:49 +08:00
Damyon Wiese
e192e37f51 MDL-45582 EditPDF: whitespace fix 2014-06-17 10:27:19 +08:00
Gregory Faller
028c9d20b9 MDL-45582: Apply grades and feedback to entire group does not work with Annotate PDF feature 2014-06-16 18:09:21 +09:30
Rajesh Taneja
1bce3a70d9 MDL-44839 admin: Moved all system executable paths to config
AMOS BEGIN
 MOV ['gspath','assignfeedback_editpdf'],['pathtogs','admin']
 MOV ['gspath_help','assignfeedback_editpdf'],['pathtogs_help','admin']
AMOS END
2014-06-03 17:33:49 +08:00
Adam Olley
9f7674bddc MDL-44822 assignfeedback_editpdf: Stop test generation in is_enabled()
This change also moves one of the checks in test_gs_path. If
generateimage is false, there's no need to stat for the fixture file.
2014-03-27 10:16:53 +10:30
Damyon Wiese
ac2b4ffc8c MDL-43593 Assign editpdf: More robust handling of errors from TCPDF.
This includes a check to see if there are 0 pages in the combined pdf,
catching exceptions and suppressing php warnings and errors from bad pdf files.

Also - Use TCPDF directly to check if pdfs are compatible. The previous check was
letting dodgy PDFs through which then failed at generation time. This way dodgy
pdfs will get run through ghostscript early and cleaned up.
2014-01-24 16:16:38 +08:00
Eloy Lafuente (stronk7)
1f71f7685a Merge branch 'MDL-43025-master' of git://github.com/damyon/moodle 2013-12-17 22:58:51 +01:00
Damyon Wiese
4fe9950ba6 MDL-43025 EditPDF: Increase memory limit when reading source pdfs. 2013-12-09 12:58:40 +08:00
Damyon Wiese
1f738c8c0c MDL-43074 assignfeedback_editpdf: Use escapeshellarg for all args in exec command.
This is to fix a reported problem with windows compatibility (e.g. when ghostscript is installed in
a folder with spaces in the name).
2013-12-09 10:52:35 +08:00
Rajesh Taneja
baf881b803 MDL-42799 Assignment: Min. width/height for widget is set to 1
It was possible for user to add widgets with width/height = 0
which were not displayed to user and doesn't have much meaning to it
This patch will set min. width/height to 1
2013-11-12 16:17:40 +08:00
Marina Glancy
bdb7c88635 Merge branch 'MDL-42031-master' of git://github.com/mouneyrac/moodle
Conflicts:
	mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-min.js
2013-11-06 17:18:38 +11:00
Jerome Mouneyrac
d40ce26f05 MDL-42031 assginfeedback_editpdf: fix next/previous/select page 2013-11-06 14:13:19 +08:00
Damyon Wiese
1d38083c9d MDL-42402 EditPDF: Make the colours match the mockup in MDL-41633 2013-11-05 14:49:06 +08:00
Petr Škoda
0c431257e9 MDL-42387 standardise file lifetime handling 2013-11-01 10:42:18 +01:00
Jerome Mouneyrac
aa3e4bdec7 MDL-42028 EditPDF: replace the loading icon by a progress bar 2013-10-28 13:48:22 +08:00
Damyon Wiese
fc69508f01 Merge branch 'MDL-42029-master-nomerge' of git://github.com/mouneyrac/moodle
Conflicts:
	mod/assign/feedback/editpdf/lang/en/assignfeedback_editpdf.php
2013-10-16 12:45:07 +08:00
Jerome Mouneyrac
ea6d86743f MDL-42029 Editpdf: Page selector should indicate what page you are on 2013-10-16 11:55:30 +08:00
Dan Poltawski
9092378ddb MDL-42240 assignfeedback_editpdf: improve ghostscript debugging 2013-10-10 13:55:46 +08:00
Dan Poltawski
f57053fc2a Merge branch 'wip-mdl-42222' of git://github.com/rajeshtaneja/moodle 2013-10-09 17:23:44 +08:00
Rajesh Taneja
9dbe0313ce MDL-42222 Assignment: Added type check before checking mimetype
Online submission type pass string in files, so added check
to see if file is of type stored_file then check mimetype
2013-10-09 16:53:46 +08:00
Damyon Wiese
c921825977 MDL-42150 Edit PDF: Fix error on saving annotations + comments.
Everything is an instanceof stdClass - need to reverse the logic.
2013-10-04 15:15:58 +08:00
Damyon Wiese
9f5193a4b8 MDL-42023 Assign: Edit PDF plugin - fix unit tests 2013-10-03 14:05:28 +08:00
Damyon Wiese
5c3864723a MDL-42023 assign: Edit PDF plugin - Damyon's contributions 2013-10-03 09:30:32 +08:00