MarkUs Blog

MarkUs Developers Blog About Their Project

Status Reports – October 17

without comments

Jakub Subczynski

This week:

  • 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!

Next week:

  • I hope to have the majority of the rake Assignment test both reviewed and ported over by the end of the week.

Chris

This Week:

  • I was able to get the PDF.js viewer is in MarkUs, and can view, and control zoom on PDFs.

Next Week:

  • Finish some implementation details and cleanup code with the viewer.
  • Fix styling problems with the viewer in MarkUs.

Yusi 

This Week:

  • 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.

Next Week:

  • Eliminate more deprecation warnings and errors.

Written by Jakub Subczynski

October 17th, 2014 at 1:31 pm

Status Reports – October 14

without comments

Irene
Last week:
  • Fixed and closed Issue #1720 - Ascending/Descending icons change column widths
  • Emailed dashboard plan to Karen and David
This week:
  • Revise plan based on feedback and design wireframes
Bryan
This week:
  • 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.
Next week:
  • 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.

Nathan

Last Week:

  • 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

This Week:

  • 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
Tori
Last week:
  • checking out React.js tutorials
  • looking over existing React tables for reference
This week:

  • 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.

Written by Nathan Chow

October 14th, 2014 at 7:58 pm

Posted in Status Reports

Creating A New Tagging Feature for MarkUs

without comments

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.

The new "Tag Creation" view for the tagging feature. Note the React table and sidebar upload and download buttons. Currently, the tag data being displayed in the table is just dummy data that is hard-coded into the view. Don't worry! This will change soon! MarkUs Tagging Feature - Tag Creation View

The new “Tag Creation” view for the tagging feature. Note the React table and sidebar upload and download buttons. Currently, the tag data being displayed in the table is just dummy data that is hard-coded into the view. Don’t worry! This will change soon!

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.

MarkUs Tagging Feature - Upload

The “Download Tags” dialog. Note that the tag file can be downloaded as CSV or YML.

MarkUs Tagging Feature - Upload

The “Upload CSV” dialog. This dialog is very similar to other MarkUs dialogs.

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.

Written by Bryan Muscedere

October 14th, 2014 at 11:18 am

Posted in New Feature

Tagged with , ,

Status Report October 10th

without comments

Chris

Last Week:

  • 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.

Roadblocks:

  • Wasn’t able to work on the CSV upload problem because the VM still needs to be configured fully.

This Week:

  • Complete integration of the viewer into the page.
  • Plan and start implementing annotations.

Yusi

Last Week:

  • 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

Roadblocks:

  • An error related to Active Record appears When log in as admin. The error disappeared when i switched back to rails 3.

This Week:

Fix Deprecation warnings and errors.

Jakub Subczynski

Last week:

  • pushed rspec tests for the Assignment model’s associations and attributes
  • Learned more rspec for the next tests I will write.

This week:

  • Test the Assignment model methods and carry over existing tests from rake test.

Written by Chris Kellendonk

October 10th, 2014 at 12:44 pm

Status Report October 7th

without comments

Nathan

Last Week:

  •  closed rspec tests and issue 1701
  • started back end investigations for tagging project
  • investigated how to interact with database, putting, getting etc.

This Week:

  • grab Bryan’s starter code when it’s ready
  • hash out concrete design and schema changes
  • start implementing the back end
Irene

Last week:

- Made revisions to grouping rspec test file

- Closed Pull Request #1800

This week:

- Write plan for dashboard and send to Karen and David

- Close Issue #1720
Bryan
This week:
  • Submitted an updated fix for issue #1726 (https://github.com/MarkUsProject/Markus/issues/1726). This improved the javascript code such that multiple independent file upload boxes each with their own upload buttons could be controlled independently of each other.
  • 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.
Roadblocks:
  • 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.

Next week:

  • 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.
Tori
Last week:
  • testing issue #1722
This week:

  • get a feel for React tables
  • begin conversion of table in Repository view to React

Written by Nathan Chow

October 7th, 2014 at 5:38 pm

Posted in Status Reports

Status Report for October 3rd

without comments

Chris

Last Week:

  • Researched and created a blog post outlining the feasibility of PDF.js
  • Made some prototypes to prove PDF.js could work for annotations.

Road Blocks

  • Not much documentation outlining the actual PDF.js API so a lot of reverse engineering of the code needed to be done.

This Week

  • Start implementing PDF.js annotation system.
  • Continue work on CSV upload problem.

Yusi

Last Week:

  • 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.

This Week

  • Start working on the upgrade by following checklist in the upgrade guide.
  • Find new issue to fix.

 

Written by Chris Kellendonk

October 3rd, 2014 at 2:03 pm

PDF Viewing and Annotation Improvements

without comments

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.

Annotating PDFs

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.

Technical Details

  1. A PDF could be annotated by creating a annotation layer that sits directly above the canvas and text layers that PDF.js renders. These elements would be rendered in the DOM to allow easy manipulation through Javascript. Such as “onHover” events to show the text when the user hovers their mouse over the annotation. Since each canvas sits inside a “page” container class with absolute positioning this allows any DOM elements to also be positioned so that they line up perfectly with the canvas beneath. Annotations could be positioned within this layer.
  2. 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.
  3. 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.

Written by Chris Kellendonk

October 3rd, 2014 at 10:29 am

Status Report for Sept 30th

without comments

Nathan

Last Week:

  • 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)

This Week:

  • 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?

Irene

This week:
* Created and sent out user study questionnaire regarding MarkUs dashboard
* Submitted pull request for Group model RSpec tests
Next week:
* Fix Issue #1720 “Ascending/Descending icons change column widths”
* Gather responses to questionnaire and start designing wireframes (Issue #1668 Revamp Admin Dashboard)

 

Tori
Last week:
  • learning more ruby/rspec
  • testing issue #1722
  • addressing Hound comments on issue #1722 and AssignmentFile spec
This week:

  • finish testing issue #1722 (i.e. issue #1799)
  • get a feel for React tables
  • begin conversion of table in Repository view to React
Darren
Last week:
* started getting a feel for the RJS files in app/views understanding what I have to change.
* Understanding how to transition the code in app/views from prototype to jquery.
This week:
* continue to learn what exactly needs to be changed in the RJS files
* and implement the changes from prototype to jquery
Brian
This week:
  • 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.
Roadblocks:
  • 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.
Next week:
  • 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.

Written by Nathan Chow

September 30th, 2014 at 12:46 pm

Posted in Status Reports

Status Report for Sept 26th

without comments

Chris

Last Week:

  • 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.

This Week:

  • 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.

Jakub

Last Week:

  • Attended Code Sprint
  • Fixed issue #1768 (API for adding users doesn’t work for REMOTE_USER_AUTH)
  • Fixed issue #1718 (Submissions table missing asset)

This Week:

  • 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

Yusi

Last Week:

  • 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

This Week:

  • Continue working on Mark model rspec test
  • Make a plan for what need to be changed for the upgrade

Written by Chris Kellendonk

September 26th, 2014 at 11:27 am

Status Report for Sept 23rd

with 2 comments

Irene

Last week:

  • Attended the code sprint in Toronto!
  • Fixed Issue #1959 Spreadsheets “Select: All” button doesn’t select all
  • Changed spreadsheets to bigger page sizes

This week:

  • Continue working on Issue #1920
  • Expand on rspec for group model
  • Write questionnaire for Dashboard usability study

 

Bryan

Last week:

  • 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.

This week:

  • 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.

Darren

Last week:

  • Attended the code sprint in toronto
  • worked on my assigned rspec tests
  • got my development environment set up

This week:

  • Finish off issue #1763
  • start transitioning from prototype to jquery which is issue #1496

Nathan

  • Attended code sprint in toronto
  • finished off first issue
  • started working on issue 1726 and 1701
  • created rspec test for image_annotations

This week:

  • address pull request comments on rspec tests
  • continue working on issue 1701

 

Written by Irene Fung

September 22nd, 2014 at 11:02 pm

Posted in Status Reports