Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9.4
-
Fix Version/s: None
-
Component/s: Assignment type: Uploadpdf
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
A new plugin for the assignment module that allows for online annotation of PDF submissions from students.
It is still relatively early in development (approx 2 weeks!). However, the basic functionality is all there, with a number of other features coming along.
Is it possible to get it added to contrib CVS (rather than just storing it on my local PC), or would it be better to wait until it is a bit more developed?
Attachments
-
- annotate.js
- 23/Apr/09 3:00 PM
- 10 kB
- Davo Smith
-
$i18n.getText("admin.common.words.hide")
- uploadpdf.zip
- 25/Apr/09 3:20 AM
- 269 kB
- Davo Smith
-
- mod/assignment/.../uploadpdf/version.php 0.2 kB
- mod/assignment/.../uploadpdf_config.php 0.4 kB
- mod/assignment/.../updatecomment.php 2 kB
- mod/assignment/type/uploadpdf/notes.php 2 kB
- mod/assignment/.../uploadpdf/mypdflib.php 7 kB
- mod/assignment/.../edittemplates.php 17 kB
- mod/assignment/.../uploadpdf/editcomment.php 1 kB
- mod/assignment/.../uploadpdf/config.html 0.7 kB
- mod/assignment/.../assignment.class.php 66 kB
- mod/assignment/type/uploadpdf/README.txt 6 kB
- mod/assignment/.../tcpdf/unicode_data.php 223 kB
- mod/assignment/type/.../tcpdf/tcpdf.php 479 kB
- mod/assignment/type/.../tcpdf/htmlcolors.php 6 kB
- mod/assignment/type/.../tcpdf/barcodes.php 24 kB
- mod/assignment/type/.../tcpdf/README.TXT 4 kB
- mod/assignment/type/.../tcpdf/LICENSE.TXT 26 kB
- mod/assignment/type/.../tcpdf/CHANGELOG.TXT 36 kB
- mod/assignment/type/.../style/wait.gif 2 kB
- mod/assignment/type/.../style/resize.gif 0.1 kB
- mod/assignment/type/.../style/pagewait.gif 2 kB
- mod/assignment/type/.../style/annotate.css 2 kB
- mod/.../mootools-1.2.1-more-compressed.js 7 kB
- mod/.../mootools-1.2.1-core-compressed.js 45 kB
- mod/assignment/type/.../scripts/annotate.js 10 kB
- mod/assignment/type/.../fpdi/pdf_parser.php 20 kB
- mod/assignment/type/.../fpdi/pdf_context.php 2 kB
- mod/assignment/.../fpdi/fpdi_pdf_parser.php 11 kB
- mod/assignment/.../fpdi2tcpdf_bridge.php 5 kB
- mod/assignment/type/.../fpdi/fpdi.php 17 kB
- mod/assignment/type/.../fpdi/fpdf_tpl.php 14 kB
-
$i18n.getText("admin.common.words.hide")
- uploadpdf.zip
- 23/Apr/09 6:52 AM
- 269 kB
- Davo Smith
-
- mod/assignment/.../uploadpdf/version.php 0.2 kB
- mod/assignment/.../uploadpdf_config.php 0.4 kB
- mod/assignment/.../updatecomment.php 2 kB
- mod/assignment/type/uploadpdf/notes.php 2 kB
- mod/assignment/.../uploadpdf/mypdflib.php 7 kB
- mod/assignment/.../edittemplates.php 17 kB
- mod/assignment/.../uploadpdf/editcomment.php 1 kB
- mod/assignment/.../uploadpdf/config.html 0.7 kB
- mod/assignment/.../assignment.class.php 66 kB
- mod/assignment/type/uploadpdf/README.txt 6 kB
- mod/assignment/.../tcpdf/unicode_data.php 223 kB
- mod/assignment/type/.../tcpdf/tcpdf.php 479 kB
- mod/assignment/type/.../tcpdf/htmlcolors.php 6 kB
- mod/assignment/type/.../tcpdf/barcodes.php 24 kB
- mod/assignment/type/.../tcpdf/README.TXT 4 kB
- mod/assignment/type/.../tcpdf/LICENSE.TXT 26 kB
- mod/assignment/type/.../tcpdf/CHANGELOG.TXT 36 kB
- mod/assignment/type/.../style/wait.gif 2 kB
- mod/assignment/type/.../style/resize.gif 0.1 kB
- mod/assignment/type/.../style/pagewait.gif 2 kB
- mod/assignment/type/.../style/annotate.css 2 kB
- mod/.../mootools-1.2.1-more-compressed.js 7 kB
- mod/.../mootools-1.2.1-core-compressed.js 45 kB
- mod/assignment/type/.../scripts/annotate.js 10 kB
- mod/assignment/type/.../fpdi/pdf_parser.php 20 kB
- mod/assignment/type/.../fpdi/pdf_context.php 2 kB
- mod/assignment/.../fpdi/fpdi_pdf_parser.php 11 kB
- mod/assignment/.../fpdi2tcpdf_bridge.php 5 kB
- mod/assignment/type/.../fpdi/fpdi.php 17 kB
- mod/assignment/type/.../fpdi/fpdf_tpl.php 14 kB
-
$i18n.getText("admin.common.words.hide")
- uploadpdf.zip
- 17/Apr/09 2:01 AM
- 256 kB
- Davo Smith
-
- mod/assignment/.../uploadpdf/version.php 0.1 kB
- mod/assignment/.../uploadpdf_config.php 0.2 kB
- mod/assignment/.../updatecomment.php 2 kB
- mod/assignment/type/uploadpdf/notes.php 2 kB
- mod/assignment/.../uploadpdf/mypdflib.php 5 kB
- mod/assignment/.../uploadpdf/editcomment.php 1 kB
- mod/assignment/.../uploadpdf/config.html 0.7 kB
- mod/assignment/.../assignment.class.php 53 kB
- mod/assignment/type/uploadpdf/README.txt 4 kB
- mod/assignment/.../tcpdf/unicode_data.php 223 kB
- mod/assignment/type/.../tcpdf/tcpdf.php 479 kB
- mod/assignment/type/.../tcpdf/htmlcolors.php 6 kB
- mod/assignment/type/.../tcpdf/barcodes.php 24 kB
- mod/assignment/type/.../tcpdf/README.TXT 4 kB
- mod/assignment/type/.../tcpdf/LICENSE.TXT 26 kB
- mod/assignment/type/.../tcpdf/CHANGELOG.TXT 36 kB
- mod/assignment/type/.../style/wait.gif 2 kB
- mod/assignment/type/.../style/resize.gif 0.1 kB
- mod/assignment/type/.../style/pagewait.gif 2 kB
- mod/assignment/type/.../style/annotate.css 1 kB
- mod/.../mootools-1.2.1-more-compressed.js 7 kB
- mod/.../mootools-1.2.1-core-compressed.js 45 kB
- mod/assignment/type/.../scripts/annotate.js 8 kB
- mod/assignment/type/.../fpdi/pdf_parser.php 20 kB
- mod/assignment/type/.../fpdi/pdf_context.php 2 kB
- mod/assignment/.../fpdi/fpdi_pdf_parser.php 11 kB
- mod/assignment/.../fpdi2tcpdf_bridge.php 5 kB
- mod/assignment/type/.../fpdi/fpdi.php 17 kB
- mod/assignment/type/.../fpdi/fpdf_tpl.php 14 kB
- mod/assignment/type/.../db/mysql.sql 0.5 kB
Issue Links
| This issue will be resolved by: | ||||
| MDL-16796 | Assignment plugins is not completely plugable |
|
|
|
Activity
Language filename: wasn't sure what this should be called, so have now renamed it (and the calls to 'get_string') and it is all working, apart from the MDL-16796 bug mentioned above. However, I am a little concerned about that latter one, as I'd like my assignment plugin to work with Moodle1.8 (which we still have in college), but I guess it's a cosmetic feature that will go away in time.
mysql.sql: not needed for 1.9, but, as mentioned above, we are still on 1.8, so I'd like to include support for that, if possible.
tcpdf: the version included in Moodle is several years old and incompatible with the FPDI library that I also use, which is why I have bundled it. If there is a better way of doing this (which works with 1.8+) then I'm open to investigating it.
Hoping to have the last major features implemented in the next few days, at which point I'll attach an updated zip file (there has already been quite a bit of development since the last one I uploaded). Then I might try out the git<->CVS bridge that everyone has been talking about on the developer forum, as I've been using git for all my local dev work on this plugin (to keep my main desktop and laptop in sync).
Davo - I am glad to hear you were able to get the language file working nicely. As for MDL-16796, I did upload a patch. It looks like a bug to me from what I can tell but I want to have one of the other developers verify it. As for mysql.sql, we can have it in the 1.8 branch of the code but let's go ahead and remove it for 1.9. You may need to remind me to create the branch for 1.8.
As for tcpdf, I have a couple of thoughts. First, you may want to contact David Mudrak via Moodle message and see what his thoughts are on how to handle this. I can envision a number of possibilities the first of which is to do what you have done and just bundle a version for use with this plugin. The second, a slightly more complicated approach but cleaner is to create a tcpdf patch for Moodle 1.8 and Moodle 1.9 that would replace the existing version with the newer version. I am not sure what issues this might produce so David's input here would be really helpful. Then we would package together the tcpdf patch along with the uploadpdf assignment type and folks would get a zip file that contained /lib/tcpdf and /mod/assignment/type/uploadpdf. A third possibility is to push to get tcpdf upgraded in CORE for Moodle 1.8 and 1.9.
Thanks for all your work on this. Sounds like a really useful assignment type. I look forward to playing around with the next version. Keep up the great work. Peace - Anthony
Have contacted David to ask for his thoughts - will let you know what he comes up with.
I agree that option 1 is the easiest; option 2 is a bit 'nicer', but harder to implement / install; option 3 I am less sure about - I am not sure how many people upgrade to minor versions of moodle (maybe I am wrong, but I get the impression, in our college at least, that the current stable version is installed during the summer, then nothing is upgraded until the next summer, to avoid breaking things).
Davo - In terms of installation of a package, the process is the same for the end user. They simply extract the file to their Moodle installation. Of course it would be better if folks would upgrade on the minor versions as it helps to fix things that were broken, especially security issues. Point version upgrades are reasonably safe and much more likely to fix more problems than they might create, the real risk I think is not upgrading. Peace - Anthony
Spoken to David Mudrak and his suggestion was that library versions should not be changed in stable branches and that pre-2.0 versions of my plugin should bundle their own copy of TCPDF, but that I should be prepared to use the Moodle version of TCPDF in Moodle 2.0 and above.
Anyway, I hope to have a bit more time this evening to finish off the last major feature for this plugin (attaching templated coversheets). At which point I'll upload it again.
Thanks for checking with David. We can certainly bundle a version with 1.8 and 1.9 versions, and then plan to use what is available in 2.0 and beyond. Best of luck finishing things off. I look forward to further testing and seeing the fruits of your labors. Peace - Anthony
Frustratingly close to finished (just working on editing the templates for coversheets).
However, I have hit an issue that I am not sure about. When creating a layout for a template (which will automatically add data such as name, date and 'this is all my own work', to a coversheet PDF), it would be nice to be able to display an image of the coversheet.
To display this image, I need to generate it and store it somewhere - I am not really sure where, in the moodle file hierarchy, to put it (the generated images for actual submissions go in a subfolder along with the submissions).
I could put it in the course files, but it would seem odd to have a random image suddenly turn up amongst the other course files.
Any ideas?
Davo - I would definitely make sure to use something in moodledata, this is a question that comes up not infrequently. I am thinking we should create a documentation page for this. I commented on this with Anastasios as part of CONTRIB-621. No need to read the whole conversation, but toward the end we speak of how to resolve things. Sounds like you could make use of $CFG->dataroot.'/temp/'.$file or something along those lines. Peace - Anthony
Many changes to this plugin (and hopefully all major bugs squished).
Main highlights include:
- choice of colours for comment backgrounds
- ability to (optionally) allow upload of non-PDF files
- ability to attach oversheets to the submissions
- use of templates to fill in submitted data onto coversheets
- file upload order retained in PDFs submitted
- use of get_string for all output text
Hopefully this is now ready to be added to contrib...
- choice of colours for comment backgrounds
- ability to (optionally) allow upload of non-PDF files
- ability to attach oversheets to the submissions
- use of templates to fill in submitted data onto coversheets
- file upload order retained in PDFs submitted
- use of get_string for all output text
Ooops... I realised that there is a bug in the version I uploaded that would break some of the comment editing.
I've attached a new 'annotate.js' file that should fix it, but I haven't got access to my moodle server to check it just at the moment.
Edit: Now checked the fix and it works fine.
Hopefully this is the very last version I need to post here, but there were a number of (relatively minor) fixes that I wanted to add:
- annotate.js - the file I previously uploaded separately, fixes now in main zip
- assignment.class.php - 'edit templates...' button did not work for newly created assignments; creating a response.pdf file, then clicking 'revert to draft' caused the student's resubmission to have the original response attached to it
- edittemplates.php - did not properly update the templates list on the settings page (particularly with IE)
Sorry to keep adding these updates, but I really think I've got all the bugs now...
- annotate.js - the file I previously uploaded separately, fixes now in main zip
- assignment.class.php - 'edit templates...' button did not work for newly created assignments; creating a response.pdf file, then clicking 'revert to draft' caused the student's resubmission to have the original response attached to it
- edittemplates.php - did not properly update the templates list on the settings page (particularly with IE)
Thanks for setting up the CVS access.
As you may have noticed, I've already checked in a couple of changes (so it is all working).
Did you still want to move the mysql.* files into a 1.8 only branch?
I assume that there will also be a 'create new issue' tracker entry for uploadpdf at some point?
Thanks again!
Davo - I saw the mysql files and if that is the only difference it may be simpler just to leave them. Currently you have a HEAD branch; however, if you want to get into maintaining separate branches just let me know and we can copy whatever is in HEAD at that time to another branch (such as 19STABLE or 18STABLE). Let me know what works best for you. By leaving them in, I think the code should work fine in 1.8 and 1.9. When you want to make HEAD the version for 2.0 or start preparing for that we can create the other branches. Peace - Anthony
Davo - OK, so we have the code in CVS, I've created the component in the tracker and moved this issue to it. I have assigned you as the component lead so all new issues for this component should be assigned to you. You have write privileges on CVS. I was able to play with the annotation and liked how it worked. I think it will be popular among university professors who need to see papers with specific formatting like APA, Turabian, MLA etc. Nice work! Let me know if there is anything else you need. Peace - Anthony
p.s. - Please do take a quick look again at http://docs.moodle.org/en/Development:Guidelines_for_contributed_code to make sure we have covered all the bases such as creating an entry in the Modules and Plugins database (add that link back here in the tracker so that I can update the component description), creating a documentation page, etc.
I'm happy to stick with just 'HEAD' and not separate 1.8/1.9 branches. Don't want to think about 2.0 just yet...
Will add an entry to the Plugin list later today.
Sounds good to me. I'll wait to hear back from you. Peace - Anthony
Davo - Just to let you know that MDL-16796 has been resolved in Moodle 1.9+ so if you want to update the README file known issues section. Thanks for your continued work on this assignment type. Peace - Anthony
Davo - I am happy to throw this into CVS when you think the basic file structure is solid. It is good when we can avoid renaming files or deleting them. For example, /mod/assignment/type/uploadpdf/lang/en_utf8/assignment_uploadpdf.php should be the language filename. I also do not think that we need the /db/mysql.sql file if this is for Moodle 1.9 onwards - the /db/install.xml should be sufficient. I would want to review each of the files and make sure we are not duplicating them (for example, the tcpdf folder exists in /lib so let's double check there is no duplication). Go ahead and take couple of weeks and get things cleaned up as much as you can. In the meantime, I am going to try to get
MDL-16796resolved so that the assignment type string is retrieved properly. Let me know if you have any questions or need any help. Peace - AnthonyMDL-16796resolved so that the assignment type string is retrieved properly. Let me know if you have any questions or need any help. Peace - Anthony