| #summary Designs for implementing Task-based work flow(GHOP) | |
| #labels Phase-Design,Contents-Draft,Importance-Details | |
| <wiki:toc max_depth="3" /> | |
| = Introduction = | |
| This document covers detailed explanation of how we are going to implement Task-based work flow for running GHOP. A more detailed discussion containing requirements for implementing GHOP features in Melange is documented [http://code.google.com/p/soc/wiki/GHOP here]. | |
| = Details = | |
| The entire work flow is divided into 5 roles, namely | |
| * Program Admin (PA/LH) | |
| * Organization Admin (OA) | |
| * Mentor | |
| * Student | |
| * Public - This role indicates a general user who has not registered with Melange to access specific views. | |
| == Program Admin == | |
| * Program Creation View - Already exists (same as GSoC). | |
| * Program Configuration View - Will have options to create new task types and new task states, specify lower age limit, timeline for the program and the maximum number of tasks that the student can work simultaneously during the program. None of these fields will be mandatory, so PA can fill it up whenever she has the relevant details. | |
| * Organization Applications Review View - (Same as GSoC) | |
| * Task Quota Limits - PA will be able to assign tasks-limit quotas to Organizations and will be able tune it whenever required. (GSoC slot allocation interfaces can be re-used?) | |
| == Organization Admin == | |
| * Add/Edit/Delete New Tasks View - Fields to provide task title, task description are provided. OA will be able to select one of the task types and task states which are defined by PA. There will be a text box to provide arbitrary tags, a field to set the time required to complete the the task(which takes values in hours). A comment box will be provided. The view will also have an option to set the difficulty level(Open question: Should difficulty level be a text box or be selected from a drop down menu containing pre-defined difficulty levels. If it is latter, where and to whom should we provide the option of defining the difficulty levels?). A field to assign mentors to the task will also be provided. If a student has claimed the task, in the edit View there will be an option to either accept or reject the request. Will have an optional button to extend the deadline by 24 hrs for the student who have not completed the work. | |
| * Tasks Approval View - If mentors add/delete tasks, all such actions will be listed in this view. Bulk Acceptance option will be provided as a check box for each task listed and approve all the selected tasks. | |
| * List of "Tasks with Action Needed" View - This view lists all the tasks that are requested by students to claim, list of tasks for which students have submitted their work. Clicking upon the corresponding task will take him to the edit view of that task. | |
| * (NTH) Bulk Add Tasks View - This view will give the user the ability to upload a CSV file containing the set of tasks to be uploaded in bulk. | |
| == Mentor == | |
| * Add New Tasks View - All the options will be same as the one provided for OA, but to add or delete tasks OA should approve the action(Should OAs approve Editing too?). The person who creates the task will be assigned as the mentor automatically. The URL used for this will be the same as the one used by OA. | |
| * List "Tasks Added by Me" View - Mentors will be able to view the list of tasks added by himself. | |
| * Edit Tasks View - Mentors will be able edit the tasks without approval from OA(see question below). URL is same as the one used for OA. | |
| === Life time of a task === | |
| # Mentor John creates 3 tasks one after the other. | |
| # He is automatically assigned as mentor for all 3 tasks. | |
| # Waits for those tasks to be approved by the OA. | |
| # While waiting for the OA to approve the tasks he realizes that task #3 is not correct, so he deletes it and he needs not to get approval for deleting the task at this stage. | |
| # OA approves other 2 tasks, reassigns Richard as a mentor for the task #2 but leaves task #1 as it is. | |
| # Mentor John can edit both tasks #1 and #2 even though he is not the mentor of task #2 to change the task state, type, tags, time limit and difficulty including editing the task description content. | |
| # Student David requests to claim the task #1 and student Paul requests to claim task #2. | |
| # Knowing Paul is a spammer, John rejects the request, but approves David's request, changes the task state to "claimed". | |
| # Now student Lisa requests to claim task #2 and Richard approves her request and changes the task state to "claimed". | |
| # In the due course of progress, both mentors and students discuss about the task, David and John discuseed that David requires more time than it was originally specified for the task, so he increases the time limit by another 48 hrs. | |
| # Lisa on the other hand doesn't submit her work on time. So she automaticaly receives a 24 hour extension of the deadline together with a reminder email.Lisa neither replies not submits her work in next 24 hrs, so the task is automagically re-opened. | |
| # David submits his work and John is happy about it and sets the task state to "closed". | |
| # David now requests to claim task #2 and Richard accepts it and assigns task state to "assigned". | |
| # David and Richard realize that it is difficult to complete the task at all by GHOP students. | |
| # Richard deletes the task even though he did not create it. David can claim another task now. | |
| <Lennard> | |
| Again without org admining giving permission? Should discuss :) | |
| </Lennard> | |
| == Student == | |
| * Task Description View - All the fields set by OA/Mentors will be displayed. A button to "request to claim" the task will be provided. If the student has already requested to claim this task, we replace the "I request this task" button by "I withdraw". | |
| * In-progress Task View - The contents are exactly the same as the previous view, including "I withdraw" button, with few additions. Firsly it is provided just to give easy access to the task the student is working on. He will be able to submit his work here as a file(Should we allow upload of single file only so student can archive if he has multiple files and upload or should we allow upload multiple files, GMail-attachment style?). It is not yet confirmed that work submissions will be accepted in Melange. It depends on what LH tells us after discussing with the legal team. An additional text box will be provided to specify links to the work done for this task. After the task is completed, the student should be able to change the task state to "NeedReview" which will trigger a notification. | |
| * Completed Tasks View - Provides a list of all the tasks completed by the particular student. | |
| === Life time of a task === | |
| # Student David goes to the view that lists all tasks. | |
| # Filters them first on "Newly Added tasks" and then filters this list on "Organization Melange" (any order is possible) | |
| # He then filters the tasks that have the type "Documentation" and Difficulty level "Medium" | |
| # He sees a task titled "Document GHOP progress bar related features in Melange" interesting to him. So he clicks on it in the list and enters the task description page. | |
| # He reads the description and he is interested in requesting to claim it, but there is no button to claim the task. Instead at that place, the page says "This task has been requested by Lisa". | |
| # So he goes back to his filtered list and sees the task titled, "Document GHOP Prize allocation features in Melange". He reads the description, now he sees a button "I request to claim this task" and clicks on it. | |
| # David is very eager to win prizes so he doesn't want to waste his time, so he goes back to the unfiltered list of tasks, filters it by "New Task" and then by "Organization PSF" and then the task type by "code". He sees a task titled, "Re-organize module FOO and BAR". He reads the description and clicks on the button "I request to claim this task". | |
| # The system raises an error informing David that this program only allows him to work on one tasks at a time. | |
| # He feels that this task is more interesting to him than the one he has already requested. The previous task is not assigned still. So he goes back to that task page and clicks on "I withdraw". | |
| # He returns to the PSF task and requests to claim this task. After a few minutes he's succesfully claimed this task. | |
| # At the same time Lisa, who is working on some other task feels it is difficult for her to complete in the given time limit after submitting her interim work her mentor decides to give here additional time. Even after the extended time limit she doesn't submit more work and the task is automagically "re-opened". | |
| # David completes his task and uploads the diff files on task description page (Note this field is available only because David was assigned this task, no one else would get the field to upload the files). He also adds Mailing List discussions as additional references to his work, marks the "Needs Review" check box and hits submit. | |
| # David goes to the tasks list, selects another task and tries to request that task, but he still gets the error telling he is supposed to work on only one task at a time, since his previous task is not yet closed. | |
| # Mentor John now looks at David's work, discusses with him and they decide it needs some more work. John sets the task state to "Needs More Work" and gives David an additional 48h. | |
| # David works some more on his task, uploads the work, checks "Needs Review" again and submits it. | |
| # John is happy this time and he sets the task state to closed. | |
| In all the above 3 views, student will be able to add comments to that specific task. | |
| == Public == | |
| * Task Description View - All the fields mentioned above for student will be visible, but they will be read only. However an option to post comments will be provided. | |
| == Actions common to multiple roles == | |
| * List Tasks View - This view will be available to all roles. By default all the tasks will be listed. Following filters will be provided to narrow down on the list of tasks. Filter by | |
| # Organization. | |
| # Difficulty level. | |
| # Type of Task. | |
| # State of Task. | |
| # Time required for completing it. | |
| # Newly Added. | |
| # Students (LH should get permission from legal team). | |
| Each task listed will be linked to the specific task description page setup by OA/Mentors. | |
| * All roles will have an option to subscribe to a specific task. | |
| * All the roles except Public role will have a view for signing up. | |
| == Automagic == | |
| * Whenever something changes on the task page, every one subscribed to the task should get a notification. | |
| * Student will be allowed to work on at most the number of tasks specified by PA in the program configuration. If he ever tries to request a second task while he has requested another task, the system will raise an error. The student will be allowed to request the next task only when the mentor/OA for that task sets the tasks state to "Closed". | |
| * Once the student requests a task, that task will be locked down, so there will be no button for subsequent students to claim it, until it is reopened. | |
| * (NTH) Once the task is assigned to the student, the student and the mentor should get remainders at specific intervals about the deadline. | |
| * In the student sign up page, Birth Date will be a mandatory field and the provided Birthday is checked with the lower age limit provided by PA in Program Configuration page, if it violates the student will not be allowed to sign up. | |
| = What should Side bar contain for each roles? = | |
| == Program Admin == | |
| == Org Admin == | |
| == Mentor == | |
| == Student == | |
| == Public == | |
| = Model Design = | |
| Reference: [http://code.google.com/p/soc/wiki/MelangeModuleArchitecture Melange Module Architecture] | |
| *Legend* | |
| # The heading specifies the model name and the bulleted items specify the properties to be stored in the model. | |
| # Reference properties in the model are italicized. | |
| == Task == | |
| We will be storing a reference to User property which is mandatory and an optional reference to a Student property. So when a particular student claims his first task we just attach the User property to it. However once he completes the task, before it is set to be completed we will enforce to fill in his student profile so we don't lose track of it. This also helps us to show if the task is taken up by a new student. | |
| * _user_ | |
| * _student_ | |
| * _organization_ | |
| * title | |
| * description | |
| * difficulty (Question: pre-defined or arbitrary?) | |
| * time_to_complete | |
| * state | |
| * type | |
| * date_of_creation | |
| * date_last_modified | |
| == TaskHistory == | |
| Lennie: This is what I meant by "snapshot of the task at particular instance of time". It can be handled in one of the 2 ways, either store all the property values as it at the moment when one or more values change or just store the value of the property that changes at that time instance before the value was changed and along with that store the timestamp. | |
| You had suggested to store a single change is single property and parse the property value to retrive that history. | |
| I had a small discussion with Sverre about Datastore storage space consumption on the kind of model I am proposing. The logs are here: | |
| [http://www.thousandparsec.com/~irc/logm/%23melange.2009-05-15.log.html#t2009-05-15T08:38:33 start] | |
| [http://www.thousandparsec.com/~irc/logm/%23melange.2009-05-15.log.html#t2009-05-15T08:52:14 end] | |
| * _task_ | |
| * _user_ | |
| * _student_ | |
| * _organization_ | |
| * title | |
| * description | |
| * difficulty (Question: pre-defined or arbitrary?) | |
| * time_to_complete | |
| * state | |
| * type | |
| * date_of_creation | |
| * date_last_modified | |
| * timestamp | |
| The following models are shared models with GSoC with different OOP. Look at Module Architecture. | |
| == Organization == | |
| * task_quota_limit | |
| (Question: Since orgs task_quota_limit can be changed during the program, is it necessary to store the history of the changes in this quota limits? Is it necessary for reports) | |
| == Student == | |
| == Program == | |
| * student_min_age | |
| * number_of_simultaneous_tasks | |
| * Winner Prize | |
| * Runner-up Prize | |
| == Mentor == | |
| == OrgAdmin == | |
| == Timeline == | |
| = Task States = | |
| == Visualizing the states of a Task == | |
| http://img230.imageshack.us/img230/1641/taskstatemachine.png | |
| http://img15.imageshack.us/img15/5099/taskclaimstatemachine.png | |
| http://img231.imageshack.us/img231/5739/taskclosestatemachine.png | |
| http://img219.imageshack.us/img219/8198/taskwithdrawalstatemach.png | |
| = Schedule = | |
| 1. Community Bonding - ( Current - May 22nd ) | |
| Refine requirements. Document design decisions and implementation. Write unit tests(ATM I am writing tests for Organization and Program logic and views). | |
| 2. Coding Phase I (May 22th – June 2nd ) | |
| Implement all the models. | |
| 3. Coding Phase II (June 3rd – June 20th ) | |
| Implement | |
| * **Program Admin roles's views:** Program Configuration View, Task Quota Limits | |
| * **Organization Admin:** Add/Edit/Delete New Tasks View, Tasks Approval View, List of "Tasks with Action Needed" View. | |
| * **Mentor:** Add New Tasks View, List "Tasks Added by Me" View, Edit Tasks View | |
| * Notification System and options to (un)subscribe to tasks. | |
| 4. Testing Phase I (June 21st – June 25th ) | |
| Write Unit tests for the above implemented views and logic. | |
| 5. Coding Phase III (June 26th – July 21st ) | |
| Implement | |
| * **Student:** Task Description View, In-progress Task View, Completed Tasks View. | |
| * **Public:** Task Description View. | |
| * **Common Views:** List Tasks View | |
| * **Automagic:** | |
| ** Enforcing student to work on atmost **N number of tasks** at a time. | |
| ** Enforcing a task to be claimed by only one student. | |
| ** Check for minimum age limit on the student sign up page. | |
| * All the filters will be implemented. | |
| 6. Testing Phase II (July 22th – July 27th ) | |
| Writing unit tests for all the above views and logic. | |
| 7. Requesting for community wide Reviews, testing and evaluation | |
| (July 28th – August 2nd ) | |
| Final phase of testing of the overall project, obtaining and | |
| consolidating the results and evaluation of the results. | |
| Requesting community to help me in final testing and closely | |
| working with testers. | |
| 8. Scrubbing Code, Wrap-Up, Documentation | |
| (August 3rd – August 10th ) | |
| Fixing major and minor bugs if any and merging the project | |
| with the Melange hg repository. Writing User and Developer | |
| documentations and finalization. | |
| = Questions = | |
| * Should mentors get approval from OAs to edit tasks? | |
| <Pawel>I think they shouldn't. If the tasks had been approved by OA any mentor should be able to edit them</Pawel> | |
| <Lennard> No they should not according to the GHOP meeting</Lennard> | |
| * Should mentor be allowed to edit any task or just the tasks he created. | |
| <Pawel>I would go with any task, but we need creation and last modification date properties and also created_by and modified_by properties too</Pawel> | |
| <Lennard> Any according to LH </Lennard> | |
| * Should mentors be allowed to delete any task, tasks created by himself, tasks created by him but not yet approved? | |
| <Pawel>Tasks created by himself (that are not claimed yet) and tasks created by him but not yet approved</Pawel> | |
| <Lennard>Yes that's correct, LH confirms, it's more logical that way</Lennard> | |
| * Lennie suggested that for viewing individual task description, we will have a common URL to all the roles, i.e students/mentors/OA and then display the forms with specific actions they want to do and the edit page allows to edit the contents of the task. However my initial thought was to have a common Individual Task Description/Edit View for Mentors/OA where they can either edit the contents of the task as well perform actions like changing states, adding deadlines and relevant things and have a different URL for students to view the task description, request to claim it and upload the work after the work is complete. This is an open question. If you have something else other than these 2 please add them. | |
| <Pawel>Common url is fine with me the content of the page will change based on user Role so either way is fine.</Pawel> | |
| * Should we allow deadline extension before student submitted his work? (i.e when the task is in progress) | |
| <Pawel>Nope, we don't want anybody to abuse the system that way</Pawel> | |
| <Lennard> Indeed NO, contest rules forbid this </Lennard> |