project: Moodle
summary: Add pdf submission/feedback assignment types to core
description: After giving a demo of my online PDF annotation assignment plugins to Martin D during the Dublin Moodle Moot he was very keen that these should become part of core in Moodle 2.5. The current code can be found here: There are a number of issues I can see with this (all of which have, so far, been answered with a we can tidy them up later): This is a Moodle 1.9 assignment type, converted to a Moodle 2.0 assignment type, converted to a pair of Moodle 2.3 assign plugins (feedback / submission), that has developed far more than ever originally intended => the code (especially the javascript) is a bit messy in many places. The main javascript library is Mootools (this seemed like a good idea 4 years ago when I started) The tools buttons are YUI2 code There is a requirement for ghostscript to be installed on the server (which would need some extra code to check for this and disable the plugin if ghostscript was unavailable) There are no unit tests On the positive side: It works (although the code has been tested more thoroughly in the mod_assignment version, as it has only recently been converted to Moodle 2.3+) It has a good range of tools that are useful to a teacher annotating assignments (as I spent about 3 years using it to mark assignments, as I developed it). Apart from the ghostscript requirement, the only other requirement is the FPDI library which is PHP code and licensed under the Apache License v2.0 (this needs one, very small, modification to work properly within Moodle)

1.summary: Update icons in feedback_pdf plugin to match core style.
description: Update icons in feedback_pdf plugin to match core style. Note - there is an issue currently being worked on to update the "editor" icons in Moodle - which should include the icons that are needed for this plugin.
2.summary: Import latest branch of upload pdf code
description: Import latest branch of upload pdf code and make sure it is passing all unit tests. Note - it will not be functional initially because the submission_pdf will be missing.
3.summary: Remove coversheet functionality from upload pdf code
description: Remove coversheet functionality from upload pdf code
4.summary: Modify feedback_pdf to work with pdfs uploaded by any submission plugin.
description: Modify feedback_pdf to work with pdfs uploaded by any submission plugin.
5.summary: Allow assignment plugins to "just be on"
description: ie - if the assignment plugin says - I AM ON - dont make the user tick the checkbox. Apply this to submission_comments if comments are enabled, and to feedback_pdf.
6.summary: Add touch support editpdf plugin
description: Add touch support editpdf plugin
7.summary: Modify feedback_pdf plugin so that the editing occurs on the assignment grading page - not a separate page.
description: Modify feedback_pdf plugin so that the editing occurs on the assignment grading page - not a separate page.
8.summary: Revise cron usage in feedback_pdf plugin and convert to adhoc_task
description: Once has been integrated... Revise cron usage in feedback_pdf plugin and convert to adhoc_task.
9.summary: Verify no UI RTL issues with feedback_pdf plugin.
description: Verify no RTL issues with feedback_pdf plugin (may need to include RTL fonts).
10.summary: Add unit tests for editpdf after refactoring
description: Add unit tests and behat tests to feedback_pdf plugin
11.summary: Edit PDF: Finish work on comments tool
description: Things to do for the comments tool: Prevent HTML tags from appearing in the comments (maybe switch to a textarea) Fix incorrect offsets when the page is scrolled.
12.summary: Edit PDF: Enable colour and tool chooser menus.
description: The HTML is in place but needs some javascript to toggle the menus open/closed and change the variables defining the current tool/colours.
13.summary: Edit PDF: Add list of generated pdf(s) to grading form
description: The final downloadable PDFs need to be shown to teachers (only shown to students currently). Previously generated PDFs should be overwritten when annotations are adjusted.
14.summary: Edit PDF: Add line tool (including rectangle + oval tools)
description: Write the YUI renderer for the line tool.
15.summary: Edit PDF: Add rectangle tools
description: Add support for the rectangle tool.
16.summary: Edit PDF: Add support for the oval tool
description: Add support for the oval tool
17.summary: Edit PDF: Add support for the pen tool
description: Add support for the pen tool
18.summary: Edit PDF: Add support for the select tool
description: Add support for the select tool: erase drag and drop
19.summary: Edit PDF: create layout mockup
description: As it was mentioned during the scrum meeting we should decide of a layout for the edit pdf feedback.
20.summary: Edit PDF: Add support for the stamp tool
description: Add support for the stamp tool
21.summary: Edit PDF: switch the current color button for a CSS div button
description: switch the current color button for a CSS div button (dont use image - use the correct CSS color code)
22.summary: Editpdf - Let students view pdf online (not just downloadable version)
description: This has to only include the list of comments included in the generated pdf.
23.summary: Edit PDF: Add support for the highlighter tool
description: Also needs transparent images for backend rendering.
24.summary: EditPDF: Add clear as a background colour for comments.
description: This is used e.g. when putting text in boxes.
25.summary: EditPDF: Add comments quicklist
description: Add the comments quicklist + searching interface.
26.summary: EditPDF: Add high/low contrast view
description: It may be a benefit to allow all the comments/annotations on the page to be displayed in high/low contrast for certain users.
27.summary: EditPDF: Create keyboard shortcuts for tools.
description: The original had a set of keyboard shortcuts to allow quickly switching tools without scrolling to the toolbar. We just need to do some research and make sure we dont do this in a way that will conflict with built in shortcuts (e.g. for screen readers).
28.summary: Edit PDF: Split up javascript into smaller modules
description: Suggestions are: comments, annotations, menus, quicklist and editor
29.summary: Edit PDF: Update more icons
description: Update more icons such as: previous page next page search comment comment color options shapes color options stamp options generate pdf feedback
30.summary: Editpdf: add font for hebrew language (pdf generation)
description: When generating the pdf, ???? ??? ???? ??? are displayed instead of the hebrew language.
31.summary: Edit PDF: Integrate editpdf plugin for mod_assign
description: This task is to integrate the initial version of the editpdf plugin. There are a few issues in the Epic that will be done after the release of 2.6 (particularly the background processing) so we want to keep the epic open and make this first version one of the sub tasks.
32.summary: Editpdf: add option to choose right to left in the comment menu
description: In order to generate RTL comments and English comment on a same page we should have an option RTL in each comment menu (top-left menu of a comment)
33.summary: Edit PDF: Add behat tests
description: We need to add behat tests for the Edit PDF plugin - but there are 2 things that require solving first. 1. How to simulate mouse/touch drags 2. How to skip the tests if ghostscript is not available.
34.summary: Edit PDF: Show page numbers in find comments
description: It would be helpful to be able to see page numbers in the find comments box (similar to how they were shown in the old version of the plugin).
35.summary: Edit PDF: Difficult to stop adding comments
description: Create a comment. Click off the comment, somewhere else on the page and Moodle starts creating a new comment (with the old version, clicking saved a comment but did not start creating a new comment - you had to click a second time in order to do that). This makes it quite difficult to just stop inserting comments, so that you can read the text on the page.
36.summary: Edit PDF: Find comment does not scroll page to show comment
description: In the old version of the plugin, selecting a comment in find comment made sure the browser was scrolled to show the selected comment. In the new version this doesnt appear to happen.
37.summary: Edit PDF: changing comment colours
description: There does not seem to be any way to change the background colour of an existing comment. In the old version, this was available as a right-click option, so it might make sense to add this to the menu icon on the comment.
38.summary: Edit PDF: highlighter tool drawn from the top
description: Very minor point. In the old version of the plugin, the highlighter tool deliberately drew from the middle - i.e. you clicked and dragged across the middle of a word to draw a highlight across it. In the new version the highlight draws from the top - i.e. clicking and dragging across the middle of a word would result in the bottom half of the word being highlighted (along with some of the space below the word). Not a major point, but the original behaviour was a deliberate usability choice.
39.summary: Edit PDF: quicklist comments fiddly to insert
description: Currently inserting an item from the quicklist involves: 1. Creating a comment 2. Clicking on the menu on that comment 3. Clicking on the quicklist item to convert the new comment into the quicklist comment (Sometimes the comment has also disappeared when the menu was clicked on, due to losing focus and having no content, so inserting the quicklist item has not worked). Previous version was: 1. Right click where you want the quicklist item to appear 2. Click on the comment I understand that this is an attempt to work without right-click, but this feels quite clunky for a feature that is supposed to be very quick to use.
40.summary: Edit PDF: Wrong cursor when students view online
description: Minor point: If a student views the PDF annotations online, then they get a crosshair cursor, implying that it is possible for them to interact with the page in some manner. This is not the case, as the page is in read-only mode.
41.summary: EditPDF: Add default stamp images
description: We need to add the new default stamp images done by barbara in (they are in the zip file)
42.summary: Editpdf: display a warning on the notification page when ghostscript is not properly setup.
description: When ghostscript is not properly set up either display a warning on the admin notification page, either do not allow to enable the plugin if its not properly setup.
43.summary: Edit PDF: Add default stamps admin setting
description: It would be helpful to have a button on the admin settings for the editpdf feedback type to restore all the default stamp images, in case an admin has deleted some of them and wants to get them back. This button should restore any stamps that have been deleted, without duplicating any which are still there (based on the filename - if the filename has been changed, then duplication should be allowed) and without deleting any custom stamps that have been added.
44.summary: EditPDF: add erase all changes button
description: Add one button that delete all draft changes (If we really want this). Note there is some piece of code in ajax.php call revertchanges that already does the thing.

Below is an instruction that describes a task, paired with an input that provides an epic with this format: 
"project": "Name of the project" 
"summary": "Summary of the epic user story" 
"description": "Description of the epic user story". Write a response that appropriately completes the request.### Instruction:
Break this epic user story into smaller tasks to help the developers understand the epic better, you can divide this epic into as much as you want depending on the complexity of the epic.
### Input:
project: Moodle
summary: Add pdf submission/feedback assignment types to core
description: After giving a demo of my online PDF annotation assignment plugins to Martin D during the Dublin Moodle Moot he was very keen that these should become part of core in Moodle 2.5. The current code can be found here: There are a number of issues I can see with this (all of which have, so far, been answered with a we can tidy them up later): This is a Moodle 1.9 assignment type, converted to a Moodle 2.0 assignment type, converted to a pair of Moodle 2.3 assign plugins (feedback / submission), that has developed far more than ever originally intended => the code (especially the javascript) is a bit messy in many places. The main javascript library is Mootools (this seemed like a good idea 4 years ago when I started) The tools buttons are YUI2 code There is a requirement for ghostscript to be installed on the server (which would need some extra code to check for this and disable the plugin if ghostscript was unavailable) There are no unit tests On the positive side: It works (although the code has been tested more thoroughly in the mod_assignment version, as it has only recently been converted to Moodle 2.3+) It has a good range of tools that are useful to a teacher annotating assignments (as I spent about 3 years using it to mark assignments, as I developed it). Apart from the ghostscript requirement, the only other requirement is the FPDI library which is PHP code and licensed under the Apache License v2.0 (this needs one, very small, modification to work properly within Moodle)

### Response:
1.summary: Update icons in feedback_pdf plugin to match core style.
description: Update icons in feedback_pdf plugin to match core style. Note - there is an issue currently being worked on to update the "editor" icons in Moodle - which should include the icons that are needed for this plugin.
2.summary: Import latest branch of upload pdf code
description: Import latest branch of upload pdf code and make sure it is passing all unit tests. Note - it will not be functional initially because the submission_pdf will be missing.
3.summary: Remove coversheet functionality from upload pdf code
description: Remove coversheet functionality from upload pdf code
4.summary: Modify feedback_pdf to work with pdfs uploaded by any submission plugin.
description: Modify feedback_pdf to work with pdfs uploaded by any submission plugin.
5.summary: Allow assignment plugins to "just be on"
description: ie - if the assignment plugin says - I AM ON - dont make the user tick the checkbox. Apply this to submission_comments if comments are enabled, and to feedback_pdf.
6.summary: Add touch support editpdf plugin
description: Add touch support editpdf plugin
7.summary: Modify feedback_pdf plugin so that the editing occurs on the assignment grading page - not a separate page.
description: Modify feedback_pdf plugin so that the editing occurs on the assignment grading page - not a separate page.
8.summary: Revise cron usage in feedback_pdf plugin and convert to adhoc_task
description: Once has been integrated... Revise cron usage in feedback_pdf plugin and convert to adhoc_task.
9.summary: Verify no UI RTL issues with feedback_pdf plugin.
description: Verify no RTL issues with feedback_pdf plugin (may need to include RTL fonts).
10.summary: Add unit tests for editpdf after refactoring
description: Add unit tests and behat tests to feedback_pdf plugin
11.summary: Edit PDF: Finish work on comments tool
description: Things to do for the comments tool: Prevent HTML tags from appearing in the comments (maybe switch to a textarea) Fix incorrect offsets when the page is scrolled.
12.summary: Edit PDF: Enable colour and tool chooser menus.
description: The HTML is in place but needs some javascript to toggle the menus open/closed and change the variables defining the current tool/colours.
13.summary: Edit PDF: Add list of generated pdf(s) to grading form
description: The final downloadable PDFs need to be shown to teachers (only shown to students currently). Previously generated PDFs should be overwritten when annotations are adjusted.
14.summary: Edit PDF: Add line tool (including rectangle + oval tools)
description: Write the YUI renderer for the line tool.
15.summary: Edit PDF: Add rectangle tools
description: Add support for the rectangle tool.
16.summary: Edit PDF: Add support for the oval tool
description: Add support for the oval tool
17.summary: Edit PDF: Add support for the pen tool
description: Add support for the pen tool
18.summary: Edit PDF: Add support for the select tool
description: Add support for the select tool: erase drag and drop
19.summary: Edit PDF: create layout mockup
description: As it was mentioned during the scrum meeting we should decide of a layout for the edit pdf feedback.
20.summary: Edit PDF: Add support for the stamp tool
description: Add support for the stamp tool
21.summary: Edit PDF: switch the current color button for a CSS div button
description: switch the current color button for a CSS div button (dont use image - use the correct CSS color code)
22.summary: Editpdf - Let students view pdf online (not just downloadable version)
description: This has to only include the list of comments included in the generated pdf.
23.summary: Edit PDF: Add support for the highlighter tool
description: Also needs transparent images for backend rendering.
24.summary: EditPDF: Add clear as a background colour for comments.
description: This is used e.g. when putting text in boxes.
25.summary: EditPDF: Add comments quicklist
description: Add the comments quicklist + searching interface.
26.summary: EditPDF: Add high/low contrast view
description: It may be a benefit to allow all the comments/annotations on the page to be displayed in high/low contrast for certain users.
27.summary: EditPDF: Create keyboard shortcuts for tools.
description: The original had a set of keyboard shortcuts to allow quickly switching tools without scrolling to the toolbar. We just need to do some research and make sure we dont do this in a way that will conflict with built in shortcuts (e.g. for screen readers).
28.summary: Edit PDF: Split up javascript into smaller modules
description: Suggestions are: comments, annotations, menus, quicklist and editor
29.summary: Edit PDF: Update more icons
description: Update more icons such as: previous page next page search comment comment color options shapes color options stamp options generate pdf feedback
30.summary: Editpdf: add font for hebrew language (pdf generation)
description: When generating the pdf, ???? ??? ???? ??? are displayed instead of the hebrew language.
31.summary: Edit PDF: Integrate editpdf plugin for mod_assign
description: This task is to integrate the initial version of the editpdf plugin. There are a few issues in the Epic that will be done after the release of 2.6 (particularly the background processing) so we want to keep the epic open and make this first version one of the sub tasks.
32.summary: Editpdf: add option to choose right to left in the comment menu
description: In order to generate RTL comments and English comment on a same page we should have an option RTL in each comment menu (top-left menu of a comment)
33.summary: Edit PDF: Add behat tests
description: We need to add behat tests for the Edit PDF plugin - but there are 2 things that require solving first. 1. How to simulate mouse/touch drags 2. How to skip the tests if ghostscript is not available.
34.summary: Edit PDF: Show page numbers in find comments
description: It would be helpful to be able to see page numbers in the find comments box (similar to how they were shown in the old version of the plugin).
35.summary: Edit PDF: Difficult to stop adding comments
description: Create a comment. Click off the comment, somewhere else on the page and Moodle starts creating a new comment (with the old version, clicking saved a comment but did not start creating a new comment - you had to click a second time in order to do that). This makes it quite difficult to just stop inserting comments, so that you can read the text on the page.
36.summary: Edit PDF: Find comment does not scroll page to show comment
description: In the old version of the plugin, selecting a comment in find comment made sure the browser was scrolled to show the selected comment. In the new version this doesnt appear to happen.
37.summary: Edit PDF: changing comment colours
description: There does not seem to be any way to change the background colour of an existing comment. In the old version, this was available as a right-click option, so it might make sense to add this to the menu icon on the comment.
38.summary: Edit PDF: highlighter tool drawn from the top
description: Very minor point. In the old version of the plugin, the highlighter tool deliberately drew from the middle - i.e. you clicked and dragged across the middle of a word to draw a highlight across it. In the new version the highlight draws from the top - i.e. clicking and dragging across the middle of a word would result in the bottom half of the word being highlighted (along with some of the space below the word). Not a major point, but the original behaviour was a deliberate usability choice.
39.summary: Edit PDF: quicklist comments fiddly to insert
description: Currently inserting an item from the quicklist involves: 1. Creating a comment 2. Clicking on the menu on that comment 3. Clicking on the quicklist item to convert the new comment into the quicklist comment (Sometimes the comment has also disappeared when the menu was clicked on, due to losing focus and having no content, so inserting the quicklist item has not worked). Previous version was: 1. Right click where you want the quicklist item to appear 2. Click on the comment I understand that this is an attempt to work without right-click, but this feels quite clunky for a feature that is supposed to be very quick to use.
40.summary: Edit PDF: Wrong cursor when students view online
description: Minor point: If a student views the PDF annotations online, then they get a crosshair cursor, implying that it is possible for them to interact with the page in some manner. This is not the case, as the page is in read-only mode.
41.summary: EditPDF: Add default stamp images
description: We need to add the new default stamp images done by barbara in (they are in the zip file)
42.summary: Editpdf: display a warning on the notification page when ghostscript is not properly setup.
description: When ghostscript is not properly set up either display a warning on the admin notification page, either do not allow to enable the plugin if its not properly setup.
43.summary: Edit PDF: Add default stamps admin setting
description: It would be helpful to have a button on the admin settings for the editpdf feedback type to restore all the default stamp images, in case an admin has deleted some of them and wants to get them back. This button should restore any stamps that have been deleted, without duplicating any which are still there (based on the filename - if the filename has been changed, then duplication should be allowed) and without deleting any custom stamps that have been added.
44.summary: EditPDF: add erase all changes button
description: Add one button that delete all draft changes (If we really want this). Note there is some piece of code in ajax.php call revertchanges that already does the thing.
