CSC/ECE 517 Fall 2017/E17A6 Fix account creation over web to work reasonably: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 33: Line 33:
=='''Use Cases'''==
=='''Use Cases'''==
[[File:17a63.jpg]]
[[File:17a63.jpg]]
[[File:17a64.JPG]]
*1Name: Instructor or Teaching Assistant request a new account
*Actor: Instructor or Teaching Assistant
*Other Participants: None
*Precondition: None
*Primary Sequence:
::1.Click on “Request account”.
::2.Select a role.
::3.Fill in a user name.
::4.Fill in a full name.
::5.Fill in an email address.
::6.Select an institution, if the institution not in the list, skip to the alternative flow.
::7.Fill in the introduction field.
::8.Click on “Request”.
*Alternative Flow:
::1.If the institution not in the list, click on “Others”.
::2.Fill in the institution name.


=='''Design Pattern'''==
=='''Design Pattern'''==

Revision as of 22:20, 5 November 2017

Introduction to Expertiza

Expertiza[1] is a project developed using Ruby on Rails[2]. It provides features like peer review, team assignments and submission of projects. This can be achieved by submitting code base, URL of hosted code on remote server and Wiki submissions. It is an open source application and the code can be cloned from GitHub[3]. This application provides an efficient way to manage assignments, grades and reviews. This makes the process easier and faster when the class strength is large.

Introduction

Purpose

Expertiza provide the function for user to request an account, but the function is not perfect. The goal of our project is to improve this feature. It will enable Expertiza to handle the pending request for super-admin and add institution for user.

Problem Definition

New user request page

  • Currently, a new user can only choose institution from the dropdown. The new user should be able to add a new institution.
  • A place where a new user to write a brief introduction is needed in this page.
  • Also, in models/requested_user.rb, there are some validations, such as validate email address. It will be better to update the flash message on the view when validation fails.

Super-admin and admin are able to approve or decline new user requests.

  • Currently, you have to go to /users/list_pending_requested this url to access a list of pending requests. It will be better to add an option in “Administration > Show…” menu
  • Make “Email Address” column in /users/list_pending_requested page clickable. So that super-admin or admin could converse with requesters by clicking email addresses directly.

After approving

  • After super-admin or admin approves the request, make sure the record does not disappear on the page. And there should be an email send to email address offered by requester.

Requirements

  • Modify the test of request new user method.
  • Add a new option for the drop-down bar of institution in the new user request page.
  • Add a new textarea in the new user request page, to input a new institution and introduction.
  • Add validation for new institution new institutions and introductions.
  • Add flash message for requested_user.rb.
  • Add a new button on the layout.
  • Modify the layout of /users/list_pending_requested page.
  • Enable the system will send an email after the request is processed.

Database Design

  • The above tables is the original table for this project, however it lacks a column for introduction. So we need to add a new column for request_user table. The new table will be shown below.

Use Cases

  • 1Name: Instructor or Teaching Assistant request a new account
  • Actor: Instructor or Teaching Assistant
  • Other Participants: None
  • Precondition: None
  • Primary Sequence:
1.Click on “Request account”.
2.Select a role.
3.Fill in a user name.
4.Fill in a full name.
5.Fill in an email address.
6.Select an institution, if the institution not in the list, skip to the alternative flow.
7.Fill in the introduction field.
8.Click on “Request”.
  • Alternative Flow:
1.If the institution not in the list, click on “Others”.
2.Fill in the institution name.

Design Pattern

MVC

The project is implemented in Ruby on Rails that uses MVC architecture. It separates an application’s data model, user interface, and control logic into three distinct components (model, view and controller, respectively).

TDD

In this project, we follow the Test-driven development (TDD) software development process, which means that we would first write a test that fails before you write new functional code.

DIY

We are trying to reuse the existing functionalities in Expertiza, thus avoiding code duplication. Whenever possible, code modification based on the existing classes, controllers, or tables will be done instead of creating the new one.

Mockup Screen