MarkUs Blog

MarkUs Developers Blog About Their Project

Archive for the ‘Developer Essentials’ Category

Help System Sample Page

without comments

Hi guys,

Here are sample images for the Help System on the Create Assignment page:

1. Normal Page:

Normal

Note: We put a question mark on each section that will display the message when a mouse hovers over it.

2. On Hover:

OnHover

Note: The message will be displayed to the left of the icon.

 

Please feel free to give us feedback. Thank you.

Written by Christopher Jonathan

March 21st, 2014 at 1:03 pm

Status report March 21

without comments

Since I managed to miss a week, you can add your status reports below (in no particular order).  You might want to prepare it first so that you don’t spend a long time editing in case that ends up stomping on someone else.

Zach
This Week: Stamping out small bugs in testing the git-related functions. There are small differences between how the gems for interfacing with git and svn and since the initial base for the git_repository was a copy+paste of subversion_repository they are hard to find.

Roadblocks: Unclear documentation

Next Week: Continue on this path.

Kate
This Week: Working on a view of all of an individual student’s work. I created a link from the view that shows a table of marks for each assignment and display a new page.

Roadblocks: none.

Next Week: Display the view of student’s work.

Jeremy

This week: Finished, and submitted a pull request for #1310. Updated the wiki for setting markus up on linux, to include a step I found that was missing and submitted a pull request for that as well. Worked Together with Andrew and Sheng to further discuss the design of the tagging system as well as watch a railcast video on tagging.

Roadblocks: None

Next week: Continue work with Andrew and Shenglong. Look into some bug fixes, if time permits.

Andrew

This week: I have been working mainly on the tagging system with Jeremy and Sheng. We’ve watched a railscast about tagging and have been brainstorming the best ways to get this system implemented.

Roadblocks: I have only had time to work on the tagging system due to 4 of my courses having presentations due for the next two weeks. This requires a lot of preparation as they are group presentations so I find myself running around campus all day.

Next Week: Continue work on tagging system and hopefully finish up the duplicate annotation issue.

Shenglong

This week: Met with team and watched a railscast video on tagging. We’re in our design process now, and have been figuring out how to get this implemented.

Roadblocks: Time, mostly. Crunch time is about to end though.

Next week: Continue design and formalize more details

David

This week: Fixed two issues for #1343 where use couldn’t enter grades after moving through pages and when pressing tab would raise an alert. Raised a usability issue where pressing Enter would release grades.

Roadblocks: Time since this is a very busy week for me and needing to understand JS functionality to fix some errors

Next week: Fix the bug I raised or fix another bug, if I can find the time.

Gillian

This week: Installed Linux Ubuntu on Macbook to dual boot to have an easier time testing MarkUs. Finished solving issue 1375, but thinking it was already assigned to David, did not post a comment. It was taken and solved by Ope while I was waiting to conduct more tests to make sure nothing else was wrong with Download on spreadsheets.

Roadblocks: Lost a bit of time in the MarkUs installation due to running into the usual issues with svn core, which David found how to fix in 3 steps, however the link for subversion.1.8.5.tar.gz that we had was not up anymore. After this, had issues due to variables JAVA_HOME and PATH not being configured.

Lesson learned: Always make sure other developers know if you are working on a specific issue.

Next week: Fix spreadsheet bugs raised by David and I during the last few weeks.

Alex

This week I worked on the Help System with Ope and Chris. We worked on getting the create assignment page working, which will be a sample of how the system will work.

Next week we will continue working on the help system and hope to get feedback from the blog post.

Ope

Reviewed the fix made for issue-1032 and came up with a better solution that did not require a page refresh. Updated the pull request and the changes were merged successfully. Fixed issue-1375 which is a minor change. Worked with Alex and Christopher on the help system for the Assignment> Add Assignment page as an example.

Next week:

We’ll be working on the help system.

Christopher

This week we worked on the help system and we have a sample page up on the blog. We hope to get some feedback for the Add Assignment page.

Next week:

We’ll continue on working on the help system with more sample pages up.

Tiago

This week I worked on some issues:

  • issue #1388: the problem was solved, tests created. However, new bugs were discovered. I’m still studying was this happens.
  • Issue #1324: The use of vendors/plugins is depreciated, I was working on 3 plugins. Calendar, ssl_requirement, auto_complete.
  • Calendar: solved
  • SSL_requirement: I solved it, but I discovered that there was no functions being called. So this plugin was removed.
  • Auto_complete: I didn’t manage to make it work and I believe the one that we have in our code is not working too. Removing it could be the best solution, if it is not useful.
  • I was studing issue #765, I lost 3 hours making the upgrade, but in the end, I discovered that the new version is not working as it should and the repository is dead. So, talking with bejamin we decided to close the issue, but he has his branch with a few tests not working.

Next week: talking to Karen about the project I’ll be working on during my term and work on the bugs found after issue 1388

Rafael

This week I have finished my revision on the portuguese translation and I’m stuck on a bug involving the behavior of hiding assignments from students (issue #1357).

My next steps are fixing this bug and either getting another issue to work on or talking to Karen about the project I’ll be working on during my term.

Written by Markus

March 20th, 2014 at 8:06 pm

Posted in Developer Essentials

Tagged with

MarkUs Assignment Tagging

without comments

Andrew Hernandez, Shenglong Gao and myself have started the design stage of tagging assignments.

On a project of this scale, many assignments get submitted; often, the administrators are in need of additional organizational options. Thus, we are starting a project with the intended goal of providing administrators with the ability to tag assignments with one or more tags in order to keep assignments more organized when it comes to searching for them. We are currently thinking that tags should be chosen from a list that the admin makes, as this would result in less errors compared to typing the tags manually.

For example, if an administrator wanted to search for all assignments that are related to Java and Arrays, the administrator could simply run a search and look for all assignments with the tags Java and Arrays. The search would then produce any and all assignments meeting with both of those tags present. This would improve organization, and allow for faster usage and a better over all user experience – something that is severely lacking in traditional marking systems.

This type of addition would instantiate a higher sense of organization to the MarkUs assignment structure. This system is in a very early stage of planning, and we are currently still deciding on how to begin the development as well as how the system will work in its entirety. If there are any suggestions on how to proceed, please feel free to comment!

Here is a video we found that we watched to gain a background in how tagging may be done:

http://railscasts.com/episodes/382-tagging?autoplay=true

Written by Jeremy Winter

March 18th, 2014 at 4:37 pm

Status Update: March 16, 2014

without comments

Zach Munro-Cape

This week:

- created test files to test the git_repository.rb progress
-implemented some time-based functions for fetching commits for the git branch
Roadblocks:
Before successfully running `rake test git_repository_test.rb` will be successful, minimum functionality is required for the git_repository.rb file. This is less than ideal given I was hoping to follow test driven development for this project.
Next week:
-determine what the close() repository function is for and map it over to git
- hopefully get the git_repository functionality to a level where the unit tests can be run
Shenglong Gao
Still working on last week’s stuff!
Cornell team

Next week:

Continue on help system implementation. We will have a couple sample pages by next week for people to look at a critique the system.

Current Week:

Ope:

- Worked on issue #1032 with the team (Chris and Alex), and submitted a Pull Request for the fix we came up with. The request is pending review.

- Worked on issue #1219 with the team. Pull request was created and merged

- Started working on the help system

- Starting worked on issue #1378.

Roadblocks:

- none

Alex:

- Worked on issue #1219, where the sections were not ordered correctly under Assignments > Edit. Now the sections are ordered by due date and if due date is assigned the sections will be sorted by the title.

- Worked on #1032 and reviewing a fix for issue #1378

- We also started working on the help system

Roadblocks:

- none

Christopher:

- Worked on issue #1032 and submitted a pull request..

- Worked on issue #1219 and submitted a pull request.

- Worked on issue #1378, where the sorting (by last name, first name, etc.) on Mark Spreadsheet Grade pages doesn’t work.

- Started working on the help system.

Roadblocks:

- none

David Das and Gillian Chesnais

This week:

-Fixed problem that prevented us from running tests

-Added functional tests to our fix for #1376

-Worked on #1375 and figured out where the error is, but not how to fix it yet

Roadblocks:

-Figuring out functional testing syntax for Rails

-Figuring out the exact fix for #1375

-Ton of work from other classes

Next week:

-Going to fix #1375

-Do regression tests on rc1

-Fix more bugs than usual to make up for lack of bug fixing last week

Jeremy Winter

This week: Fixed problem that was occurring with git pull upstream master.

Roadblocks: The solutions I found never ended up working and I had to reinstall my virtual machine. I was able to get the more recent bundler version doing this, and now everything works.

Next week: Submit pull request for #1310, Submit pull request for wiki set up page, and work with Andrew and Sheng more on implementing a tagging system.

 

Tiago Silva

This week: working on issue #1324

Roadblocks: Autocomplete plugin does not work as it should on markus, I still confused if it is really working.

Next week: solving some bugs and commit fix to #1324

 

Written by Jeremy Winter

March 16th, 2014 at 8:39 pm

Status Update: March 10th, 2014

without comments

Rafael Padilha

This week I was travelling, as I’ve told Karen, so I haven’t worked a lot. I’m going to finish the Portuguese translation and get one of the issues I’d worked at the Facebook weekend ready to be merged to the repository.

Zach Munro-Cape

This Week

- Resolved issue https://github.com/MarkUsProject/Markus/issues/1358
- successfully ran the git branch and created setup instructions https://github.com/munrocape/Markus/wiki/GitBackEnd
- Contributed to wiki instructions for rvm
Roadblocks
 - messed up my ruby installation. took an evening to resolve.
Next Week
- continue work on mapping subversion repo file into rugged git-repo file
Andrew Hernandez
This week:

  • Worked on issue with duplicate annotations
  • Worked on reproducing a bug I noticed
Roadblocks:
  • Really busy week since a lot of deadlines are incoming in all my courses
Next Week:
  • Decide which project I will work on with Shenglong and Jeremy
  • Continue work on issue
  • Send in bug report if I can reproduce the bug

Jeremy Winter

This week: Finished issue #1310, continued doing rails tutorials online as well as reading a rails book.
Roadblocks: When I used git pull upstream master to make sure my code could easily be merged, the version of markus wouldn’t run. Looking into a solution for this.
Next week: Continue working on issues I find, as well as consult with Andrew about writing code for being able to tag assignments.
Shenglong Gao
This week: Finalized project with Western team
Roadblocks: Been extremely busy with startup
Next Week: Finish issue, start working on project

Cornell Team

Next week:

 

We will try to finish issue #1032 but this issue is much trickier than it seems at the first glance. We will start working on the help system.

Current Week:

 

Ope:

 

- Created an issue (#1380) identified while on the User’s tab

- Fixed the issue and created a pull request (#1384) that was merged successfully

- With Tiago’s assistance, installed MarkUs on a Linux machine running Ruby 2.0 in order to validate changes he made. I will assist him at a later time in updating the Installation Steps

- Reviewed issue #1032 with the team (Chris and Alex), and identified the cause of the error not being displayed. We came up with a temporary workaround. We will work on a permanent fix.

 

-Roadblocks: None

Alex:

- Helped work on issue #1032 with Ope and Chris.

- Started looking into issue #1301 and was finding possible other errors related to it.

 

Roadblocks:

-Was having trouble replicating the exact situation of issue #1301

 

Christopher:

 

- Mostly work on issue #1032. We manage to find out the cause of the problem and found some other bugs while fixing this issue. Now we are able to show the error message but not in the right way. One of the problem is because they call a method that has been deprecated and we finally figure that out.

- Start looking into issue #1301

 

Roadblocks:

- There is a method call that doesn’t exist anywhere. After working on it, we finally figure out that the method has been deprecated but still being called.

Tiago

This Week:
- I worked on issue #1367,#1373 and on the portuguese translation of MarkUs.

Roadblocks: None

Next Week: Continue to make markus work with ruby 2.0

Written by Shenglong Gao

March 10th, 2014 at 8:15 pm

Help System Proposal

with 2 comments

Help System:

The MarkUs help system is a way for helping users understand the functionality of MarkUs. The help system will contain embedded documentation in the website. The help system will use both hovering function over text and also will have tool tips throughout  the website. The tooltips will be a little picture of a question mark next to certain text or tabs or input boxes. When the user either clicks or hovers over the tool tip a box will appear telling the user the functionality of the specific element. We are also considering giving the user the ability to turn on and off the help system. This could be useful if a user is comfortable with MarkUs and does not need to see the extra dialogue.

We would like to make it so the help system can easily be changed when a change to the system is made. For this we feel it would be best to separate the actual text that will go into the embedded documentation from the pages themselves. We will store the text in a file and reference the sections that way. This implementation would be done much like the multiple language feature that exists. This will make it much easier for future developers to edit the tool tips if functionality changes or even add new tool tips by following the same design.

Here are some websites that we would like to base our system off of.

http://downloads.sixrevisions.com/css-tooltips/index.html

http://www.pat-burt.com/wp-content/csstooltip.html

The following is a list of where we believe the help system could be useful.

Admin View:

When an admin first logs in they should be able to hover of the tabs for a short description of what is under each tab for example the assignments tab could display “Review and Create Assignments”.

Within the tabs there are many sections and elements that could have documentation to help the user. Here is a list of some places where extra documentation can help.

Under the Assignments tab:

- On choose assignment page:

    > Upload and download button on the top right: display message on hover.

    > Add Assignment and Add Marks Spreadsheet: display message on hover.

- On Add Assignment page:

    > We will put a small icon (for example: ‘i’ icon) on the right side of each textbox that will

       display the message when the user click on it.

    > Some of the sections (Marking scheme, required files, etc.) will have the small icon on

  the section’s title that will display the properties of each selection.

- On Assignments > Settings > Marking Scheme:

    > We will add more stuff into the “Help” text box

- On Assignments > Settings >  Annotation:

    > We will add more stuff into the “Help” text box

- On Assignments > Settings > Text Framework

    > We will put a small icon on the right side of each section that will display the message

       when the user click on it

- On Assignments > Groups and on Assignments > Graders

    > The message will be displayed when the user hover onto the title of each tabs (for

       example: All groups, Valid, Not Valid tab)

- On Assignments > Submissions

    > The message will be displayed when the user hover on the button or the “title” (for

       example: collect all submissions, csv report, etc.)

Under the Users tab:

- On Users > Students:

    > We will have a small icon next to the title (Manage Students). The message will be

  displayed when the user clicks on it. This message will explain the actions (Bulk

  action, Give grace credits, Add Section, Mark active and Mark inactive)

- On Users > Students > Edit Students:

    > We will have a small icon next to “Grace Period Deduction”. The message will be

       displayed when the user clicks on it.

Students view:

Under Assignments tab:

After Clicking on an assignment you will see submission, assignment rules, and group information. In each of these sections we will have a small help icon that will explain details about what the student is looking at.

Under the Submissions tab:

We will have a help icon with a detailed description on how to submit your work. One option is a short step by step process that could walk a student through the submission.

Under the Results tab:

A help icon with details about what results the user is looking at

Graders View:

Under the Home tab:

- On Home page:

    > We will have a small icon next to “Your API Key”. The message will be displayed when

       the user clicks on it.

Written by Christopher Jonathan

February 28th, 2014 at 1:31 pm

Status Update: February 13 2014

without comments

Zach

This week:
- Unified filenames for CSV files along with some UI changes to download.

Associated Pull Requests: #1354, #1345

- Began working with Kitiya on issue #1358. Implementing search functionality in the User view.

Roadblocks:
- Nothing major with MarkUs.

Next week:
- Continued work on #1358.
- Look into git backend and what issues previously had. This could potentially be my project for the term.

Jeremy

This week:
- I’m currently working on issue #1310, and gaining an a better understanding of how everything works in Markus and rails.

Roadblocks:
- Haven’t had any major roadblocks yet.

Next week:
- Finish up that issue I’m working on, and get together with Andrew and Sheng about what we want to work on.

Ope

This week:
- Worked on installing the MarkUs application on my computer. Successfully completed installation.
- Reviewed parts of application code (critical controllers and views) to better understand the application flow
- Reviewed some existing issues on GitHub to understand work that may be needed
- Tested out the application interface to become more familiar with navigating through the system

-Roadblocks:
- Minimal time to catch up on project due to late start.

Alex

This Week:
- I worked on issue #1342 for creating groups in assignments.Was able to fix the issue by changing code in the group controller.

Roadblocks:
- I am not sure if the change to the issue will mess other parts of the grouping functionality. We need to do some other testing to determine if this is actually a fix.

Christopher

This week:
- Helped Ope on installing MarkUs application.
- Try to understand how MarkUs works by logging in as Administrator, Student and Grader.
- Looking on how the code works while navigating through the MarkUs Application
- Find a bug and put it on GitHub (issue #1342)

Roadblocks:
- Learning Ruby and how Rails work.

(Collectively at Cornell, Alex, Ope, and Christopher)

Next week:
As a group here at Cornell we plan on implementing the help system. Our first task is to better understand the functionality of MarkUs and where useful help tools could be implemented. By the end of next week we plan on creating a proposal of places that could use the help system and also develop some UI designs that we could use for the help system. We also will be working on issues that still exist.

Kitiya

This week:
- Submitted pull request for issue #764 – using correct HTTP status code for expired sessions.
- Working on issue #1358 – adding search functionality on the user tab.
- Familiarizing myself with MarkUs and Rails.

Roadblocks:
- Having not fully understood Rails is the biggest roadblock for me right now.

Next week:
- Continue working on issue #1358.
- Finalize the project I will be working on toward the term.

Gillian Chesnais
David Das

This week:
- #1337 (where releasing grades for all students in a spreadsheet of more than one page of students would fail)
- #1338 (where a TA with no student trying to view a spreadsheet would raise an error).

#1337 was failing because there was a function call (call() on line 221 after the fix) without any arguments. It needed arguments describing how results from a database query should be sorted and a variable pointing to the current user, which we provided.

Issue 1337


The first two arguments above indicate how it should be sorted, and we set these to be empty strings because we figured that since all users were being selected in this case, the order would not matter.

As this was our first bug fix and we did not know Ruby at all, we spent a significant amount of time pinpointing this error and understanding why it was failing, and how it related to the output. We also needed to learn how G_TABLE_PARAMS used procs and lambdas to fix this bug.
For issue #1338, we figured out that the function alpha_paginate() was meant to return ‘[]‘ when there were no students assigned to a TA, and it attempted this by checking if total_pages was 0. However, in this case total_pages is actually 1. We added another condition that all_grade_entry_students was 0 instead, which seems to have fixed this bug. You can see this fixed below:

Issue 1338


In the future, we will start to focus on patching and fixing the Markus beta.

Andrew

This week:
- Working on ticket #1348 to disallow identical annotations on the same line of an assignment.
- Submit detailed bug report about an issue with annotation.
- Familiarizing myself with Markus functionality and code.

Roadblocks:
- Catching up on schoolwork hasn’t allowed me to put as much time as I’d like in fixing the ticket.

Next week:
- Finish ticket #1348
- Speak with Jeremy and Sheng about which project we will be taking on.

Shenglong

This week:
- Submitted pull request for installation instructions on linux
- Working on issue #1347
- Learning MarkUs and Rails

Roadblocks:
- Not understanding Rails and the codebase is my major stumbling stone
- I’ve also been abroad the this entire entire week

Next week:
- Continue working on issue #1347
- Finalize the project I will be working on toward the Western team

Rafael
Tiago

This week:
- Started the Portuguese translation.
- Issue #1333
- Issue #1312

Roadblocks:
- None

Next week:
- Continue on the Portuguese translation of MarkUs.

Written by Zach Munro-Cape

February 13th, 2014 at 8:26 pm

USOSP Status Report – Week of Nov 18

without comments

Xiang

Status

  • Completed the functional tests for the Summaries tab and submitted a pull request
  • Fixed issue 1211 and submitted pull request

Roadblocks

  • Need to learn more about shoulda to ensure test quality

Next week

  • Continue to test and improve the functionalities related to the Summaries tab
  • Look for new issue to work on

Arianne

Status

  • Fix for issue-1194 got merged into the project
  • Fixed a bug related to displaying more than 15 students at a time for a grade entry form
  • Briefly looked into issue-894: Marks spreadsheet: sort by User Name, Last Name, First Name, Section

Next Week

  • Working on issue-100: Simple Grade Entry: Refactor the code for calculating a student’s average mark

William

Status

  • Worked on implementing and testing methods inside of the new git_repository.rb file
  • Completed self.open, self.access, and self.delete (self.delete has some quirks that need discussing)
  • Went through subversion_repository looking for code to salvage, I think we can reuse most of the Repository class.
  • Rugged doesn’t create a master branch when it initializes a repo, I found a work around.

Roadblocks

  • No one has merged Dylan’s pull request. It is making it difficult to work collectively.
  • When rugged initializes a repo it doesn’t create a master branch, that was frustrating.
  • Rugged cannot delete repos, however, it can delete branches and references to head in the repo. We need to discuss if this is an issue in the meeting.

Next Week

  • Continue implementing in git_repository.rb
  • Test and see for sure what can be recycled from the Repository class in git_repository.rb
  • Dylan and I have discussed building a test harness for git_repository, we might explore that more.

Dylan

Status

  • Continued implementing the git_repository create method. When creating a group, many of the repository methods get called. I have been implementing these roughly to try and get the new group to show appear in the list so that I can start adding students to it.

Roadblocks

  • The Rugged docs are pretty sparse. Was able to find some solutions with Bill

Next week

  • Get the groups added fully and implement necessary methods to get students added to them.

Daniyal

Status

  • Looked into how Shoulda works
  • Created Shoulda tests for Git repository.

Roadblocks

  • Haven’t been able to run my tests to make sure they work because the git repository file has not been merged so I’m not sure how to check out the work done so far on git repositories.

Next week

  • Figure out if my tests are fine and commit them
  • Work on implementing some methods in git_repository

Written by Daniyal Liaqat

November 18th, 2013 at 4:14 am

Installing libgit2 and Rugged

without comments

Requirements:

Please ensure you have git, ruby 1.9+, rails, rvm, and gem installed before proceeding.
Please ensure you are running a relatively up-to-date Linux operating system or Mac OSX 10.7+

Installing on Linux
For the installation of Libgti2 and Rugged, we are headed into the Linux terminal. Libgit2 requires that we have cmake installed, so we’ll start there.
     sudo apt-get install cmake

Next installing Libgit2. First navigate to where you would like to download the Libgit2 folder to. Then input the following commands in to the terminal:
     git clone https://github.com/libgit2/libgit2.git
     cd libgit2
     mkdir build
     cd build
     cmake ..
     cmake --build .

Next we will install Rugged.
     sudo gem install rugged

Everything by now should be installed, lets test to ensure that is the case.
     irb
     1.9.3 :001 > require “rugged”
       => true
     1.9.3 :002 >exit

Installing on Mac OSX
Before proceeding with installation, please ensure you are running XCode development tools 5.0+ and have the XCode console development enabled.
For the installation of Libgti2 and Rugged, we will be headed into the Mac terminal. But first we need to install cmake installed, so we’ll start there.

  • Go to http://www.cmake.org/cmake/resources/software.html
  • Go to download link Mac OSX 64/32-bit Universal (for Intel, Snow Leopard/10.6 or later) and choose .dmg
  • Open the .dmg file and follow the instructions on screen, ensure cmake console commands are installed if prompted.

Next installing Libgit2. First open up the terminal and navigate to where you would like to download the libgit2 folder to. Then input the following commands in to the terminal:
     git clone https://github.com/libgit2/libgit2.git
     cd libgit2
     mkdir build
     cd build
     cmake ..
     cmake --build .

Next we will install Rugged.
     sudo gem install rugged

Everything by now should be installed, lets test to ensure that is the case.
     irb
     1.9.3 :001 > require “rugged”
       => true 
     1.9.3 :002 >exit

Written by William Roy

November 8th, 2013 at 9:56 pm

New feature: Summaries tab

without comments

I have been tasked to implement this new “Summaries” tab which is under “Assignments” and on the same level as “Groups”, “Submissions”, etc. It has a similar basic layout as the “Submissions” tab which is a table with functionalities such as filtering, pagination and sorting by columns. Each row in this table corresponds to a group; the columns are Repository, Commit date, Marking state, Grace credit used, Final grace, and grades for each marking criterion of the group. It serves as a detailed mark breakdown for each assignment.

While implementing it, I following the same logic for the “Submissions” tab for populating data, handling pagination and sorting. For the most part it works fine. However, I did come across two major roadblocks:

1. This is more of a difference to consider than a problem. Since I am displaying marks for each marking criterion, the number of columns is different across different assignments and it might change when the assignment rubric is changed. Therefore I need to dynamically display the criteria according to which assignment we are viewing. For the “Submissions” tab, since it only displays information that is common to every assignment, the number of columns won’t change.

2. Since now I have new columns, I need to implement new “compare” functions for them for the “sorting by column” to work. The way sorting and paginating works in the “Submissions” is as follows: The “compare” function for each column is coded in a constant hash in the Submission controller; when a pagination/sorting event occurs, the hash, along with other paratmeters, is passed to the handle_pagination_event helper function which handles sorting, and then pagination. The problem is I can’t store all the “compare” functions for the criteria in the same static fashion since the marking rubric may change and the corresponding compare functions required also change. In addition, since data in the criterion columns are of the same type (“mark”) and the implementation of the compare function should be identical except there is a unique mark id for each column.

 

The way I implemented it is that, hopefully following the “DIY” principle of Ruby on Rails, I created a single new compare function for comparing marks for a certain marking criterion. Instead of having two parameters (the two objects being compared), I have a third paramter, mark id,  for the compare function to get the desired mark. Then the two marks are extracted and compared according to the established logic. The whold picture is, the view generates table columns dynamically according to the rubric of the current assignment; when a “sort by criterion” event occurs, the corresponding mark id is passed along with other parameters and the hash which contains the new 3-parameter comapre function to the pagination helper function; the helper function executes the compare function to sort the data by this particular marking criterion.

 

While exploring other possible solutions, I have noticed that there are sortable table in Markus that are handled in a totally different way, namely the “FilterTable” javascript class. After reading the git wiki page of FilterTable, I found out that when the FilterTable object is created, the columns should be specified. Therefore it cannot handle situations where name and number of columns are changed dynamically. Moreover, it doesn’t seem to have pagination feature (it’s just a long table). I am by no means a javascript expert, so please correct me I am wrong.

 

The following are some screenshots of the Summaries tab:

(1) sorting by final grade as in the Submissions tab

Screenshot_sort_by_final_grade

 

(2) sorting by the first marking criterion:

Screenshot_sort_by_criterion1

 

(2) sorting by the second marking criterion:

Screenshot_sort_by_criterion2

 

Also I am relatively new to the Ruby on Rails world, so if you have any suggestions or better solutions, please let me know :)

 

 

Xiang Yu

 

Written by Xiang Yu

November 3rd, 2013 at 3:35 pm