From ebdbef8857014f721aacc8e1cdb62c07b8a28833 Mon Sep 17 00:00:00 2001 From: Rohan Rangray Date: Fri, 5 Jun 2015 03:42:03 -0700 Subject: [PATCH] F7 was a pain --- DesignUseCases.tex | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/DesignUseCases.tex b/DesignUseCases.tex index b4fafb4..f4955b4 100644 --- a/DesignUseCases.tex +++ b/DesignUseCases.tex @@ -1185,14 +1185,12 @@ Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard} \subsection{[F7] Fix Flashcard} \begin{description} -\item[Description]{The User shall be able to alter a flashcard he/she made -originally and not have to make a new copy of it.} +\item[Description]{The User shall be able to alter a flashcard he/she made originally.} -\item[Desired Outcome]{The User shall alter one flashcard and that -alteration will be shown to all users of that flashcard} +\item[Desired Outcome]{The system changes the flashcard in the user's deck so that it +doesn't affect any other users who added the previous version of the flashcard to their decks.} \\ -\item[User Goals]{The user shall make the flashcard say something different -than it did originally.} +\item[User Goals]{The user shall either change the text or the blanks of the flashcard.} \item[Primary Actor]{User (student) } @@ -1208,7 +1206,10 @@ Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard} \begin{itemize} \itemsep1pt\parskip0pt\parsep0pt \item - {User has created the flashcard} + {The user has created the flashcard} +\item + {The user is either in the feed view or the deck view of a class and can see the + flashcard that he wishes to fix.} \end{itemize} \item[Post-conditions]{} @@ -1216,39 +1217,44 @@ Login, {[}A3{]} Add a Class, {[}F1{]} Push Flashcard} \begin{itemize} \itemsep1pt\parskip0pt\parsep0pt \item - {The user shall see their alteration for that flashcard} -\item - {Other users will be notified of the alteration} + {The flashcard in the user's deck gets updated to reflect the changes made by the user.} \end{itemize} \item[Trigger]{User (creator of original card) has clicked on the button -``Edit''} + blue pencil icon at the bottom left of the flashcard.} \item[Workflow] \begin{enumerate} \itemsep1pt\parskip0pt\parsep0pt \item - {User shall select one of the Flashcards they authored.} + {User shall hover over one of the Flashcards they authored.} \item - {User shall select ``Edit'' button on the flashcard.} + {User shall click on the blue pencil icon at the bottom of the flashcard.} \item - {Client shall display an ``Edit Flashcard'' view.} + {The frontend shall display a dialog box to edit the flashcard.} \item - {The Flashcard will display editable fields/areas.} + {The User shall change the text and the blanks of the flashcards appropriately.} \item - {The User shall input any changes to the Flashcard.} + {The User shall click on the ``Save Changes'' button.} \item - {The User shall select the ``Done Editing'' button.} + {The frontend shall convert the blanked portion of the text into a list of offsets to be + sent to the backend in CardGridController.js.} \item - {The Client shall close the ``Edit Flashcard'' view.} + {The server shall update the flashcards content in FlashcardViewSet.partial_update in views.py.} \item - {The server shall update the Flashcard's content.} + {The backend makes sure that no other user has the card in question in his/her deck.} \item - {Client shall notify users with the Flashcard that the Flashcard has - been edited, allowing the other users to keep or to discard the - changes.} + {The backend makes the appropriate changes to the card and saves them.} \end{enumerate} +\item[Alternate Workflow] +\begin{enumerate} +\itemsep1pt\parskip0pt\parsep0pt +\item + {The backend finds that other users have added the card that is being edited.} +\item + {The backend shall create a new card with the passed in changes applied and add it to the user's deck + after removing the older card from the user's deck.} \end{description} {} -- 1.9.1