MarkUs Blog

MarkUs Developers Blog About Their Project

Archive for the ‘Developer Essentials’ Category

Status Update – Feb 27

without comments

Paymahn

  • This week
    • started writing UTs for MathJax integration. Started having difficulty testing well, took a step back and realized the integration could be significantly simplified.
    • Simplified MathJax integration (deleted lots of code)
    • Finished mathjax integration and put up a PR
  • Next week
    • Unknown. Either pick up a new project or fix any bugs found while checking the PR

Christian

  • This week
    • Wrapped up the last issues with the remarks (adding an extra mark not working and deleting database records for extra marks when they aren’t needed).
    • Started creating a modal that’ll popup when you’re close to expiry (currently thinking it’ll popup, say “You’re about to expire; press here to cancel that”, something like that). Currently got the javascript that’ll check every minute or so hooked up, and figured out how we’re tracking the session timeout.
  • Next week
    • More of the modal. If it turns out way easier than I think it’ll be, I’ll be able to start work on the double login bug too.

Ryan

  • This week
    • Searched though react docs to find way to hide a column for hours, was unsuccessful
    • Figured out how to get data from the conroller to the view with rails
    • Searched for all the section columns and set them to hide if there are no sections set
    • Started to investigate ajax update issue with the marks_graders tables
  • Next week
    • Try to find a solution to the ajax issue, ensure react is implemented correctly on the marks_graders page
  • Issues
    • There doesnt seem to be much documentation on how to use the react tables so I spent a lot of time trying to figure them out
    • This was my first time using the rails MVC style so there was learning curve there
    • Finding all the section columns wasnt as simple as I had hoped

Maryna

  • This week
    • worked on issue 664: Add tests for our routes
    • Re-writing the test from this outdated patch: https://gist.github.com/benjaminvialle/4055208
    • Completed:
      ‘Routing to main page’
      ‘Admin resource’
      ‘An Assignment collection’
      ‘An Assignment member’
      ‘An Assignment’s rubric’
      ‘An Assignment’s flexible criteria’
      ‘An Assignment’s automated test’
  • Next week
    • continue working on tests for csv upload and routes tests
  • Issues
    • as the routes.rb file got changed over the year, some routes became outdated and new routes were added. Have to trace the changes to write new tests and remove outdated

Peter

  • This week
    • Completed the implementation of the Grade Entry Table using React
      • Search, Sorting, and Selecting all working now
  • Next week
    • Work on Issue 1974: Add Bonus Column to Spreadsheet
    • Work on Issue 1762: “total_grade” should be a calculated field in the database.

Josh

  • This week
    • NA
  • Next week
    • NA

 

Written by Paymahn Moghadasian

February 26th, 2015 at 10:11 pm

Status Update – Feb 20

without comments

Paymahn

  • This week
    • Did manual testing of annotation system with MathJax. Found several bugs specific to my work (PDFs and something else I forget) and several on development
    • Opened issues: 2045, 2043 and 2042
  • Next week
    • Unit testing, finally

Maryna

  • This week
    • Finished issue 218: adding tests for “calculate_collection_time” and “calculate_grouping_collection_time”
    • Mid-way done with issue 99: “Create unit tests and functional tests for CSV upload/download”
    • Download unit tests are done:
         ‘tests that action csv_downloads returns OK’
         ‘expects a call to send_data’
         ‘sets disposition as attachment’
         ‘returns vnd.ms-excel type’
         ‘passes naming conventions’
    • Upload is much more complicated. Here are the tests that I have started:
         ‘does not accept an empty file’
         ‘should gracefully fail on non-csv file with .csv extension’
         ‘does not accept .csv file with wrong column names’
  • Next week
    • Right now if we try uploading a non-csv file with csv extension – the application crashes. To catch this exception functional testing must be implemented. I would also have to think about other testing for the upload
  • Problems
    • every time no matter if the file is correct or not, it gets redirected
    • all calls to this upload function return status 302, go somewhere else and respond with the appropriate status code. Unit testing cannot trace such response

Christian

  • This week
    • Refactoring in and around the remarks and results screen, namely changing how (and when) remark results are generated
    • reworking the views in the results screen, since they shouldn’t be checking the user role if they’re in a role-specific folder.
    • Started the add extra mark issue, which’ll likely be fast
  • Next week
    • I’m going to need to pick a new area and set of issues to work on, which I’ll be bringing up in this week’s meeting

Ryan

  • This week
    • Investigated annotation bugs
    • Applied and thoroughly tested the fixes, found a few hidden issues that were already exisiting and fixed them as well
    • Made hound happy
  • Next week
    • Take a big stab at the react stuff! I hope to put in double time next week to make up for this week
  • Issues
    • Hound
    • I didn’t have a lot of time to put in this week (Other classes, V-Day, birthdays, huge hassle getting my washing machine replaced, etc etc)

Josh

  • This week
    • NA
  • Next week
    • NA

Peter

  • This week
    • Continued work on the Admin/Grader spreadsheet implementation using React
    • Updated the React table input textboxes for grades to dynamically save
  • Next week
    • Continue working on and debugging the spreadsheets table implementation using React
    • Potentially start on other issues currently assigned to me
  • Issues
    • There are still issues with the sorting, checkboxing, and searching that I need to look into
  • Notes
    • I was away travelling for most of this week as it was reading break at UBC, so I wasn’t able to get as much work done.

Written by Paymahn Moghadasian

February 20th, 2015 at 12:09 am

Status Update – Feb 13

without comments

Paymahn

  • This week
    • Fixed issue with annotation pop up on mouse hover
    • Figured out how to get math rendering to work on the annotations categories page
  • Next week
    • I’m pretty sure my branch has introduced some regressions, I’m going to investigate those and see how to fix them
    • Time permitting I’ll write UTs
  • Issues
    • Annotations get truncated in the annotation lists and thus don’t render properly. Not sure what to do for this. See image below:
Long annotations get truncated

Notice the bottom entry of the list

Maryna

  • This week
    • I was working on issue99 (Simple Grade Entry: Create unit tests and functional tests for CSV upload/download).
    • While understanding how the csv works for the Marks Spreadsheet I ran into few errors/concerns that I want to discuss during the meeting. (Here goes the text from the word document)
  • Next week
    • continue working on issue99 and issue218 (still have to do that additional test that checks the section due dates)

Ryan

  • This week
    • Implemented style changes for annotation upgrade
    • Fixed failing test cases caused by the addition of column_start and column_end fields to the annotation table
    • Added placeholder texts to react table search fields (including general react research/how-to)
  • Next week
    • Try to make more major changes with the react issues
  • Issues
    • Fixing the test took a long time, Im not familiar with ruby tests and the logs werent very helpful for finding the source of the issue. They gave me an idea what to look for but not where.
    • Getting started with react took a bit

Christian

  • This week
    • Working on issue 1933, re-enabled the save button, found the commit that fixed 1933, set things up so that if a student saves a remark request, the marker can’t see it.
  • Next week
    • More of the save-button related stuff, I don’t like the way it creates new result sets, so that’s getting rebuilt to create the remarks with the old marks (which I should have done the first time), and the results view and files need a bit of refactoring (namely, the marker views render a bunch of the student view components).

Peter

  • This week
    • Continued work on the Admin/Grader spreadsheet implementation using React
    • Provisioned and linked all the student data of the Spreadsheets table to the new React table
    • Working on the input textboxes for grades to dynamically save with React
  • Next week
    • Continue working on and debugging the spreadsheets table implementation using React
    • Potentially start on other issues currently assigned to me
  • Issues
    • The sorting and searching don’t seem to be working properly, currently debugging potential causes
      • Sorting is not ordering the elements properly
      • Entering anything in the search box causes a Uncaught TypeError

Josh

  • This week
    • Began updating rubric criterion to support fewer or more achievement levels
  • Next week
    • Hopefully finish achievement levels upgrade and begin refactoring marking schemes to allow a mix of rubric and flexible criteria
  • Issues
    • Seems like it’ll be extremely difficult to support an arbitrary number of levels. Better to try to stay DRY and robust with arbitrary level implementation, or w

Written by Paymahn Moghadasian

February 13th, 2015 at 12:03 am

Status Update – Feb 6

without comments

Josh

  • This week
    • Explored rubric implementation, took notes/planned future changes
    • Mistakenly began student-side summary page before realizing that the priority was admin table
    • Began work on admin marks summary page
  • Next week
    • Clear all changes and refactorings with supervisor
    • Complete implementing admin marks summary page, hopefully begin on student summary page

Christian

  • This week
    • Save button bugs
  • Next week
    • More of the same
  • Problems
    • Lots of projects came due this week, so I didn’t have much time

Paymahn

  • This week
    • contacted previous students about MathJax integration
    • integrated their work and got several parts of the integration working
  • Next week
    • will spend more time getting familiar with the annotation system
    • finalize integration
    • write tests
  • Problems
    • MathJax isn’t working for viewing the annotations while hovering but works elsewhere

Ryan

  • This week
    • Finished redoing the annotation update that now breaks the spans up and highlights only the selected text
    • Adjusted the mouse listener events so they only showed up on the highlighted text, not the entire line
    • Fixed up the overlapping annotation structure, added third depth to the CSS, and made colors more obvious
    • Noticed that the mouse listeners were not disposed if an annotation was removed and fixed that
    • Made a migration file and removed the changes I made to the schema file (noob move, my bad!)
  • Next week
    • Clean up any style issues or suggestions from David/the markus team
    • Start working on the react/table issues
  • Problems
    • Tracking the annotation depths/IDs was a huge pain! Turns out you cant use a DOM node as a dictionary key

Maryna

  • This week
    • worked on issue 218 regarding creating new tests for two existing functions
    • have two tests for checking if the value is nil and checking if the value is a date
    • want to add one more test to calculate_grouping_collection_time(grouping)
    • right now the testing factories are set up in the way that the grouping parameter is empty. This prevents the test from entering if statement. I want to create a test for the particular piece of code within if(), now I have to figure out the way how to change the grouping parameter
    • the major obstacle: figuring out the relationships between models
    • added final bits to issue 76 (add required file option to fix in the file names). Pure ruby-js communication which can be stubborn at times. Took more hours than I anticipated (basically half of the time this week
  • Next week
    • add that test for #218 and work on issue 99: “Simple Grade Entry: Create unit tests and functional tests for CSV upload/download”

Peter

  • This week
    • Updating the Spreadsheets interface for graders
  • Next week
    • Continue working on the Spreadsheets interface for graders

Written by Paymahn Moghadasian

February 5th, 2015 at 10:22 pm

Status Update – Jan 29 2015

without comments

Christian

  • This week
    • Figured out what was going wrong with displaying remarks to markers
  • Next week
    • figure out why the save button was deleting marks and fixing that

Peter

  • This week
    • Fixed issue-1760 – Converted Student Interface’s marks spreadsheet table to React.js
    • Working on #1974: Add “Bonus” columns to spreadsheets
  • Next week
    • Work on issue #1974
    • Potentially work on #1704: Warn before browsing away whilst uploading spreadsheet marks
  • Others
    • It’s my first time working with React.js so any feedback on implementation would be appreciated

Paymahn

  • This week
    • Finished off #1795. PR still hasn’t been merged but I’m confident it’s done.
  • Next week
    • Start working on integrating MathJax. Will be mostly investigative work and maybe some playing around.

Ryan

  • This week
    • Finished the first iteration of text annotation for specific text selections
      • implemented it by using javas execCommand function
      • this presented several new issues, including breaking original text selection method
      • decided it would be best to redo the highlight function and add classes to the text nodes between the end and start column then split the end/start into two spans, one to leave plain the other to highlight
    • fixed up the way the column offsets were calculated when there were multiple spans in the line
  • Next week
    • I need to finish implementing the new highlight method
      • all that’s left is to clean it up and handle a few edge cases.
  • Problems
    • struggled to parse all the DOM nodes, specifically finding the applied styles

Maryna

  • This week
    • learning respec (BDD, Red/Green testing, basic tests, built in matchers, stubs vs mocks, fixtures and factories
    • examined present markus code
      • Looking at models and associations and attributes to understand DB structure
      • Write the tests for calculate_collection_time and calculate_grouping_collection_time to close ticket #218
  • Next week
    • to continue working on assigned tickets (adding new tests to some implementations)
    • to start looking into translating existing rake tests into RSpec
  • Problems
    • understanding the reasoning/meaning behind some of the code
      • assignment.latest_due_date + hours_sum.hours and hours_sum is always 0. Type casting?

Josh

  • This week
    • NA
  • Next week
    • NA

Written by Paymahn Moghadasian

January 30th, 2015 at 12:28 am

Status Report – Jan 23 2015

without comments

Christian

  • Last week
    • Confirmed existence of #2014
    • Refactored a bit of the remark display in the results controller
    • Made old marks populate the marks fields when remarking assignments (issue 1975)
  • This week
    • Fix issues 2014 and 1869

Maryna

  • Last week
    • worked on issue 76: Disallow non-AssignmentFiles option in Assignment Properties. done and pushed. The major challenge: work on the front end (styling). Had to learn the basis of jQuery to make options pop up in the right places.
    • learning RSpec from the scratch by video tutorials. Reading report provided by one of the students who worked on Markus previously. So far so good.
  • This week
    • review the RSpec tickets assigned by David and find the easiest one to start with.
    • If I would require more time to learn RSpec, my plan is to find some unsigned issues that I could work on in the meantime.

Ryan

  • Last week
    • worked on getting the text annotations to display on only the selected text and not the entire line
    •  managed to get the start and end columns saved into the database while handling a few edge cases
    • made progress getting the data back out of the DB and to the client side.
  • This week
    • Finish off annotations.
  • Having trouble with
    • working with bare bones JS to be consistent with the rest of the annotation class and keep the client side processing to a minimum
    • staying awake after experiencing jet lag and getting back into the swing of things
  • Addendum
    • It turns out that not all of my changes were committed to github, I would assume due to my own user error. It will put me back at least a few hours but I should be able to redo the work and meet my goals regardless. I’ll consider this a lesson learned.

Paymahn

  • Last week
    • Fixed issue 1917. There was an issue with links in the dashboard for spreadsheets and assignments going to settings instead of what would be expected
    • Fixed issue 1884. Flexible criteria could not be downloaded. This was happening because the client was making a POST instead of a GET
    • Worked on issue 1795. The error message for criteria created with a duplicate name was awful. I’ve gotten the message fixed but this broke some tests. I’m in the process of converting the broken tests (and their respective files) to RSPEC
  • This week
    • Looking to finish off issue 1795 (third bullet point above)
    • Will start investigating my project
    • Will need to learn javascript (I’ll probably do some tutorials or something and incessantly annoy Ryan with questions)
  • Having trouble with
    • RSPEC doesn’t make sense (maybe I can’t find the right docs?)
    • Reading docs on relishapp.com
    • Specifically trying to understand how to properly use helper methods for the tests

Peter

  • Last week
    • Learning react framework – tutorials, studying implementations in codebase
    • Updating Student Marks Spreadsheet Table to React (Issue 1760)
  • This week
    • Complete updating Student Marks Spreadsheet Table to React (Issue 1760)
    • Add Bonus Column to Spreadsheet

Josh

  • Last week
    • few more rails tutorials, began (re)familiarizing self with vagrant, bash, virtualbox, etc
    • Not much substantial yet, catching up on classes and stuff
  • This week
    • Begin research/work on #1804 (refactoring Flexible/Rubric criterion models)
    • If possible, begin on issue #1973, but that’s probably a low priority feature atm, and 1804 will likely take at least a few weeks given how little I know of Rails.

Written by Paymahn Moghadasian

January 23rd, 2015 at 2:08 am

Winter 2015 Project List

without comments

1. Spreadsheets improvements (very large)

  • Convert tables to use React
  • Outstanding issues (ordering of columns is still a problem)
  • UI improvements: Anchoring the first column for better horizontal scrolling

2. CSV upload/downloading

The semantics of the different uploading features is varying and unclear.  We especially need to take a close look at the uploading of data in to the spreadsheets, groups, and graders views. Working on this project will require a deep understanding of the operation of each of these uploading functions, looking at the database and repository operations, and documenting the behaviour in the help system.

The other area where CSV uploading needs improvement is that we sometimes encounter performance problems where Apache seems to time out.

3. React refactoring (smallish)#1696

In the past two terms, we have converted tables to use the React library.  As we near the end of this process (spreadsheets are the last ones), the code for the tables could use some refactoring to simplify it and pull together common functions.

4. Get rid of the rest of Prototype #1496 (small)
We have slowly been removing all the Prototype code, and replacing it with JQuery. Aside from the tables that still need to be converted to use React, there are still a few places where Prototype has not been fully replaced. This would be a good project for a student with an interest in learning (more) Javascript/JQuery.

5. Fixing issues with and improving the remark system #1933, #1869, #1975, #1976

We encountered some bugs with the remark request system, and have some feature requests. This will involve the remark request view and the marking scheme models.

5. Git backend #1698 (large)

Alex worked on the git backend last term, and is planning to finish it this term.  The main piece that is left is incorporating authentication so that students can use git directly.  He is planning to work on it again this term.

6. Rails 4.2 upgrade

A lot of work has been done to upgrade MarkUs to use Rails 4.x.  There is still some work remaking to complete this upgrade. This project would be a great one for students with some understanding of Rails, and have an interest in how the Rails framework works.

7. Rspec tests (large, but an ongoing effort)
This summer saw a major effort to change to Rspec tests.  In the fall we were successful in getting all students to write some Rspec tests, and Kuba also spent the term refactoring and testing the Assignment model. A continuing goal is to have everyone on the team write some Rspec tests. It will be a good way to really learn what the models and controllers are supposed to do, and will move the project forward. We plan to set aside a few hours at the sprint for writing tests. There are some outstanding Github issues related to missing tests that can easily be closed with some work.

8. Improve seed data for the development environment

In the dev environment, there is data to populate the data base with users and assignment submissions.  This seed data helps with manual testing and understanding how the system is supposed to work.  We need to increase the size of the seed data to include more students, more assignment submissions, and to increase the diversity of initial scenarios such as different due dates for submissions that affect more of the system.

9. Summary page of all the marks for all students (smallish)
There is currently no view that combines marks from all of the different assignments and spreadsheets. This table would look a lot like the Submissions table or the Summaries table, but would have one column for each assignment and spreadsheet. A new feature would be a way for the administrator to specify a weighting for each piece of work to produce a total. (Good for someone not familiar with Rails.)

10. MathJax support for annotations? #285 (medium?)
It would be nice to be able to use math symbols in annotations. The MathJax library seems to be what we want, and some work has been done on this.

11. UX Refresh of the submissions table (Includes #75) (medium)
We haven’t taken a serious look at what is in the submission table for a long time. For example, we probably don’t need the “can begin grading” field. We would also like to be able to show the grader(s) for each group.

12. Section due dates don’t work #1676 (small)
Some courses would like to have a different due date for each section. This feature seems to have numerous problems with it. There is also a proposal to change the UI for how sections are added.

13. More flexibility in the marking schemes

There are lots of ways in which the two available marking schemes could be improved.

14. API improvements

It would be nice to make the API more powerful so that we could take more advantage of the API for automated operation.  This will also involve writing some scripts and consolidating scripts that interact with the API.

Written by Markus

January 13th, 2015 at 1:23 pm

Tagging Backend

without comments

This blog post will discuss the decisions made surrounding the backend of the Tagging Project.

Database Schema

As this is the initial implementation of the Tagging feature, we strove to keep the schema changes as simple as possible.  MarkUs uses ActiveRecord as the M in MVC, and thus we had to create ActiveRecord migration files to implement changes.

We decided to create a Tags Model which contained the following explicitly declared pieces of information:

  1. name (string)
  2. description (string)
  3. user (string)

and an integer id that is implicitly declared.  Furthermore, we created a groupings_tags association to create a many to many association between groupings and tags.

That migration file explicitly associates and a tag id with a grouping id and adds a index of the two ids that must be unique.

An interesting thing with ActiveRecord migration files, and increased its ease of use, is that each migration file must specify the action being done(creating table, adding an attribute to a table etc) but also the action that must be done to rollback these changes.

In this case, the rollback operations for each files solely consisted of dropping each table(and removing the index for the grouping_tags association).  This made it quite easy to create and edit the schema in subsequent iterations.  Editing the schema file would consist of the rollback command, editing schema file, and re-migrating.

Models

In editing the model files, we only had to create a tag.rb and modify the grouping.rb to reflect the new schema.

Controllers

In creating the tag controllers, we had to split up the logic between a tags_controller.rb and a tags_helper.rb module.

The interesting between the tags_helper module and the tags_controller is that other controllers can include the module and directly call its method.  This is not the case for tags_controller; routes.rb needs to consulted to call its methods.

The methods in the tags_helper modules are used by controllers (e.g. tags, results) whereas methods in tags_controller are called from views.

For example, methods in the controller include index, edit, create, destroy.  The module has methods that do work with groupings and tags, which are needed by the results_controller.

Written by Nathan Chow

December 15th, 2014 at 1:31 am

Status Report – December 5

without comments

Chris

This Week:

  • Completed the PDF annotation editor/viewer (i.e. view, load, save, delete)

Next Week

  • Fix an issues from the last pull request.

 

Jakub Subczynski

Final Week

  • renamed methods throughout codebase:
    • Assignment#past_due_date? to #past_all_due_dates?
    • Assignment#what_past_due_date to #section_names_past_due_date
    • Assignment#section_past_due_date?(grouping) to #grouping_past_due_date?(grouping)
  • created Issue #1926 regarding the intended functionality of Assignment#past_all_due_dates? when there the assignment has sections
  • created RSpec tests for:
    • Assignment#grade_distribution_as_percentage
    • Assignment#get_detailed_csv_report

 

Yusi

This week:

  • Updated code about Relation#all
  • Reported some issues

Next time:
Fix

  • https://github.com/MarkUsProject/Markus/issues/1924
  • https://github.com/MarkUsProject/Markus/issues/1923
  • https://github.com/MarkUsProject/Markus/issues/1922
  • https://github.com/MarkUsProject/Markus/issues/1920

Nathan

Last Week:

  • have a code fix updating the submissions table to display real associated tags
  • final exams and end of term projects have kept me pretty busy

Next Week

  • Will be done finals Thursday of next week
  • will work on implementing RSpec tests, any remaining features for tagging and writing a blog post

Written by Chris Kellendonk

December 5th, 2014 at 3:52 pm

PDFJS Annotations II

without comments

For this term I have been working on replacing the old image based PDF annotation system with a new one that uses the native file format. The new system allows the students and the markers to view PDF files in a much smoother native fashion. As well as allows markers to annotate the PDF files directly in the viewer. I believe the overall user experience has improved as a result of this change.

In order to implement this feature the [PDF.js](https://github.com/mozilla/pdf.js/) library by Mozilla was used. This library is designed to render PDF files in the browser using only Javascript and HTML5. But was not designed for adding annotations to a PDF file.

This change has been very beneficial for a multitude of reasons:

  1. It has increased the speed of the assignment collection by completely removing the long process of converting each submitted PDF into a series of images.
  2. Allows for a smoother workflow when viewing and annotating PDF’s. There is now support for changing the zoom level, and there are page number controls for navigating through the pages.
  3. It is now resolution independent. It doesn’t matter what resolution the PDF file was saved as, it will always render correctly to fit within the screen nicely. While still allowing the user to zoom in on pages if need be.
  4. Annotations can be drawn directly in the viewer and thus will change with the zoom level of the document. This is beneficial when small images or specific areas need to be annotated.

The main challenge with working on this component was implementing the annotation system on top of the PDF.js library. The main viewer code was largely undocumented so a fair amount of reverse engineering had to be done in order to understand the rendering process and insert the hooks for annotations. The PDF.js library itself was not modified at all during this process, instead hooks were added into the rendering process so that the annotation system could sit on top of PDF.js without being coupled too heavily to the library. This should make it simpler to upgrade to new PDF.js versions as they are released.

Currently the system does not support downloading PDF files to a user’s computer with the annotations rendered in them. They can only be viewed online. An improvement that could be made in the future would be to render these annotations to the actual PDF file before a user downloads them. [Origami-PDF](https://github.com/mobmewireless/origami-pdf/) is a library that may be able to do this.

Overall I think the system works quite well. The annotation system behaves exactly the same as the image annotations so the user experience will be seamless when transitioning from one system to another. Thus a very small learning curve. And having an actual PDF viewer makes it much simpler to navigate through and markup PDF files.

Written by Chris Kellendonk

December 5th, 2014 at 3:26 am