- I posted a couple of issues, #1840 and #1841, that both deal with adding consistency to the application
- I have been working on converting the rake Assignment tests over. There are many!
- I hope to have the majority of the rake Assignment test both reviewed and ported over by the end of the week.
- I was able to get the PDF.js viewer is in MarkUs, and can view, and control zoom on PDFs.
- Finish some implementation details and cleanup code with the viewer.
- Fix styling problems with the viewer in MarkUs.
- Fix deprecation warning according to server log from running rspec test.(Relation#all, Relation#first warnings etc),
but there are still many deprecation warnings and errors when I run rake test.
- Fix the error when log in as admin.
- Eliminate more deprecation warnings and errors.
- Fixed and closed Issue #1720 - Ascending/Descending icons change column widths
- Emailed dashboard plan to Karen and David
- Revise plan based on feedback and design wireframes
- Submitted a new view for issue #1726 (https://github.com/
MarkUsProject/Markus/issues/ 1726). The Flexible Criteria view now has an upload dialog that only enables its upload button when a file is selected.
- Added and improved a Tag view for the tagging feature. This view is not connected to a working controller but has working upload, download, create dialogs and a React table that is currently filled with “dummy data”.
- Submitted a post to the MarkUs blog outlining the tagging feature and upcoming features for it.
- Adding tag functionality to the submissions page and the assignment screen. This will allow filtering by tag and assigning tags to assignments. This will still not be connected to the tag controller.
- Looked over the database schema and wrote up proposed changes to the schema for the tagging project
- Read up on ActiveRecord
- Unfortunately did not have much time to work on Markus due to other course commitments and going out of town for Thanksgiving weekend
- Begin implementing changes reflected by the proposed changes to the database schema
- implement logic to create new tags, query for tags, and display tags next to submissions
- checking out React.js tutorials
- looking over existing React tables for reference
- conversion of table in Repository view to React
Note: I had a hectic sort of week and didn’t put much time into this course; my goal for this week is to put in a minimum of 10h and make up for lost time the following week, which should be less busy.
Since the UCOSP code sprint that occurred several weeks ago at Mozilla, our development group for this semester has been assigned projects to work on. Nathan and I have been tasked to create a new tagging feature for MarkUs. This post has been written to serve as a Q&A for this new feature and to provide an early look into what this feature may look like from a user perspective.
Tagging Feature? What’s that?
Glad you asked! Essentially, this feature will allow TAs and administrators to tag student submissions based on certain criteria. This criteria could be things such as incomplete assignments, assignments that appear to be really well done, etcetera. The purpose of these tags will allow people marking assignments to then filter the submissions based on certain tags. For instance, say a TA only wants to mark assignments that have a certain tag. To do this, the TA can simply filter assignments by that tag and then only mark those assignments. Voila! It’s that easy!
Another use for this feature could be for TAs that want to notify a course administrator about a certain issue in an assignment. The TA can simply tag the assignment as needing further attention from an administrator. Administrators can then log in to MarkUs and filter the submissions to see if any have this tag.
What has been done so far?
Now onto the technical stuff! Currently, the models and controllers for the tagging system are being created by Nathan (which will not be covered in detail in this post) and I’m working on the views for this feature.
Probably the most important view would be the “Tag Creation View”. Here, administrators are able to create, monitor, edit and delete tags. The motive behind this is that administrators can create “pre-defined” tags for the assignment before marking has commenced. As of now, this view has been created but is not connected to the tag controller.
Essentially, the tag creation view was designed to be as consistent with the MarkUs interface as possible. Basically, other views were looked at and used as a reference to create the view. Additionally, the code for the React tables in the student and submissions views were referenced to ensure similar structure. This makes the code more readable and easier to alter and upgrade in the future.
As you can see in the pictures below, the upload and download dialog boxes are also standardized.
What can I expect in the future?
This is where things get exciting (relatively speaking anyway). Probably the biggest goal is to actually get the views working and to be able to pull Tag data from the ActiveRecord. This will get a working prototype that Nathan and I can begin to refine.
Something that I am beginning to work on now is incorporating the tagging feature into the submissions view. In this, the React table containing all the submissions will have a new column named “Tags”. This will keep track of what tags are assigned to assignments and will allow administrators and TAs to filter assignments by tags. Additionally, in the grading view, there will be a new pane above the rubric panel that will allow markers to add and see current tags.
Currently, Nathan is working on the database side of this project. He is working on creating a proper model and controller for this feature. In the next few weeks, we will begin the process of integrating this model and controller with the view.
Where can I see updates for this feature?
This code is currently being held in the official MarkUs GitHub repository under the “tagging” branch. You can access this code here.
- Modified the collection process so that PDF files are not converted to images.
- Worked on integrating the full PDF.JS viewer into the grading page.
- Wasn’t able to work on the CSV upload problem because the VM still needs to be configured fully.
- Complete integration of the viewer into the page.
- Plan and start implementing annotations.
- Upgraded rails to 4.0 before upgrading to 4.1.
- Wrapped the conditions, order in lambda. The syntax we used before caused errors after upgrading to rails 4
- An error related to Active Record appears When log in as admin. The error disappeared when i switched back to rails 3.
Fix Deprecation warnings and errors.
- pushed rspec tests for the Assignment model’s associations and attributes
- Learned more rspec for the next tests I will write.
- Test the Assignment model methods and carry over existing tests from rake test.
- closed rspec tests and issue 1701
- started back end investigations for tagging project
- investigated how to interact with database, putting, getting etc.
- grab Bryan’s starter code when it’s ready
- hash out concrete design and schema changes
- start implementing the back end
- Made revisions to grouping rspec test file
- Closed Pull Request #1800
- Write plan for dashboard and send to Karen and David
- Submitted an updated fix for issue #1726 (https://github.com/
- Created a model, controller and new view for the tagging system. This new view can be accessed off each assignment page. It allows administrators to create, manage and delete tags. The view currently has no functionality.
- A major roadblock was learning how to incorporate views into MarkUs. It took several hours to ensure the links and stylesheets all worked for the new view.
- Improving the tag view.
- Adding tag functionality to the submissions page and the assignment screen. From here, TAs can see tagged assignments and can tag assignments with preset tags.
- testing issue #1722
- get a feel for React tables
- begin conversion of table in Repository view to React
- Researched and created a blog post outlining the feasibility of PDF.js
- Made some prototypes to prove PDF.js could work for annotations.
- Not much documentation outlining the actual PDF.js API so a lot of reverse engineering of the code needed to be done.
- Start implementing PDF.js annotation system.
- Continue work on CSV upload problem.
- Submitted pull request for Mark model RSpec test.
- Researched and read some documentation about upgrading from rails 3.2 to rails 4, made a small to do list.
- Start working on the upgrade by following checklist in the upgrade guide.
- Find new issue to fix.
Current Problems with PDF Viewing and Annotations
- Collecting all submissions is slow because all the PDFs need to be converted into images first. This is a slow, expensive, and fragile operation.
- Images are not resized and display at their native resolution. This can cause a poor user experience on smaller screens forcing the user to scroll around the page in order to view the entirety of the image.
- Annotations don’t always seem as perfectly fluid as the screen is scrolled.
After research the state of online PDF viewers there does not appear to be many free options that would allow us to do all of the things we need to be able to do in a PDF. There is one library that stands out called PDF.js. It solves many but not all of these issues for us.
How PDF.js Can Help
- There is no longer a need to do any type of pre-computation or conversion in order to view the PDFs. This cuts down significantly on the collection time of assignments that are mainly composed of PDF documents. As well as completely removes the fragile conversion process.
- The library has the ability to control the zoom level and rotation of the document. Thus allowing large documents to be viewed easily on most devices.
- It can print a document if need be.
- As well as supports the native navigation options in PDF files. Such as paging, page previews, and the document outline (i.e. navigating through a table of contents).
All of the above features are supported natively, however the one major feature for us the library is missing is support for adding annotations to an existing document. Which is a core feature of the current system. This is something that would need to be implemented by hand as there are no existing solutions for this library or any other free online system.
PDF.js does not support creating annotations on a document natively. It can display annotations that are already embedded in the PDF but cannot create new ones. I did investigate trying to use the native annotation system however there is not much documentation about how it actually is used so the code would need to be partially reverse engineered to determined exactly what it is doing. Using the native annotation system would be one option. The other could be achieved using the framework that the PDF.js library provides during its normal rendering process.
- The position and size of the annotations would be based off the current scale of the document when the annotation was added. All annotation size and positions would then be normalized so that when storing them in the database all coordinates are based off the document being at a 100% scale.
- The main hurdle with this system is keeping the position of the annotations in line with the document as it is zoomed and rotated. However this is not impossible and there are hooks into the API that would allow for this to be managed. Using `PDFView.currentScale` we can get the current scale of the document and adjust the annotation scaling and position to the document as the zoom level changes. The same technique could then be applied for rotation.
I believe using PDF.js is a viable option that could provide a superior benefit to the graders marking PDF files. It provides a much more natural experience viewing and annotating PDF files. As well as has the added benefit of removing the slow and fragile conversion process.
- address comments on rpsec pr and resubmitted pr
- submitted a pr for issue #1701 (download all files button not working, include annotations not working for single file downloads)
- address any comments on two outstanding prs
- start working on submission tagging project
- code investigation, how to interact with database
- what steps need to be taken to display table?
- what steps need to be taken to insert tags and associate it with a submission?
- learning more ruby/rspec
- testing issue #1722
- addressing Hound comments on issue #1722 and AssignmentFile spec
- finish testing issue #1722 (i.e. issue #1799)
- get a feel for React tables
- begin conversion of table in Repository view to React
- Submitted a fix for issue #1726 (https://github.com/
MarkUsProject/Markus/issues/ 1726). This issue was a stylistic problem where upload buttons would remain enabled even when a file was not selected. Now, a jQuery script was written that only enables the button when a file is selected. This change was implemented across multiple modal dialogs.
- Started working on the back-end for the new assignment tagging system by creating model and controller Ruby scripts for the tags. With this, a schema was created to illustrate what data needed to be stored and the relationships between the Tag model and other models.
- A major roadblock was understanding how Ruby on Rails stores data using ActiveRecord. This roadblock is still ongoing but the issue is starting to make more sense.
- Getting a simple working model and controller implemented for the Tag feature. Although it won’t have full functionality, it will serve as a starting point for implementing the tagging feature.
- Attended the Code Sprint in Toronto!
- Submitted pull request for rspec tests.
- Worked on the CSV large file upload issue (#1766).
- Started researching pdf annotation improvements.
- We were going to try and setup a VM similar to the production server so that the CSV issue and be replicated and logged. When that is complete I will continue trying to resolve this issue.
- Write a blog post regarding the state of web annotations on PDF’s.
- Create prototypes of the PDF annotation feature with PDF.js to determine the feasibility of a new annotation system.
- Attended Code Sprint
- Fixed issue #1768 (API for adding users doesn’t work for REMOTE_USER_AUTH)
- Fixed issue #1718 (Submissions table missing asset)
- In the process of becoming an rspec master.
- Started translating the assignment rake test to an rspec test.
- Also thoroughly going though the assignment model logic itself; added association options and attribute contraints
- Attended Code Sprint
- Fixed issue #1714 (“Reset API Key” button causes help text to show )
- Fixed issue #1655 (Adding two flexible criteria *WITH SAME NAME* silently fails)
- Started Mark model rspec test
- Continue working on Mark model rspec test
- Make a plan for what need to be changed for the upgrade
- Attended the code sprint in Toronto!
- Fixed Issue #1959 Spreadsheets “Select: All” button doesn’t select all
- Changed spreadsheets to bigger page sizes
- Continue working on Issue #1920
- Expand on rspec for group model
- Write questionnaire for Dashboard usability study
- Attended the code sprint in Toronto and met the rest of the UCOSP participants!
- Fixed Issues #1728 (Can’t upload hidden assignments) and #1729 (Spreadsheet csv shouldn’t require “”).
- Created an rspec test for the Annotations model.
- Continue working on Issue #1726 with Nathan.
- Begin to explore a feature to allow TAs and admins to tag assignments. Currently exploring different options on how this can be carried out. See feature #8 for more information.
- Attended the code sprint in toronto
- worked on my assigned rspec tests
- got my development environment set up
- Finish off issue #1763
- start transitioning from prototype to jquery which is issue #1496
- Attended code sprint in toronto
- finished off first issue
- started working on issue 1726 and 1701
- created rspec test for image_annotations
- address pull request comments on rspec tests
- continue working on issue 1701