MarkUs Blog

MarkUs Developers Blog About Their Project

Archive for March, 2010

Meeting Minutes: March 26, 2010

with one comment

The IRC log for this meeting can be found be find here.

Brian

  • Almost finish flexible scheme
  • Working on refacroring new database design with Bryan

Bryan

  • Will finnish tests of flexible scheme by the end of this week
  • Working on refacroring new database design with brian

Brian Xu/Bryan Shen will have a discussion with Mike after meeting

Farah

  • Worked on functional tests for the student UI and releasing the marks. I also worked on implementing CSV download
  • Almost done with CSV upload
  • Target to have CSV upload and the tests for this done by Thursday and will need Friday to make screencast

Joseph

  • Met with Mike to talk about what the :proc method of the filters of the table_params
  • Posted a changelist for testing the pagination helper
  • Submitted the code from previous two reviews and created a ticket as suggested in one of the reviews
  • Will have discussion with Mike after meeting

Robert

  • Converted the submitted the new Noteables change earlier today
  • Converted the Student Unit Tests to Machinist and Shoulda, there’s a review for that up earlier this morning
  • Currently converting the Assignment unit tests in the same way

Notes from Karen

  • There won’t be any common deliverables for UCOSP.
  • Either by email or in the blog, make a list of what you did this term with some discussion about what state you left things in. The document will accomplish two goals: first to remind Karen of all the pieces you worked on this term, and second to help the new students figure out where you left off.
  • Please continue working on appropriate documentation for your pieces, like we have been seeing on the blog
  • MarkUs received an inquiry about how to download MarkUs from a school in Virginia!
  • Scheduling a post mortem meeting where we talk about what worked and what didn’t with Greg at 3:30 pm on Wednesday, April 7. NO meeting next Friday since it is a holiday.

Written by Brian Xu

March 26th, 2010 at 4:58 pm

Posted in Uncategorized

Markus March 26th Punchlines

without comments

Victoria

Status
:

Next Steps:

  • Go through existing UI/UX tickets and make sure they are up-to-date and tag them so that they can be easily searched for in the future.
  • Run through the existing admin-demo version of MarkUs and create new usability tickets where necessary.  Note that in addition to GUI defects, the task flow will also be taken into consideration.
  • Address question Robert had regarding his layout — where to place one of his buttons.

Roadblocks:

  • None.

Mike

Status
:

  • Pushed out bugfix to help Karen / Alan rebuild svn_authz for her course
  • Reviewed as much code as I could
  • Email support, IRC support

Next Steps:

  • It’s the last stretch.  I’m predicting much code review.

Roadblocks:

  • I’m working on a particularly nasty assignment this week, and it’s bogged me down quite a bit.  I’m hoping to kick it’s butt over the weekend, but things don’t always go according to plan…

Farah

Status
:

  • Worked on functional tests for releasing the marks and functional tests for the student UI and submitted a review request (see http://review.markusproject.org/r/491/ )
  • Implemented CSV download for the grades table
  • Implemented most of the code for CSV upload

Next Steps:

Roadblocks:

  • None this week


Bryan

Status
:

  • Generated a new class diagram for the models in Markus
  • Worked with Brian to create class diagrams of the refactored Criterion
  • Implement Criterion model and Rubric Criterion model

Next Steps:

  • Implement the Assignment model
  • Write unit tests for newly implemented classes
  • Implement controllers for to work with the new Criterion

Roadblocks:

  • None

Robert

Status
:

  • Finished adding link to notes modal dialog for students.
  • Waiting for final go-ahead to submit last weeks new noteable change.
  • Converted Student Unit Tests to Machinist and Shoulda.
  • Accepted a job at Google.

Next Steps:

  • Converting Assignment  Unit Tests to Machinist and Shoulda.
  • Find a way to update the flash without refreshing the whole page.

Roadblocks:

  • None.

Joseph

Status:

  • Submitted my previous two changelists from last week ( http://review.markusproject.org/r/474/  and http://review.markusproject.org/r/470/ )
  • marked: https://stanley.cdf.toronto.edu/drproject/csc49x/olm_rails/ticket/439 at complete while searching for tickets that might already document the TODOs in the submission controller test
  • created a ticket for completing the TODOs in the submission controller test that have been undocumented for a while
  • Talked with Mike about table_param’s proc and some advice on testing
  • Created helper tests for the pagination helper ( http://review.markusproject.org/r/493/ )

Next Steps:

  • Create tests for the s_table_params inside the submission controller
  • Create a simple test for the browse action of the submission controller

Roadblocks:

  • Assignments

Brian

Status
:

  • Finishing flexible scheme
  • Finished new criterion design with Bryan
  • Working on refactoring new models and controllers

Next Steps:

  • commit flexible scheme
  • finish refactoring new models and controllers

Roadblocks:

  • none

Written by bryanshen

March 26th, 2010 at 1:40 am

Posted in Uncategorized

Dashboard Design Prototype

with 4 comments

As many of you may know, we’ve had an empty Dashboard view for quite a while now.  So as part of my UI/UX role this term, I’ve came up with a new design for it!  Here it is:

MarkUs Dashboard Prototype

Feedback:

  • Karen: Instructors often like to know the assignment average as a fraction in addition to the percentage.
    New Format: “Assignment Average: 70/100 (70%)” — for example

Please leave questions/comments/concerns if you have any! 🙂  We love feedback!

Written by Victoria

March 24th, 2010 at 9:38 pm

Posted in Uncategorized

New Criterion Design

with one comment

Bryan Shen and I work together to get the following design(class diagram and database tables):

This is our final design, and we think it is pretty good to fit in our project, however suggestions are still welcome.=)

An additional feature of this design is that we can have different number of levels of rubric criterion if we want.
We have already started to update the whole MarkUs project to adopt this design.

Written by Brian Xu

March 23rd, 2010 at 1:48 am

Posted in Uncategorized

Use Railroad to generate class diagrams

with 3 comments

I played around with railroad and created a class diagram for Markus’ models. It shows clearer relationships between models compared to the db schema diagram. Showing methods in a class diagram will be useful, but I’m not sure how to do that using railroad.

MarkUs Schema (2010-03-21)

Written by bryanshen

March 21st, 2010 at 1:09 pm

Posted in Uncategorized

Introducing MarkUs 0.6.3!

with one comment

The MarkUs Team is proud to introduce 0.6.3!

Changes for MarkUs 0.6.3:

  • Added rake task to automatically regenerate svn_authz in the event of corruption (rake markus:generate_svn_authz)
  • MarkUs now ensures student read/write permissions on repositories after cloning groups

Get 0.6.3 while it’s hot! Or click here to patch your MarkUs instance up.

We’re on the final stretch, and MarkUs 0.7 is looking to be pretty awesome!  Keep your eyes peeled!

Written by m_conley

March 20th, 2010 at 5:57 pm

Posted in Uncategorized

Meeting Minutes: March 19, 2010

without comments

The IRC log for this meeting can be found here.

Robert

  • Finished phase 2 of the new Noteables
  • Can now create notes on Students and Assignments from the new notes page
  • Robert is currently refactoring a few of the new tests so they are less repetitive
  • Robert will be adding New Note Dialog links to the student and assignment pages

Joseph

  • Met up with Mike on Tuesday and came up with the following list of tasks:
  1. Rename ajax_pagination helper to just pagination helper
  2. Test pagination_helper
  3. Test S_TABLE_PARAMS
  4. Migrate submissions_controller_test
  5. Test that the browse method returns groupings
  • Joseph has already got 1 and 4 on Review Board

Farah

  • Farah finished implementing the ability to release/unreleased the marks for grade entry forms
  • Finished unit tests for releasing the marks and the student interface
  • Farah will be working on the functional tests next, then on the CSV upload/download

Bryan

  • Working with performance lag of Machinist
  • Working with ResultControllerTest – takes several minutes to run using Machinist (one set)
  • Last week Mike told Bryan about FactoryDataPreloader – Bryan tried it and uploaded his first version on Thursday
  • Robert and Joseph pointed out that the FactoryDataPreloader was similar to fixtures so Bryan uploaded a new version Thursday evening.
  • How to get FactoryDataPreloader to be used in conjunction with Machinist elegantly will require further discussion
  • Uploaded user stories for the feature that assigns graders to a criteria

Brian

  • Uploaded modified version of flexible scheme – will be uploading another version Friday evening
  • Will be refactoring the database schema
  • Will be working with Bryan to build prototype for the new database
  • Fixed things that were discussed on Review Board

Nelle

  • MarkUs is deployed at Centrale Nantes
  • Will be updating documentation with Benjamin
  • Didn’t do LDAP configuration yet

Other Notes

  • May be good idea to include a “Provide Feedback” link on MarkUs that would lead to a central site where we can collect usability feedback on.
  • MarkUs blog very developer oriented – we’re missing documentation and news for users and system administrators (e.g., new features implemented in the new release).

Written by Victoria

March 20th, 2010 at 4:45 pm

Posted in Uncategorized

March 19th Punchlines

without comments

Victoria

Status

  • Brainstormed ideas for the Dashboard.
  • Went through draft Dashboard contents with Karen and Farah and got some good and constructive feedback

Next Steps

  • With the feedback I got back regarding the potential Dashboard contents, come up with a preliminary prototype — one that we can take apart and help establish a better idea as to how we’d like to design the Dashboard.

Roadblocks

  • Swamped with work (from my full-time position).

Mike

Status

  • Applied 0.6 patches to trunk
  • Also caught some missing translations and brought them over from 0.6
  • Reviewed a bunch of code
  • Email / IRC development support

Next Steps

  • Same as always – review, review, review.  Answer email.  Help where I can.

Roadblocks

  • None

Farah

Status

Next Steps

  • Work on functional tests for the student UI and releasing the marks
  • Implement CSV upload/download for grade entry forms
  • Tests for CSV upload/download

Roadblocks

  • None this week

Joseph

Status

Next Steps

  • continue with the testing
  • finish of the suggestions from reviewers
  • get a start on the detailed submissions view

Roadblocks

  • assignments

Bryan

Status

  • Wrote a draft version of user stories: assigning graders to criteria.
  • Introduce factory data preloader, which can be used in conjunction with Machinist and improve its speed. Modified the results_controller_test.

Next Steps

  • Finish the class diagram and database schema for the feature “assigning graders to criteria”
  • Plan how to use single table inheritance to implement flexible and rubric criterion
  • Find a good pattern for factory data preloader

Roadblocks

  • None

Robert

Status

  • The ability to create Notes on Assignments, and Students from the new notes page is complete and awaiting final approval.
  • Added tests for the new noteables to the Notes Controller Test
  • Converted Notes Controller Tests to Machinist
  • Added a Machinist blueprint for Notes.

Next Steps

  • Add the notes dialog links to the Student pages and the Assignment pages.
  • Convert the Student and Assignment tests to Machinist and Shoulda.

Roadblocks

  • None!

Brian

Status

  • Fix a small bug Ticket #622
  • Working on refactoring database, doing some test
  • Improving flexible schemes

Next Steps

  • make flexible scheme ready to ship
  • make prototype of new database design

Roadblocks

  • none

Written by jmate

March 19th, 2010 at 2:24 pm

Posted in Uncategorized

User Stories: Assigning Graders to Criteria

without comments

Markus admins are hoping for a feature that enables graders to mark a subset of criteria. According to Karen’s specifications and the discussions on IRC, I’ve written a draft version of User Stories: Assigning Graders to Criteria. Please take a look at it and feel free to give me any advice.

Written by bryanshen

March 16th, 2010 at 11:36 pm

Posted in Uncategorized

New Notables

without comments

The other evening I worked on the New Notes page.

The current one (left) deals only with Groupings. First you select the assignment, and then you select the grouping that you want to write the note about. It dynamically updates the Groupings drop down with the associated group names when you select an Assignment.

This is very good behaviour!

The task I set for myself was to extend this type of thing to our new noteables, Assignments and Students.

One way about it would be to have a separate form link for each type, before getting to the proper form. That has the downside of requiring additional page loads and then you need to start back at the hub page if you change your mind about what you want to write notes about.

The approach that I’m taking is to have an additional drop box where you first select the Notable type, and the rest of the form changes as required to select the exact object you want to create the note on. This way, less page loads, and hopefully, less work for me, as I don’t wish to refactor the entire notes system for a minor bit of convenience.

What convenience and I talking about? Well, it’s entirely possible to write a completely general system that automatically creates the form I want whenever we add the notable property to a model. However, that would take me longer than I have left in the term to do properly, and further isn’t really necessary. Such a solution would be the epitome of the Rails DRY philosophy.

It’s not a good idea though. When adhering to a philosophy involves more work than the less elegant but simpler solution, it’s not the solution you want to implement.

So my approach will be thus: have a static list of notable types and partials forms we want to render. We have one partial form for each, and whenever we observe the Notables box changing, we use a little bit of AJAX magic to render the new part of the form.

With that said, let’s see what we have now:


<div id="title_bar"><h1><%=I18n.t('notes.new.title')%></h1></div>
<div>
<% form_for :note, :url => {:action => 'create'} do |f| %>
<%= f.error_messages %>
<fieldset>
<p>
<%= f.label :assignment_id %>
<%= select_tag "assignment_id", options_from_collection_for_select(@assignments, :id, :short_identifier),
\:onchange => remote_function(:url => { :action => 'new_update_groupings' },
:with => 'Form.Element.serialize(this)',
:before => "Element.show('loading_groupings')",
:success => "Element.hide('loading_groupings')") %>
</p>
<p>
<%= f.label :noteable_id, "Grouping" %>
<%= f.select :noteable_id, @groupings.collect {|p| [p.group_name_with_student_user_names,p.id]} %>
<span id="loading_groupings" style="display:none">
<%=image_tag('spinner.gif')%> <%=I18n.t('notes.new.loading_groupings')%>
</span>
</p>
<p>
<%= f.label :notes_message %>
<%= f.text_area :notes_message, :rows => 10 %>
</p>
</fieldset>
<%= f.submit I18n.t('save') %>
<% end %>
</div>

The basic structure is what you’d expect. It creates a form object, and then builds the form in the way you want it to later display. The user can select things, type up a note, and get the end result no problem. Heck, the user can even start writing a note, change the assignment and grouping it’s onand not have to start writing their note over again! That’s slick!

What I want to do is extract out the mechanism to select the noteable object from the form. This isn’t too hard. The selection boxes are what’s the same so I just need to put  those first two things into a file I called _grouping.html.erb . Here’s what it looks like:


<p>
<%= f.label :assignment_id %>
<%= select_tag "assignment_id", options_from_collection_for_select(@assignments, :id, :short_identifier),
\:onchange => remote_function(:url => { :action => 'new_update_groupings' },
:with => 'Form.Element.serialize(this)',
:before => "Element.show('loading_groupings')",
:success => "Element.hide('loading_groupings')") %>
</p>
<p>
<%= f.label :noteable_id, "Grouping" %>
<%= f.select :noteable_id, @groupings.collect {|p| [p.group_name_with_student_user_names,p.id]} %>
<span id="loading_groupings" style="display:none">
<%=image_tag('spinner.gif')%> <%=I18n.t('notes.new.loading_groupings')%>
</span>
</p>

Note that nothing is different from when those lines were in the original file. Then I add one bit of rails magic to replace the lines I removed:


<%= render :partial => 'grouping', :locals => {:f => f} -%>

This line of code does two things. First: it retrieves the partial file I just created, in this case for the Groupings. Second: it passes in the form object we created. That part is important since it allows us to modify the form in the partial, as we need to.

Visually, this produces nothing different. It’s identical to what we saw before. Now for the tricky bit.

A few hours of writing, experimenting and testing later, having gone so far as having it generate Javascript that would be treated as values in the dropdown and then a generic function that dealt with each case, then to the final result here…

You can now select the type of notable!The tricky bit is getting it so we can select the kind noteable we want to write a Note for, and be able to retrieve the right partial, while getting the parts of the form in the partial to work properly. Getting behaviour like this isn’t too hard, but getting it to be reasonably generic and easy to extend is.

The noteables we have right now are fairly straight forward and the two we are adding require only one drop down for selection. We could just replace the list in the dropdown with some RJS magic, and hide the assignment selector when we aren’t selecting a Group.

The problem with that approach is we have separate sets of cases to deal with, and we have to ensure they all work when testing and adding new ones. Also, we have more things to look out for if we want to change how we are selecting the object (ie. filtering Students by Section, rather than a single list of Students). By dealing with all cases uniformly, we reduce the opportunity for error.

The end result for the business bits of the new note form is as follows:


<p>
<%= f.label :noteable_type, I18n.t('notes.noteable')%>
<%= select_tag "noteable_type", options_for_select(Note::NOTEABLES) %>
<%= observe_field :noteable_type, \:on => 'onchange',:url => {:action => :noteable_object_selector},
:with => "noteable_type",
:before => "Element.show('loading_selector')",
:success => "Element.hide('loading_selector')" %>
<span id="loading_selector" style="display:none">
<%=image_tag('spinner.gif')%> <%=I18n.t('notes.new.loading_selector')%>
</span>
</p>
<div id="noteable_selector">
<%= render :partial => 'grouping' %>
</div>

A few things have changed.  We now have a selector that choses between a list of Noteables that I put in the Notes model. Whenever the user changes the selected value, I call this ‘noteable_object_selector’ function in the controller, and flash this little loading box so the user knows that something is reacting to their selection. There is also that “noteable_selector” div towards the bottom that renders the partial for Groupings as default.

The ‘noteable_object_selector’ is actually an RJS call. RJS is a handy mechanism Rails provides to return snippets of Javascript that get executed by the browser immediately when received, usually to do a bit of DOM manipulation, but generally anything that you can get Javascript to do. Here’s what it looks like.



page.replace_html 'noteable_selector', :partial => params[:noteable_type].downcase


It’s sheer elegance in its simplicity! All it does is generate Javascript that replaces the contents of our “noteable_selector” div with the contents of the desired partial. There’s a little bit before that gets the required entries from the DB in the controller, but that’s so we have something to display in the dropdowns in the partials, rather than being magic to explain.

The astute reader will have noticed that I don’t have that “:locals => {:f => f}” bit at the end of the line like I had in the first step. How did I get around not having the form object anymore? The answer is simple. Rails provides exactly a mechanism to get around that. Here’s the partial for selecting Students to demonstrate. The partial for Assignments and Groupings are similar.


<% fields_for :note, :url => {:action => 'create'} do |f| %>
<p>
<%= f.label :noteable_id, "Student" %>
<%= f.select :noteable_id, @students.collect {|p| [p.user_name,p.id]} %>
</p>
<% end %>

The fields_for function does exactly the same thing as form_for except that it doesn’t generate the <form> tags, permitting exactly the behaviour I was aiming for with the locals parameter. We just wrap whatever partial we might want to use as parts of the form in a fields_for and it will generate form elements compatible with the form that we set it up for. Very handy!

Now we have a solution that is relatively simple to extend to new noteables as well as change how noteable objects are selected if we like. Everything is dealt with equally, which is important for testing since we don’t have special cases to deal with.

Written by Robert B

March 16th, 2010 at 11:35 pm

Posted in Uncategorized