MarkUs Blog

MarkUs Developers Blog About Their Project

Archive for February, 2010

Updating the URL with a href and #

without comments

You can put parameters into the URL with javascript. Here is an example html document:


<html>
<body>
<a href="#test=test">testing</a>
</body>
</html>

So with Markus’s submission browse page,  instead of having:


<span>
<a href="#" onclick="ajax stuff">Next </a>
</span>

We can have something like:


<span>
<a href="#<PARAMS GO HERE>" onclick="ajax stuff">Next </a>
</span>

However, that means with every AJAX call that flips the page on the table, will will also have to update all the links on the page as well.

Cheers,
Joseph

Written by jmate

February 15th, 2010 at 6:47 pm

Looking at our Pagination Problem

without comments

Problem Experienced:
The page number is not saved in the URL when flipping through pages.

At first we thought it was something to do with will_paginate. However, if you take a look at: http://railscasts.com/episodes/51-will-paginate . You will notice that will_paginate successfully puts the parameters into the URL. It’s not will_paginate; it’s the way we’re using will_paginate.

So now I am looking at where the Rail’s params[] are used. Markus does something differently with params[] compared to the simple website from the railscast. Additionally, I’m looking through all the AJAX calls we make on the submissions page. Finally, I am trying to understand how s_table_paginate is participating in pagination.

On a side note:
Mike gave me a nice console script to populate the submissions page for markers.
Just run script/console and place paste the following code ( ctrl shift v to paste into a terminal ):


a = Assignment.first
Student.all.each do |student|
student.create_group_for_working_alone_student(a.id)
end

Written by jmate

February 15th, 2010 at 5:52 pm

Meeting Minutes: February 12, 2010

without comments

IRC log for this week’s meeting can be found here:
http://www.cs.toronto.edu/~mconley/irc/markus/markus20100212_pg1.html

Agenda

  • Mainly supplementary status update
    • See if anybody is having trouble with anything
    • Chance to add to your punchline report
    • Answer any questions
  • Update on UI/UX work — Summary of Wednesday’s UI meeting

Note

  • Karen can’t make it for the (entire) meeting.
  • Both Brian and Bryan also cannot make it for this week’s meeting.

Reminder

  • Everyone is to treat this course like one of your other courses.  It requires just as much attention.  The banked hours from the January code sprint have probably started to dry up for a few students.  Keep working! 😀

Meeting Minutes

Other Updates

  • Machinist tests are working

UI/UX Update — Victoria & Farah

  • At code sprint, we decided to split the group formation and assign graders functionality into two tabs.  Rationale behind this decision is mainly because these two represent different concepts.

Group Formation Tab

  • There will be a pane on the left-hand side containing a list of students.
  • There will be a pane on the right-hand side containing a list of groups.
  • To add members to a group, the instructor simply checks off the desired students from the left and clicks on an “Add” arrow to add these students to a group on the right-hand side.
  • In between the list of unassigned students on the left and the list of groups on the right, there will be a left-to-right arrow for adding students and a right-to-left arrow for removing students from groups.
  • Students that are assigned to a group will disappear from the list of unassigned students on the left.
  • Student list (left pane) will have 3 tabs:
    • All Students
    • Unassigned Students (Default Tab)
    • Assigned Students
  • Group list (right pane) will have 3 tabs:
    • All Groups (Default Tab)
    • Valid Students
    • Invalid Students
  • As per Victoria’s discussion with Karen and Farah, some changes will be made to the existing prototypes:
    • Some suggestions as to how we could make the UI easier for someone to understand.
    • Replacing some text buttons with icons.
  • Victoria will be making the changes mentioned above for paper prototypes that will be used for usability testing with Diane/Jen.
  • Once these changes have been made, Victoria will also be posting these on the MarkUs project blog.

Unified Notes System — Robert

  • Robert’s Punchline: “See if we want to have a unified notes system, or one that has tabs for each Notable type.”
  • “Unified Notes System” refers to the Notes tab that displays all Notes across all Notables.
  • 2 options:

(1) Notes combined in a stream under the Notes tab.

(2) Notes broken down by “notable” (Grouping, Assignment, Students..etc.)

Memberships — Robert

Grade Entry Form — Farah

  • Farah will be starting to work on the changes Mike suggested.
  • Farah liked Mike’s solution for the up-front cost problem.

Laval Update — Nelle

  • Nelle met up with some teachers at her school to talk about deploying MarkUs at their school.
  • Teachers had a few suggestions for new features — Nelle will be blogging about these.
  • Their main goal is to prevent students from cheating.
  • Nelle implemented the section restriction for group members and manually tested for it — it works properly.
    • Nelle hasn’t tested anything yet — no unit tests, no functional test.
  • This section restriction is not on ReviewBoard yet.
  • The groupings unit tests are in bad shape; Nelle will be waiting until she finishes migrating them to Machinist.
  • Nelle will be posting the patch on ReviewBoard anyway.
  • Side Note: Nelle’s school only has Mac servers (to deploy MarkUs on) at the moment.

Written by Victoria

February 12th, 2010 at 11:54 pm

Posted in Meetings,Minutes

Feb. 12th Status Update

without comments

Robert

Status

  • Reading code related to the Notes system
  • Reading Reviews/ other code as it comes around
  • Full time offer from Amazon! (still have a couple interviews to go from other prospective employers.)

Next Steps

  • Implement mock ups for Notes for Students and Assignments. See if we  want to have a unified notes system, or one that has tabs for each Notable  type.
  • Implement new Notable types.

Roadblocks

  • As of today? None. It’s time to get to work!

Mike

Status

  • Pushed out MarkUs 0.6.1, and patch for 0.6.0 => 0.6.1
  • Wrote / Pushed out TestDrive script
  • Reviewed a bunch of code

Next Steps

  • Keep reviewing more code, pushing for Machinist-based tests, and helping where I can

Roadblocks

  • None

Bryan

Status

  • Studying the background of ticket #418 (Changing an assignment’s due date doesn’t update the SubmissionRule’s cache). Read the requirements of flexible marking scheme,  planing how to implement it.

Next Steps

  • Solve 418 and implement flexible marking scheme

Roadblocks

  • Preparing for the festival

Victoria

Status

  • Created a set of prototypes for the group formation tab.
  • Went through these designs with Karen and Farah in this week’s UI/UX meeting and got lots of feedback.
  • Discussed the details for potential user session next week with paper prototypes.

Next Steps

  • Make modifications to existing group formation prototype in preparation for user session next week.
  • Upload improved group formation prototypes to the MarkUs blog for more user feedback.

Roadblocks

  • None

Joseph

Status

  • Read through Mike’s comments about my changes
  • Memorized how to write about 100 words in Simplified Chinese if I think of the word in English and other similarly awesome school work

Next Steps

  • Fix Mike’s comments
  • Still need to look at will_paginate

Roadblocks

  • Reading week – no roadblocks!

Farah

Status

Next Steps

  • Implement the changes Mike suggested
  • Convert my tests to use Machinist
  • Student UI for the grades table

Roadblocks

  • None this week

Brian

Status

  • Finishing Ticket 531,571,512
  • Read flexible schema proposal

Next Steps

  • Start coding part of flexible schema proposal

Roadblocks

  • None

Written by jmate

February 12th, 2010 at 1:10 am

MarkUs 0.6.1 is out the door!

without comments

The MarkUs team is proud to present 0.6.1!  Great work everyone!

Major changes:

  • Fixed trace on detailed CSV download for assignments
  • Random TA assignment now applies only to selected groups
  • Next/Previous Submission links in grader view no longer skip submissions marked “completed”
  • The student edit form now accepts input properly
  • New UI in students editor and grader view to manage grace credit penalties
  • General bugfixes.  Functional tests now all pass!

Interested in getting a copy?  Download here.  Or click here for the 0.6 to 0.6.1 patch.

Written by m_conley

February 9th, 2010 at 11:46 am

Posted in Releases

Tagged with ,

Ruby on Rails (RoR) from a Java programmer’s perspective

with one comment

Java is a static-typed language, and every variable, method and class is explicitly defined. It’s very easy to find their definition with a little help from IDE.

When I started to program Markus in RoR, I still think in the Java way, and find something very confusing. Here is some code I saw in Assignment class:



# Are we past the due date for this assignment?
class Assignment < ActiveRecord::Base
 # some code here

 def past_due_date?
    return !due_date.nil? &amp;amp;amp;&amp;amp;amp; Time.now > due_date
 end

 # some code here
end


I was curious of what “due_date” is, so I naturally did an “Open Declaration” in Eclipse IDE, which gave me no feedback at all. This happens because RoR types are dynamic, and type information is not available until run-time.

Then I searched for “due_date” across the whole project, and found some references of “due_date” but no definition of it at all.

What is it? Is it an instance variable? No, the name of an instance variable always begins with “@”. Is it a local variable? No, local variable should be initialised before being used. It should be a method. Yes, it’s a method, but where is it defined?

After turning to Mike and Severin, I eventually understood that “due_date” was not defined explicitly. It was created by ActiveRecord. ActiveRecord noticed that “due_date” was a column in the database table associated with Assignment, and therefore creates the “due_date” method (getter and setter) automatically. [The database schema]

This seems incredible to a Java programmer. In Java, a method should be explicitly defined before you use it. But in RoR, you don’t necessarily have to define a method to use it – methods can be created at run-time. Finally I realised this is why we call RoR “dynamic”. And for the first time I see the benefit of being dynamic: the chunky data-object mapping code is eliminated by the magic of dynamic!

Next time, when you cannot find the definition of something, don’t be panic, but think “dynamic”.

Written by bryanshen

February 9th, 2010 at 12:40 am

Posted in Getting Started

Meeting Minutes

without comments

The IRC log can be found at: http://www.cs.toronto.edu/~mconley/irc/markus/markus20100205_pg1.html

Brian Xu fixed three bugs:
512 –  UI: Show the graders name in the graders drop down —- http://review.markusproject.org/r/370/
531 – Graders need a way of “un-setting” Criteria —- http://review.markusproject.org/r/369/
571 – Edit Student: “Cancel” button links to something wrong —- http://review.markusproject.org/r/371/

Bryan Shen closed: #393. multi-level folder not allowed. Bryan also plans to blog about some things he has learned from working on Markus.

Brian Xu and Bryan Shen plan to get together and discuss how they are going to complete the flexible grading scheme.

Farah plans to return to working on the grade entry. She will update the review board so we can make comments on the code. The functional tests are still in the works.

Joseph has completed 564 – Validate files with a path with a space and check configuration on startup —- http://review.markusproject.org/r/358/. He hopes to get some time next week to look at will_paginate.

jerboaa figure out that urgent issue that arrived on February 4th.

Mike, feel free to assign this bug to someone else.  Everyone else, feel free to jump on it. 🙂

The Download Detailed Criteria produces a stack trace when grace days are allowed.  It works when there are no grace days.

undefined method `find_by_rubric_criterion_id’ for #<Class:0xb6e475f8>
RAILS_ROOT: /data/markus/instance/csc209-2010-01

Application Trace | Framework Trace | Full Trace
/u/drprj/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:1842:in `method_missing_without_paginate’
/u/drprj/.gem/ruby/1.8/gems/will_paginate-2.3.11/lib/will_paginate/finder.rb:170:in `method_missing’
/u/drprj/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:380:in `send’
/u/drprj/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:380:in `method_missing_without_paginate’
/u/drprj/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/base.rb:2143:in `with_scope’
/u/drprj/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:206:in `send’
/u/drprj/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_proxy.rb:206:in `with_scope’
/u/drprj/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/associations/association_collection.rb:376:in `method_missing_without_paginate’
/u/drprj/.gem/ruby/1.8/gems/will_paginate-2.3.11/lib/will_paginate/finder.rb:170:in `method_missing’
/data/markus/instance/csc209-2010-01/app/models/assignment.rb:400:in `get_detailed_csv_report’
/data/markus/instance/csc209-2010-01/app/models/assignment.rb:399:in `get_detailed_csv_report’
/data/markus/instance/csc209-2010-01/app/models/assignment.rb:384:in `each’
/data/markus/instance/csc209-2010-01/app/models/assignment.rb:384:in `get_detailed_csv_report’
/data/markus/instance/csc209-2010-01/app/models/assignment.rb:383:in `get_detailed_csv_report’
/data/markus/instance/csc209-2010-01/app/controllers/submissions_controller.rb:431:in `download_detailed_csv_report’

Thanks,
Karen

Robert finished off the tests for the random Grader assignment. He plans to work on issue 569 – Investigate possible Grader Assignment problem by manually hammering on the grader assignments to see if they always update correctly onscreen.

He also plans to work on 559 – Allow Rubric Weightings to be 0 or negative. However, Karen would like to discuss how it should be done with Byron. Mike believes that Byron will be able to use the Flexible Criteria if we push hard enough.

Mike will be running next week’s meeting. Additionally, Karen would like to have a meeting on the reading week’s Friday Feb 19th.

UI: Show the graders name in the graders drop down

Written by jmate

February 5th, 2010 at 5:54 pm

Posted in Uncategorized

Tagged with ,

Feb. 5th Status Update

with one comment

Robert

Status

  • Shipped fix for 510 for release 0.6
  • Invited down to California for Facebook interviews. [Yay!]
  • Kept up with discussion on reviews.

Next Steps

  • Determine if my fix for 510 also resolves issue 569 for occasional non updates of grader assignments.
  • Find more time to work on MarkUs. This should arrive next Thursday, and during reading week.

Roadblocks

  • Lack of time due to interviews and other classes. 4 interviews with Amazon this week.
  • Unable to conduct code reviews on many changes this week.

Mike

Status

Next Steps

  • Look into Details CSV Report issue that Karen and Byron are having
  • Upon (hopefully) fixing above, prepare patch (possibly including other fixes for 0.6 that have been committed)
  • Review more code.
  • Answer any more questions that people have. Fire away!

Roadblocks

  • These past two weeks have been super busy. I have a feeling my two courses this semester are synchronized to bring the pain simultaneously. 🙁 Coming up to a rest point though.

Bryan

Status

  • Wrote my first unit tests!
  • Closed #393 (“Repository folder does not allow paths such as “test/path1”, 393)
  • Reviewed some code

Next Steps

  • Work on #418: Changing an assignment’s due date doesn’t update the SubmissionRule’s cache
  • Write a blog to share my newbie experiences
  • Gain more RoR knowledge

Roadblocks

  • There was an essay that took me almost two days!

Victoria

Status

  • Completed MarkUs Usability and Interface Design Plan.

Next Steps

  • Start prototyping for the group formation tab.

Roadblocks

  • None

Joseph

Status

  • I completed all the requests from the review. We are not longer
    escaping the validate script for the user. I have figured out a way to
    check for a validate script that does not have the spaces escaped by
    looking at the error code from p.open and then $?
  • I found a second bug that I will write a blog post about so I can
    get into details and give code examples with pretty highlights

Next Steps

  • Check-in the stuff I talked about above
  • Still need to look at will_paginate

Roadblocks

  • Next week is an extremely busy week

Farah

Status

  • Didn’t get much time to work on MarkUs this week because I had three assignments due

Next Steps

  • Will spend extra time on MarkUs this weekend and next week
  • Finish functional tests for the grades table and submit a review request
  • Work on the student UI

Roadblocks

  • My other courses took up most of my time this week

Brian

Status

  • Ticket 531,571,512 done
  • Start to work on UI issue now

Next Steps

  • finish test cases of above ticket
  • write a blog to summary up a few discoveries

Roadblocks

  • Intensive reading of papers

Written by Farah Juma

February 5th, 2010 at 1:53 am

Posted in Status Reports

MarkUs Usability and Interface Design Plan

without comments

Section A: Project-wide

Topic A1:  Upload/Download CSV file – Replace Accordion Menu with Button + Modal Dialogue

Description: To replace the current accordion menu upload/download options with upload and download buttons running along the top of the view.  Let’s call these “Action Buttons”.

Next Steps:

  • These action buttons will spawn a modal dialogue (similar to the interface we currently have for adding a new student to a group in the Groups & Graders view), where the user can specify the location of the CSV file to upload or download.
  • To avoid confusion and maintain consistency, will have to apply this migration throughout the entire project.

Rationale: Having the accordion menu on the side will greatly affect the readability of the 2-pane Assign Graders view.  Also, the accordion menu has caused confusion amongst users in the past, so switching to modal dialogues may improve the usability of MarkUs as a whole.

Topic A2:  Reorganize Action Links & Action Buttons

Note“Action Links” refer to the action items to the right of the page header located at the top of every view.

Description: Current prototype inherits action links from the existing release of MarkUs.  However, if we were to replace the accordion menu with action buttons running along the top of the view (right-to-left), these may interfere with the existing action links we already have running from the left to the right.

Next Steps: Compile a list of action links and buttons that we will have for each view.  Analyze the list and see how we can categorize, trim down, or reorganize the layout of these options.

Rationale: As mentioned in the description, the left-to-right action links may potentially interfere with the right-to-left action buttons.

Read the rest of this entry »

Written by Victoria

February 3rd, 2010 at 10:03 pm