MarkUsProject/Markus — pull request #911 by mikeing2001 (2012-11-01 20:01:54+00:00)
Title: Fix flexible criteria

Issue #745

This change is based off of the initial review http://review.markusproject.org/r/1233 done by @Fudge21.

The flexible_criteria_controller was missing the create method, which caused a routing error when trying to create a new flexible criterion. I implemented it back into the controller copying the same structure as the rubrics controller (it was basically the same, but for some reason placed in the new method).

Moved the delete button in the form to the bottom to follow the same standard as the rubrics form. Also, for the destroy method I removed the redirect_to since it was not needed. The result of destroying a criteria should just have a flash message.

Fixed the left pane which holds the list of criteria created. Before the links for each criteria were not using the proper route. I changed it and took from the 'rake routes' list which gave 'update_positions_assignment_flexible_criteria_path'

Syntax for the flexible form_for didn't seem to be working properly so I switched it to remote_form_for to make it straight forward.

In index.html.erb, I just fixed the links to 'Add Criterion', etc. to follow the same standard as the 'rubric' marking scheme links.

Added destroy for flexible_criteria to the routes.

Fix the move position on the left panel.

Also, Updated the test to match the new code.

Testing.
Ran the unit and functional test
Ran manual test to create,edit, edit, move criteria.