We can not rely on the db engine returning results in the same order
if no order is specified in get_comments and get_annotations.
Also fixing a related unit test.
Added a method to the feedback plugins to check if feedback
has been modified. This allows for a more accurate record
of when the grade has been modified.
This just deletes all the upgrade steps previous to 2.7.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.
Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
1) Change the fpdi_bridge class so that it extends the pdf class,
rather than the TCPDF class.
2) Updated the editpdf/fpdi/readme_moodle.txt file to document the changes.
3) Updated the editpdf/thirdpartylibs.xml to reflect the update to the
FPDI library.
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.
version = planned 2015051100 release version
requires= current 2015050500 rc1 version
Note: On purpose, the course format social wrong version (2015102100)
has been kept unmodified. Looking forward a solution right now.
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.
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).
Get rid of the gc_collect_cycles() that only was
hiding incorrectly left open files. This must be fixed
in code when possible. And pdf libs allow us to do so.
Note that a lot of gc_collect_cycles() were added
in MDL-47675, I'd recommend to take a look to all them,
being replaced by fixes in code when possible.
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
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.