CSC/ECE 517 Fall 2017/E1746 Fix account creation over web to work reasonably

From Expertiza_Wiki
Jump to navigation Jump to search

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

Improve the 'new user request image'

After clicking “REQUEST ACCOUNT” button, Expertiza will redirect to a page to allow submitting new user request. We need to improve the page:

  • The new user should be able to add a new institution. Modifying the current view to allow new user to add a new institution if s/he cannot find it from dropdown.
  • The new institution should be able to saved into institutions table as a new record. And the newly created request will be stored in requested_users table and make sure to save correct institution_id.
  • The new user should be able write a brief introduction (a textarea). The data should also be saved to requested_users table. Write a migration file to add a new column (type: text) to requested_users table.
  • In models/requested_user.rb, there are some validations, such as validate email address.There should be flash messages when the validation fails.

Approve or decline new user requests.

Super-admin and admin are able to approve or decline new user requests.And there are some issues about the page and functions which are needed to be improved.

  • There should be an option added in “Administration > Show…” menu to access a list of pending requests. Right now the super_admin or admin can only access it by using the corresponding url.
  • 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 super-admin or admin approves the request, the record should not disappear on the page. And there should be an email send to email address offered by requester.

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

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