MarkUs Blog

MarkUs Developers Blog About Their Project

Archive for February, 2010

Meeting Minutes Feb 26, 2010

with one comment

irc log can be find here

Agenda:
• Status report
• Q&A

People:
reid
m_conley
bryanshen
brianxu
robertb_frantil
jmate
bwinton

Meeting Minutes:
• Brian Xu has been working on Flexible scheme and has produced the prototype enable the flexible scheme for the views of grader/admin/students. The next step is to provide warning info for switching scheme and disconnect old records after switching scheme. Brian also finished ticket #531.
• Bryan Shen has done some manual tests and gave Brian his feedbacks. Now Bryan is focusing on the functional tests. Some issues related to view tests were discussed. Bryan will work on assigning TAs to rubric.
• Joseph has some great posts on Markus Blog (Setting URL using Javascript). Some issues related to fixing the nested form problem were discussed. He will work on AJAXifying Submissions Table.
• Robert is going to finish off doing the Student Tests. He will focus on the notables and move to converting tests afterwards.
• Mike will do a demo of the flexible scheme prototype for Karen.

Notes
Please remember to write your midterm review for the UCOSP blog.

Written by Brian Xu

February 26th, 2010 at 6:45 pm

Posted in Meetings

MarkUs February 26th Punchlines

with one comment

Brian

Status:

  • Finished ticket #531
  • Flexible scheme prototype is created
  • All views including admin/grader/students are created/modified for both flexible and rubric schemes
  • database migration is updated (float number mark can be input now)

Next Steps:

  • warning info for switch between different marking schemes (other related UI issues)
  • “disconnect” old records after switch to different scheme
  • more css files will be modified
  • Bryan is working on test with me, test cases will be done at the same time we finish the components.

Roadblocks:

  • Traveling back to Canada

Robert

Status:

  • Converting Assignment and Student unit tests to shoulda and Machinist

Next Steps:

  • Make the required changes to the Notes system. AKA be able to add notes to the new noteables, and their modal dialog invocations.

Roadblocks:

  • Midterms sucked up more time this week than I wanted.
  • Converting tests to shoulda requires more work than simply converting them to machinist. The tests need to be in a sensible order.
  • I’m in California for 4 nights this coming week interviewing with companies that rhyme with Placebook and Bluegle. [Then again… I’ll be stuck on a plane and in airports, with nothing to do but  whatever I’ve got on my laptop, which does include MarkUs….]

Victoria

Status:

  • Together with Nelle, we discussed how to make the Sections feature more usable.  Suggested that we create a new top-level view/tab called “Sections” where the user can create and manage course sections.  This has been approved by Karen in last night’s UI/UX meeting.
  • Also suggested that we move the “Sections” column in Users > Students view to the left of the “Grade Credit” column.
  • Collected usability/design issues currently found in the Assignments > Properties page.  Again, discussed these with Karen in last night’s meeting and they have been approved/reassured.

Next Steps:

  • UCOSP midterm blog post.
  • File tickets for usability issues in “Properties” page.
  • Rework Grade Formation tab prototypes according to usability feedback we got from Diane and Jen.
  • Brainstorm ideas for Dashboard view.

Roadblocks:

None.

Mike

Status:

Next Steps:

  • Same as always – continue to review code as it comes in.  Answer questions and help where I can.

Roadblocks:

  • None

Farah

Status:

Next Steps:

  • Changing “out_of” for grade entry items to type float (see http://review.markusproject.org/r/391/) has introduced some test failures so I need to investigate and update the tests
  • Finish the student UI and take a look at how marks are currently released/unreleased for assignments in order to implement something similar for grade entry forms
  • Remaining smaller tickets related to CSS, AJAX (#600-#602)

Roadblocks:

None this week

Bryan

Status:

  • Manually tested Brian’s implementation of flexible marking scheme and gave him some feedback
  • Studying and updating the existing functional and unit tests for rubrics and flexible marking scheme

Next Steps:

  • Test the views related to flexible marking scheme

Roadblocks:

  • None this week

Joseph

Status:

  • wrote a couple blog posts about maintaining state between AJAX calls inside the URL using hrefs and document.location.href
  • came up with two possible ways to fix the nested form issue on the submissions page
  • easier way, use javascript on the dropdownlist’s onchange to set document.location.href. This will redirect the page, similar to a form’s GET method. As a result, the form around the dropdownlists are no longer required. We will not longer have the nested form issue.
  • harder way, use javascript on each checkbox’s oncheckchange inside the table to update a hidden field in the unrelease/release mark form. This way, the form no longer has to contain almost the whole page. As a result, the form will not longer be nested with the dropdownlist’s forms.
  • working on the easier idea to verify that it works

Next Steps:

  • at the meeting verify that the solution is not too big of a hack
  • ask about ways to test this. Should it be whitebox tests using Selenium?
  • finish off the implementing the easier one
  • if it does not work, try out the other idea

Roadblocks:

  • None this week

Written by bryanshen

February 25th, 2010 at 9:15 pm

Posted in Status Reports

Fixtures are not as clear as Machinist

with 4 comments

I’m in the process of converting some unit tests (for Students and Assignments) away form fixtures and onto Machinist. I decreed at the weekly meeting that I was going to be finished this by the end of the weekend, and from the time this is posted, I’ve failed. I started later than I should have, and clearly didn’t account for enough debugging time.

“But wait!” I hear you clamour. “You’re just moving tests from one framework to another, right? Surely such things could be done by robots and other automatons?” Indeed! In an ideal world this would be true. But in this world, we will encounter exceptional circumstances and end up using our brain. Here is my tale…

This is a telling observation from the fixture tests:

Half the time, I’m not sure what’s being tested.

Here is a typical example:

<br />
def test_create_group_for_working_alone_student_existing_group<br />
    assignment = assignments(:assignment_1)<br />
    student = users(:student1)<br />
    # The test code...<br />
end<br />

The rote way of converting this to machinist is like so:

<br />
def test_create_group_for_working_alone_student_existing_group<br />
    assignment = Assignment.make<br />
    student = Student.make</p>
<p>    # The test code...<br />
end<br />

Pretty simple right? Awesome!

However, all is not well in testerland. Watch when I run it:

<br />
Testing started at 10:43 PM ...</p>
<p>NoMethodError: undefined method `allow_web_submits' for nil:NilClass<br />
app/models/group.rb:49:in `repository_external_commits_only?'<br />
    app/models/grouping.rb:333:in `update_repository_permissions'<br />
    app/models/student.rb:118:in `create_group_for_working_alone_student'<br />
    test/unit/student_test.rb:142:in `test_create_group_for_working_alone_student_existing_group'<br />
    /Applications/RubyMine 2.0.1.app/rb/testing/patch/testunit/test/unit/ui/testrunnermediator.rb:36:in `run_suite'<br />
    /Applications/RubyMine 2.0.1.app/rb/testing/patch/testunit/test/unit/ui/teamcity/testrunner.rb:215:in `start_mediator'<br />
    /Applications/RubyMine 2.0.1.app/rb/testing/patch/testunit/test/unit/ui/teamcity/testrunner.rb:191:in `start'<br />
1 tests, 0 assertions, 0 failures, 1 errors<br />
Test suite finished: 0.860263 seconds</p>
<p>Process finished with exit code 1<br />

Now there’s a tasty bowl of error soup!
What the heck happened? We were using a student and an assignment, shouldn’t it just work?

I look into the fixtures for both :student1 and :assignment_1 to see what went wrong.

<br />
# in users.yml<br />
student1:<br />
  user_name:      student1<br />
  last_name:      Mason<br />
  first_name:     Hollis<br />
  grace_credits:     5<br />
  type:           Student<br />
  section_id:     <%= Fixtures.identify(:section1) %><br />
  created_at:     <%= Time.now.to_s(:db) %><br />
  updated_at:     <%= Time.now.to_s(:db) %><br />
  hidden: false</p>
<p># in assignments.yml<br />
assignment_1:<br />
   short_identifier: Captain Nemo<br />
   description: "Code!!"<br />
   message:<br />
   due_date: <%= 30.days.from_now.to_s(:db)%><br />
   group_min: 2<br />
   group_max: 4<br />
   student_form_groups: true<br />
   instructor_form_groups: false<br />
   group_name_autogenerated: true<br />
   group_name_displayed: true<br />
   created_at: <%= Time.now.to_s(:db)%><br />
   updated_at: <%= Time.now.to_s(:db)%><br />
   repository_folder: CaptainNemo<br />
   marking_scheme_type: "rubric"<br />
   allow_web_submits: false<br />

Both look pretty routine, so now I’m at a loss of what to do. The only thing I’ve got to go on is the error message. But why am I getting it in the first place? The only thing that looks related to the error is the allow_web_submits property, which is being set to false. I update the make line to the following, to ensure consistent results.

<br />
    assignment = Assignment.make(:allow_web_submits => false)<br />

That’s not the big error though, why in the world is this being checked on a nil object? Where’s that happening? It’s raising in groups.rb, but where the heck were those set up?

Oh. They are… They are just in the yml files for the groups, groupings, and memberships fixtures.

A little tinkering around and my knowledge of how Assignments, Students, Groups, Memberships, and Groupings are organized gives me the final working test, that emulates the relevant conditions in the fixtures.

<br />
  def test_create_group_for_working_alone_student_existing_group<br />
    group = Group.make<br />
    assignment = Assignment.make(:allow_web_submits => false)<br />
    grouping = Grouping.make(:group => group, :assignment => assignment)<br />
    membership = StudentMembership.make(:membership_status => 'inviter', :grouping => grouping)<br />
    student = membership.user<br />
    # Same old Test code....<br />
  end<br />

Not at all the same, is it? The fixtures were hiding all the delicious dependancy information from me. In the end, I had to improvise a bit. From all the information, and time spent in the yml files determining the purpose of this particular test wasn’t easy. You needed to know exactly how the fixtures were set up in relation to each other, which involved look into half a dozen files. This is not ideal.

The purpose of a good test should be clear to anyone with some information about the system tested. In the case above, the test was that a student with a grouping already doesn’t cause an error when put into a separate group by themselves.

Beyond the assertion and the function name, I didn’t know what’s being tested. I didn’t know why those particular fixtures, :student1 and :assignment_1, were picked from the other students and assignment fixtures. The only way to find out is to directly delve into the .yml files that define them. That didn’t even guarantee that I understood the purpose of the test.

Before I submit this, I’ll likely need to check to see if each method is being adequately tested. Even if the tests were comprehensive under fixtures, it’s not clear that the same conditions are being met now. Thats not a vote to stay with fixtures though. Fixtures are bad because they move the preconditions away from the test, making it unclear under what circumstances the desired behaviour is to occur. Such a framework becomes brittle when writing new tests. Would you want add new fixtures, or see if some combination of the previous ones emulate the conditions of your test? With Machinist, you can construct what you need. When some other dev comes along, they might not know exactly why it was set up that way, but they will know what the setup is, and how you want the parts to be tested to interact.

Written by Robert B

February 22nd, 2010 at 1:48 am

Setting URL using Javascript

with one comment

Severin just pointed out a much easier way to update the URL using javascript:


<script language="javascript" type="text/javascript">
window.location.href = "/main/some_controller/some_action#some_anchor";
</script>

Thanks Severin!
I have extended this code into an example you can copy and paste into an html file and play around with:


<html>
<head><title>URL Updating</title></head>
<body>

<input    type="button"
name="cool"
value="cool"
onclick="window.location.href = window.location.href + '#value=param';" />

</body>
</html>

With Markus, this leaves lots of places for us to place the code. For a link_to_remote, we can place set the window.location.href in the :before or :complete variables. Example:
markus/app/views/ajax_paginate/_initial_paginate_links_alpha.html.erb


<%= link_to_remote "<< " + t('pagination.first'), :url => {
:action => action,
:id => assignment.id,
:filter => filter,
:page => 1,
:per_page => per_page,
:sort_by => sort_by,
:alpha_category => alpha_pagination_options[0],
:update_alpha_pagination_options => "false"
},
:before => "ap_thinking_start('#{table_name}');",
:complete => "ap_thinking_stop(); window.location.href = window.location.href + '#value=param';" %>

Notice that I stuck it right after the :complete =&gt; “ap_thinking_stop(); Additionally, notice that we are no longer limited to a’s. We can not apply this to any html objects.

Cheers,
Joseph

Written by jmate

February 21st, 2010 at 10:55 pm

Posted in Developer Essentials

Tagged with , ,

Rails, AJAX, Back Buttons, and Bookmarks

with one comment

Markus’s submission page uses AJAX to grab the next or previous page of the table of submissions. However, this breaks bookmarks and the back button. So the goal is to do something similar to gmail. They update everything after the anchor (#) in the URL. Here is what we can do with Markus with Ruby on Rails, to do the exact same thing.

My examples are only going to cover the implementation of the Next &gt; button. However, this can apply to any AJAX link.

The part of code that generates the Next link is in:
_initial_paginate_links.html.erb:


<%= link_to_remote "Next >", :url => {
:action => 's_table_paginate',
:id => assignment.id,
:filter => filter,
:page => current_page + 1,
:per_page => per_page,
:sort_by => sort_by
},
:before => "ap_thinking_start();",
:complete => "ap_thinking_stop();" %>

When the page loads it generates:


<a onclick="ap_thinking_start();; new
Ajax.Request('/main/submissions/s_table_paginate/1?filter=none&amp;amp;amp;page=3&amp;amp;amp;per_page=30&amp;amp;amp;sort_by=group_name',
{asynchronous:true, evalScripts:true,
onComplete:function(request){ap_thinking_stop();},
parameters:'authenticity_token=' +
encodeURIComponent('hjLTZo+xwhfYVOjA6E6Cbt3mm0SoaJw3t+nQG9UF/iA=')});
return false;"
href="#">Next ></a>

However, we want the URL to update, so we need to get rid of the ” return false; ” at the end of onclick. I accomplished that by using link_to and the remote_function helpers that Rails provides.

_initial_paginate_links.html.erb:


<%= link_to "Next >", "#value=param",
: onclick =>
remote_function(
:url => {
:action => 's_table_paginate',
:id => assignment.id,
:filter => filter,
:page => current_page + 1,
:per_page => per_page,
:sort_by => sort_by
},
:before => "ap_thinking_start();",
:complete => "ap_thinking_stop();"
)
%>

Which generates:


<a onclick="ap_thinking_start();; new
Ajax.Request('/main/submissions/s_table_paginate/1?filter=none&amp;amp;amp;page=3&amp;amp;amp;per_page=30&amp;amp;amp;sort_by=group_name',
{asynchronous:true, evalScripts:true,
onComplete:function(request){ap_thinking_stop();},
parameters:'authenticity_token=' +
encodeURIComponent('hjLTZo+xwhfYVOjA6E6Cbt3mm0SoaJw3t+nQG9UF/iA=')});"
href="#value=param">Next ></a>

Notice that the return false is no longer there! If you try to click the Next &gt; button, then it will place #value=param at the end of the url without reloading the page.

Now all that remains is figuring out how to do this with an html form. For example drop downlists, with an onchange method that updates the page using AJAX but still appends #value=param to the end of the URL.

Cheers,
Joseph

Written by jmate

February 19th, 2010 at 9:05 pm

Posted in Developer Essentials

Tagged with , , , ,

Meeting Minutes Feb 19, 2010

without comments

Agenda:

  • Status report

  • Q&A

People:

reid
farahj
m_conley
bryanshen
brianxu
robertb_frantil
jmate
bwinton
jerboaa

Meeting Minutes:

UI

Victoria has made a solid improvement on the look and feel of group and assignment pages
Assigning TAs among students should be made easier.

Grade Entry Page

Farah has released the grade entry page, which looks fantastic.
Farah will work on the tickets related to the student UI, and implement the feature that enables users to release the marks.

Submissions Page

Mike has shown a demo where user use back, forward and bookmark on the the submission pages.
Joseph has altered the submission pages to use server side pagination, and he is dealing with the filters and showing X per page.
Joseph has also figured out how to put page parameters into url.

Flexible Marking Scheme

Brian is focusing on the functionalities currently and will soon produce some prototypes.
Bryan will soon join the implementation of Flexible Marking Scheme.

Note System

Robert has made Assignments and Students compatible with notes system

Others

Robert will turn Student and Assignment Unit tests to Machinist by the end of the week.
Farah has created a tichet for CSV upload/download.
Bryan has solved a ticket and done some Machinist tests.
Severin’s api for loading test results has enabled users to delete a bunch of results

Notes

Please contact Victoria and Karen if there are UI issues.
Two full-time students will work for the summer.

Written by bryanshen

February 19th, 2010 at 6:52 pm

February 19th Punchlines

without comments

This week’s punchline updates:

Victoria

Status

  • Revised Group Formation View prototypes for usability testing.

Next Steps

  • Contact Nelle to see if she needs any UI/UX assistance for the Sections functionality.
  • Rework the usability and design for the Properties page.
  • Brainstorm designs for the Dashboard (information summary).

Roadblocks

  • None.

Mike

Status

  • Reviewed a bunch of code
  • Answered email, assigned tickets, helped/advised where I could

Next Steps

  • Keep doing the above

Roadblocks

  • I have a midterm coming up.  So that’s looming.

Robert

Status

  • Working on adding Assignments and Students as Noteables. Initial change is up for review.
  • Did an in depth look into how the Notes system is organized to facilitate my work on it.
  • Started converting the Assignments and Students unit tests to Machinist.

Next Steps

  • Implement the different noteable Note creation on the main notes create page.
  • Add in the modal dialog links to the Assignment and Student pages.
  • Once the initial Noteable change is in, finish converting the Assignment and Student Unit tests to Machinist.

Roadblocks

  • None

Farah

Status

  • Modified the grades table so that Grades and GradeEntryStudents are created on demand instead of when the form is created and made the other changes Mike suggested for Review Request #314
  • Updated the unit tests and the functional tests to go along with these new changes
  • Created a blog post about the performance of the grades table (see http://blog.markusproject.org/?p=1215)
  • Learned more about Machinist and then migrated all of the unit tests and functional tests for grade entry forms to Machinist
  • Created a ticket related to CSV upload/download for the grades table (see https://stanley.cdf.toronto.edu/drproject/csc49x/olm_rails/ticket/604)

Next Steps

  • Commit my code for the grades table and work on the tickets Mike created for grade entry forms [598 to 602] (these are smaller issues related to pagination, CSS, etc.)
  • Student UI

Roadblocks

  • None this week

Brian Xu

Status

  • Close ticket 512,571, still working on 531
  • modified existing code to enable selection of marking scheme (teacher can select flexible scheme on assignment creating page and edit it)
  • Learning the grader view of rubric

Next Steps

  • Create the prototypes of grader view and student view of flexible scheme

Roadblocks

  • Family events and networking issue

Bryan Shen

Status

  • Got familiar with machinist and wrote some tests with it.
  • Submitted ticket 418: Changing an assignment’s due date doesn’t update the SubmissionRule’s cache.
  • Read several more chapters of Ruby on Rails for Microsoft Developers
  • Reviewed some code

Next Steps

  • Focus on the implementation of Flexible Marking Scheme.

Roadblocks

  • None

Joseph Mate

Status

  • Checked in the config checker. It will verify that all files and directories specified in [test|development|production].rb
  • In side the _initial_paginate_links.html.erb: I figured out how to change the link_to_remote into a link_to and remote_function in order to hit the next/previous links and have the parameters in the URL after the anchor(#) while traversing pages.
  • Mike and Severin recommended that I reimplement AJAX pagination with serverside pagination
  • I tried to jump in and do it a clean way. I learned that this would require way to much refactoring. As a result, I am altering as little existing code as possible. Specifically, I don’t want to remove S_TABLE_PARAMS because it seems to be responsible for searching and filtering the objects.
  • Cleaned up the tabbing in browse.html.erb and broke up the long lines in to multiline statements
  • Almost done converting AJAX paginate to server side paginate just stuck on a nested form problem
  • http://review.markusproject.org/r/389/

Next Steps

  • Manually test it
  • Figure out how to automatically test it
  • Clean it up so that we take advantage of will_paginate’s paginate fuction’s use of find. Eg: paginate_by_assignment_id( @assignment_id, …. )

Roadblocks

  • I have no idea how to automatically create submissions for students. The other day Mike taught me how to automatically add groupings which would populate the submissions page. However, I need to be able to click on the assignments and test out the back button and just adding groupings does not allow me to test that. Additionally, I want to to test that the filters are working.
  • I will need to some pointers on where to begin the automated testing.
  • Midterm coming up

Written by Victoria

February 18th, 2010 at 9:56 pm

Group Formation Tab: Prototypes

with 3 comments

As per last week’s UI/UX meeting, I’ve made changes to the first draft of the group formation tab wireframes:

Group Formation: Adding a student to a group

Group Formation: Removing a student from an existing group

Group Formation: Filtering -- Only show valid group formations

Group Formation: Filtering -- Only show invalid group formations

These prototypes will be used in a simple usability session where we will be getting preliminary usability feedback from a small sample of our current users.  More feedback and updates on these prototypes are to come.

These prototypes will also be discussed in tomorrow’s UI/UX meeting in our IRC channel, #markus.  Please join us if you can make it! 🙂

Written by Victoria

February 16th, 2010 at 11:06 pm

The Plan for Notes

with 2 comments

For the past few hours I’ve been diving deep into the Notes system to find out exactly what needs to be changed in order to be able to add notes to all of Groupings (status quo), Assignments, and individual Students.

From the previous post on the subject:

We have completed the first three steps, including unit and functional tests. Thanks to the polymorphic, “noteable” idea that we used for the relationship between a note and a grouping, the only work necessary to have notes on a different object type is to:

  • add a “display_for_note” method to the model, like we did for groupings – this allows us to display these notes
  • modify the create a note form in the Notes tab to allow for other types of noteable objects than just groupings
  • add a link to the modal dialog in an appropriate location for the object type

For now, I can’t see the best place to place a link to a modal dialog to create a note associated to an assignment or to a student, so I would recommend just adding that functionality to the Notes tab.

This leads me to believe that most of the work is cut out for me. Which as near as I can tell, it is!

I’ll endeavour to break up my changes as mentioned above, described below:

  1. Low Hanging Fruit – a simple isolated change to add the display_for_note functionality, and associated tests, to the models of Assignments, and Groupings. Also, the notes main page will need to be updated to not have the add_new when there are no ‘noteable’ objects in the DB at all, rather than simply groupings, as it is now.
  2. Refactor Note Creation page – Once the other objects are able to be “noted” the next place to change is the main notes creation page. Currently it’s designed to look solely for Groupings that we can apply notes to. It will need to be updated with a drop down of the types, and then dynamically update a subsequent drop box with those types. This will be much clearer than simply putting all notable objects into a single drop box, even though it adds another pair of clicks to creating a note from scratch.
  3. Adding Modal Dialog links to Assignments and Student pages – These will be put in sensible locations, probably adjacent to the edit link in the student table, and on both the Assignment main table page, and the assignment configuration page. We don’t want to confuse people by having ambiguous Notes links without being clear what the noteable object is.

For 3 I’ll need to consult with Victoria for best placement of the links, as this is a usability issue, first and foremost.

Change 2 is also a usability issue somewhat, but I can’t think of a simpler solution interface wise than two drop downs in the create note page.

One issue that should be interesting to deal with is the case of Single student groups. Do we apply the note to the grouping as we do now? Or would it be better to apply it to the student in that group? The obvious solution is to do nothing, and use locality to decide. Whenever a note is being created in marking an assignment of a single student, the most likely intention of the user is to make a note on the grouping, as it’s related to the assignment. Otherwise, they would seek to make a note on the student specifically either in the table of students, or in the Note creation form in the Notes tab.

Input on this plan would be much appreciated, though I won’t be able to answer detailed technical questions until I’m arm deep into the code.

Written by Robert B

February 16th, 2010 at 2:56 pm

Posted in Notes System

Simple Grade Entry: Performance Update

with 2 comments

Back in December, I blogged about performance issues related to the first version of the grades table. Two of my concerns were that the table was difficult to navigate because all of the students were shown on a single page and that the table took a long time to load or save. Since then, the grades table has undergone a bunch of changes, in an attempt to improve performance. Pagination was implemented to reduce the number of students displayed on a page, which made the table load faster. The “Save” button for the table was removed and the grades are now automatically saved as they are being entered. A drop-down list of alphabetical categories was added to make it easier for an instructor to jump to a page containing a particular set of students. All of these changes really improved the table view itself.

But, there was still one problem: when the number of students was large and when the number of questions was large, creating a grade entry form took a very long time! This is because of all the objects that were being created when the form was created. For example, say an instructor was creating a grade entry form with q questions and there were s students. Then, when the GradeEntryForm was being created, (q x s) Grades and s GradeEntryStudents were also being created, all in one shot. The important thing to realize is that for a table like this, all of these objects will have to be created at some point. How else can you store the grades for all the students, for all the questions, and release the grades for a particular student? However, the key thing is to create these objects in a clever way. The solution was to create GradeEntryStudents and Grades as needed, instead of when the GradeEntryForm is being created. This means that creating the form itself takes very little time! When the grades table is first loaded, the GradeEntryStudents and Grades objects do not actually exist. They are created as the user enters the grades. For example, if the user enters a grade for “Joe Smith”, we pass the Student ID and the GradeEntryItem ID to the controller. The controller then checks to see if the corresponding GradeEntryStudent exists. If it doesn’t exist, we then create it. Next, we check if the Grade for this GradeEntryItem exists. If it doesn’t exist, we create it. Otherwise, we update it. The user doesn’t even really notice these objects are being created as they are entering the grades! So now, GradeEntryForm creation and the table view itself have been improved!

Written by Farah Juma

February 16th, 2010 at 11:20 am

Posted in Grade Entry Forms