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

From Expertiza_Wiki
Jump to navigation Jump to search
Line 32: Line 32:
=== Frameworks to Leverage ===
=== Frameworks to Leverage ===
*Paper Trail(https://github.com/airblade/paper_trail)
*Paper Trail(https://github.com/airblade/paper_trail)
**PaperTrail lets you track changes to your models' data. It's good for auditing or versioning. You can see how a model looked at any stage in its lifecycle, revert it to any version, and even undelete it after it's been destroyed.
**PaperTrail allows for tracking changes to model data.  
**It is compatible with Rails-2.3.15, which is the version Expertiza used.  
***Good for auditing or versioning.  
**There is a [http://railscasts.com/episodes/255-undo-with-paper-trail Railscast] shows how to implement undo feature with Paper Trail
**Offers many functionalities including:
**It is ranked as the most popular framework for Active Record versioning feature in [https://www.ruby-toolbox.com/categories/Active_Record_Versioning here]
****Viewing a model at any stage in its lifecycle.
*Alternative Frameworks are listed [https://www.ruby-toolbox.com/categories/Active_Record_Versioning here].
****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 [http://railscasts.com/episodes/255-undo-with-paper-trail Railscast] showing how to implement the undo feature with Paper Trail.
**Ranked as the most popular framework for Active Record versioning feature in [https://www.ruby-toolbox.com/categories/Active_Record_Versioning here]
**Alternative Frameworks are listed [https://www.ruby-toolbox.com/categories/Active_Record_Versioning here].


=== Expected Classes to be Modified ===
=== Expected Classes to be Modified ===

Revision as of 00:33, 2 April 2013

E736. Undo Functionality for Expertiza

  • Contacts: Ed Gehringer (efg@ncsu.edu) and Andrew Kofink (ajkofink@ncsu.edu)
  • Begin implementing SQL transactions (ActiveRecord:Transactions). This should let the user "roll back" any creation or update of a SQL table (assignments, rubrics, etc.) Several issues arise, that you should discuss with me.
    • Should students be able to roll back, e.g., submissions or reviews?
    • Suppose an instructor is trying to roll back and a TA is editing the same assignment? How can conflicts be presented?
    • Do rollbacks affect only what's in the db, or do they also affect submitted files?

Team Members

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

Design Document

Overview of Undo Functionality

  • Undo should cover any edit functionalities and any submissions of links. File submissions do not need to be included for the scope of this project.
  • User should be able to undo any changes to an item (such as course or assignment) as long as no other user has edited that same item within the user's current session.
  • If undo is attempted on an item already modified by another user, display a message stating why undo cannot be done.

List of Items to be Supported by Undo Functionality

  • Assignments
  • Courses
  • More items may be covered if time allows.

Design Patterns and Designs

  • DRY
    • "Don't Repeat Yourself" practice will be followed.
  • Memento
    • The Memento pattern will be followed through open-source Ruby gems leveraged by the project.

Frameworks to Leverage

  • Paper Trail(https://github.com/airblade/paper_trail)
    • PaperTrail 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
    • Alternative Frameworks are listed here.

Expected Classes to be Modified

  • Course
  • Assignment
  • etc

Expected Unit Tests to Include

  • at least one per method...

Expected Functional Tests to Include

  • Happy Path
    • User successfully undoes his/her action on various models(Course, Assignment, etc).
  • Sad path
    • User is unable to undo, due to reasons as
      • user has no privilege to the undo action: a student can't undo his/her submission after due date.
      • some other user is editing the same item at the same time.