CSC/ECE 517 Fall 2017/E1767 Improve imports: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 49: Line 49:
* Students (or instructors) should have the option of adding members (who do not have a team yet) to incomplete teams.
* Students (or instructors) should have the option of adding members (who do not have a team yet) to incomplete teams.
* User Interface for importing (all types) of files should be as similar as possible.
* User Interface for importing (all types) of files should be as similar as possible.
= Resolving Issues
= Resolving Issues =
== Dealing with Issue 153 ==
== Dealing with Issue 153 ==
=== Files changed ===
=== Files changed ===

Revision as of 23:02, 2 November 2017

This page deals with issues picked up the project E1767 and the solutions developed. It is based on Expertiza, an open source project.

Introduction

A Note on Expertiza

Expertiza is an open source project created using Ruby on Rails. This project is an software primarily to create reusable learning objects through peer review and also supports team projects. Expertiza allows the creation of instructors and student accounts. This allows the instructors to post assignments (student learning objects) which can be viewed and worked upon by students. These can also be peer reviewed by students later. The Expertiza project is supported by the National Science Foundation. It supports many types of documents, including articles, code, web sites, URLs and wiki pages.

Motivation of this Project

Being an open source project, Expertiza is constantly improved. In particular, bugs are often found and resolved. Also new features are often added. The aim of this work is to rectify bugs around the import feature.

Background of this project

Expertiza being an online software to learn via peer reviews and team projects. Hence it has several types of users: instructors, students. The instructors are "administrative" in nature, they have many roles. Typically a course has 2 or 3 instructors and many students. This project is related to the import feature, which enables the instructor to do an adminstrative task for many students at once, like assigning a project.

As there are many students in the course database, adding several things (for each user) individually and manually will be cumbersome and time consuming. Hence another method involving importing things from a file has been developed. Several things, like all students from a class, or all teams for a particular project, or even all possible topics for students for a particular assignment/project can be imported from a file. The reason for doing this is that some lists, like the teams students have formed, may not be available online but rather on a sheet of paper the students have filled offline. In addition, a bug on passwords when importing users (like students) will also be looked into.

Project Requirements

Existing Project Functionality

In Expertiza, various kinds of data may be imported from .csv files, including users, participants in an assignment, topics, and teams. In particular, the file must be a text file and have the data separated by commas.

Problem Statement

  • If no password is present in the password column in the CSV file for an user (while importing a list of users), Expertiza returns an error “each record in the file you are importing does not have enough records”. (Issue 183)
  • There should be an option of importing teams (for a particular project/assignment) from an CSV file. (Issue 153)
  • While importing teams, if one (existing) team has the same name as a team being imported, there should be an option of renaming the existing team (Issue 329)
  • There should be the functionality of adding (new) users into an existing assignment team (which may have been formed by one student or an instructor) which does not have maximum strength (Issue 328)
  • There seem to be bugs while importing several (different) files
    • The User Interface for importing different (but related) things like course participant and assignment participant should be similar
    • If one extra column is present in an imported CSV text file, an appropriate message should appear (Issue 52)
  • If the file being imported does not have the required fields, the system prints "The import process expects the following columns:". However the required column names are not given (Issue 719)
  • Currently the system does not have the feature of exporting review mappings

Setting Up The Working Environment

Working on this project requires us to set up an Expertiza environment. There are several options, such as setting up on Linux, or on a virtual environment or some more.

The one which is recommended and we adopted is:-
Install an image of Ubuntu having Expertiza set up on Virtual Box ( Ubuntu-Expertiza image (.OVA) )

This is the link for the image. (https://drive.google.com/a/ncsu.edu/file/d/0B2vDvVjH76uEUmNKVncxRUhUVVE/view?usp=sharing)
And you can install VirtualBox (free) and import this image into VirtualBox.

Some machines/operating systems may require you to enable virtualization <br. After this, run the following commands.

cd expertiza 
bash ./setup.sh 
bundle install 
rake db:migrate 
  • For logging in as an instructor:-
Username: instructor6
Password: password

Understanding the Current Implementation

After studying the problem statement, we tested the existing Expertiza environment after careful examination it was determined that the following tasks were already implemented:

  • Issue 719 : If topics are imported without correct data fields , the import page gives this message: “The import process expects the following columns:” but it doesn’t say what the columns are (topic number, topic name, category, number of slots, category)
  • Issue dealing with blank final fields in data file, including Issue 183: It should be possible to leave off the final fields in a line of a CSV file. These fields are often not specified anyway. For example, if a password isn’t specified when a new user is created, the system generates a password (see Issue 183). When importing topics, topic categories are rarely specified. But if the final field is blank, the import requires the CSV line to end with “, “ (comma and space). This should be fixed for all imports.

Expected functionality (with the issues identified)

With the remaining issues, we bring the expected behaviour of the system after the features have been implemented:

  • Some issues have missing features, thus after completion these features should be available within the appropriate views
  • The option of importing teams by a text CSV file should be flexible, that is, while importing teams it is not necessary to have the topic assigned to the team (can be assigned later). However the option should be able to import the topic name (if it has already been assigned).
  • No two teams should have the same name. This means if a new team (being imported into the database) and an existing have the same name, there should be an option of changing the name of either one of the two teams.
  • Students (or instructors) should have the option of adding members (who do not have a team yet) to incomplete teams.
  • User Interface for importing (all types) of files should be as similar as possible.

Resolving Issues

Dealing with Issue 153

Files changed

Import_file_controller.rb , models/sign_up_sheet.rb , views/sign_up_sheet/_add_topics.html.erb

Approach Used

Currently there is no way to import teams for a particular project or assignment from a file. However we note that an option for importing teams for a particular course is available. Hence we extend the behaviour of this feature to implement this solution.

Original Functionality

Currently, we cannot import teams from a file. Teams have to be created individually, (by the instructor or a student)

Solution

The solution dealt with adding the feature. This involved adding a method in the model which is showed in the following code fragment:


The other changes are to add the method to an appropriate place in the views and the controller.

Dealing with Issue 329

Files changed

models/team.rb , views/import_file/_start.html.erb

Original Functionality

While importing teams from a file, if a new team name is an exact match with an existing team, then the options for managing the conflict is either ignore (and not add) the new team, or to add the new team with a new name or to delete the old team and to add the new team in it's place.

Solution

The solution dealt with adding the feature. This involved adding a method in the model which is showed in the following code fragment:

Also, the new option must be reflected in the appropriate view:


The other changes are to add the method to an appropriate place in the views and the controller.


Import User Interface Fix

Solution

When importing assignment participants and course participants, the User Interface indicates that there are multiple fields expected. However, in fact, user can only import file with 1 column which is user names. We can expect that the imported users are already in the system (otherwise, there should be an error message). Fixing the User Interface and also the code of importation accordingly.


Export Enhancement (Issue 1079)

Files changed

app/models/assignment_participant.rb, app/models/course_participant.rb, app/models/participant.rb, app/views/export_file/start.html.erb

Original Functionality

Exporting Course Participants and Assignment Participants neither share the same User Interface nor the same code. Assignment Participants used the common User Interface designed for export functionality. Due to this, the export feature of Assignment Participants return blank file.

Solution

Course Participants and Assignment Participants have same User Interface for Export feature as shown in the below image. Course Participants and Assignment Participants are derived from base class named Participants, the export feature can be generalized for both of them by moving it to Participants, which removed redundancy from the code base.

https://github.com/expertiza/expertiza/issues/1079


Export methods added to participants.rb



Export Review Mapping Functionality

Files changed

app/views/export_file/_reviewer_mapping.html.erb, app/views/export_file/start.html.erb

Original Functionality

We have the feature to import review mappings, but we do not have the feature to export the review mappings. Review Mapping used the common User Interface designed for export functionality. Due to this, the export feature wasn't working fine.

Solution

Created a partial render for Review Response Map. Add the feature of exporting review mapping and making sure it exports in the same format as importations.

https://github.com/expertiza/expertiza/issues/1081


Team Contact

MEMBERS
Arjun Sharma: asharm33@ncsu.edu
Bikram Singh: bsingh8@ncsu.edu
MENTOR
Yifan Guo: yguo14@ncsu.edu


References

1) Expertiza Documentation

2) Experitza on Github

3) Pull Request 1

4) Pull Request 2