CSC/ECE 517 Spring 2013/FINAL PROJECT E736 UNDO DELIVERABLE: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 110: Line 110:
***teams_user.rb
***teams_user.rb


=== Unit Tests ===
=== Unit & Functional Tests ===
*Modified Tests
The implementation of the Undo functionality did not afford any testing opportunities applicable to unit or functional tests.
**test file
***test method
*New Tests
**test file
***test method


=== Functional Testing Plans ===
=== Functional Testing Plans ===

Revision as of 01:01, 22 April 2013

E736. Undo Functionality for Expertiza

Team Members

  • Chun Sing Tsui (ctsui@ncsu.edu)
  • Kenny Yarboro (kbyarbor@ncsu.edu)
  • Meng Cao (mcao2@ncsu.edu)
  • Travis Folsom (twfolsom@ncsu.edu)

Project Deliverables

Screencast Video Overview

A video overview of the project was created via Screencast-O-Matic and can be found here.

Overview of Undo Functionality

  • Undo allows the user to undo their most recent actions for any items that offer the undo functionality.
  • The undo of file submissions was not required; however, we did or did not do these....depends on if we complete it...
  • If an undo is attempted on an item already modified by another user, a message is displayed stating why undo cannot be performed. Otherwise, the user is able to undo any changes to an item with the undo functionality.
  • When multiple actions are performed in one step, the undo functionality groups all of the changes together for the purposes of restoring all items affected by the action previously performed.

List of Items Now Supported by Undo Functionality

  • Add Signup Sheet
    • Delete Topic
    • Edit Topic
    • New Topic
  • Assignments
    • Add Participants
    • Copy
    • Create
    • Delete
    • Edit
  • Courses
    • Add Participants
    • Copy
    • Create
    • Delete
    • Edit
    • Toggle Private/Public
  • Import
    • Import Participants
    • Import Teams
    • Import Users
  • Student Actions
    • Create Team
    • Edit Team Name
    • Leave Team
    • Submit Hyperlink
  • Questions
    • Copy
    • Create
    • Delete
    • Edit
  • Questionnaires
    • Copy
    • Create
    • Delete
    • Edit
  • Teams
    • Add
    • Create (Manual)
    • Create (Random)
    • Delete
    • Delete All Teams
    • Edit

Redo Functionality

In addition to the Undo functionality being added, the ability to Redo an undone action is also implemented. Whenever an Undo is performed, the user is given an option to Redo the action that was undone. Whenever a Redo is performed, the user is given an option to Undo the action again.

Design Patterns and Designs

  • DRY
    • "Don't Repeat Yourself" practice was followed.
    • The app/controllers/application_controller.rb file contains all of the Undo functionality code for Expertiza. All other controllers are able to call the necessary undo-related methods to enable the Undo functionality.

Framework Leveraged & Enhanced

  • Paper Trail(https://github.com/airblade/paper_trail)
    • Paper Trail allows for tracking changes to model data.
      • Good for auditing or versioning.
    • Offers many functionalities including:
        • Viewing a model at any stage in its lifecycle.
        • Reverting a model to any version.
        • Undeleting items after they have been destroyed.
    • Compatible with Rails-2.3.15, which is the version Expertiza uses.
    • There is a Railscast showing how to implement the undo feature with Paper Trail.
    • Ranked as the most popular framework for Active Record versioning feature in here
  • Enhancement
    • Paper Trail only supported undo of the most recent action and did not restore associations.
    • Paper Trail customized to add support for restoring associations within the Expertiza system.
      • Description of modification...

Classes Modified

  • apps/
    • controllers/
      • application_controller.rb
      • assignment_controller.rb
      • course_controller.rb
      • import_file_controller.rb
      • participants_controller.rb
      • sign_up_sheet_controller.rb
      • student_team_controller.rb
      • team_controller.rb
      • teams_users_controller.rb
      • versions_controller.rb
    • models/
      • assignment_participant.rb
      • participant.rb
      • sign_up_topic.rb
      • ta_mapping.rb
      • team_node.rb
      • teams_user.rb

Unit & Functional Tests

The implementation of the Undo functionality did not afford any testing opportunities applicable to unit or functional tests.

Functional Testing Plans

  • Modified Tests
    • test file
      • test method
  • New Tests
    • test file
      • test method