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

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
Line 78: Line 78:


[[File:Export User Interface for Assignment Participants and Course Participants.JPG]]
[[File:Export User Interface for Assignment Participants and Course Participants.JPG]]
Export methods added to participants.rb
[[File:export1.png]]
[[File:export2.png]]


== References ==
== References ==
<references/>
<references/>

Revision as of 03:47, 30 October 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

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. <ref> </ref> 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.<ref> </ref> 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

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

As there are many users in the interface, adding several things (for each user) individually and manually will be cumbersome and time consuming. Hence another method is to import things from a file.

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.

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) <ref> </ref>
  • 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 UI 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)


Expected functionality (with the issues identified)

  • Users have the choice of the password for their account, including the choice of no password. Thus, while importing a list of users via a CSV text file into Expertiza, the online interface should be able to accept a blank password for any user.
  • 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.
  • UI for importing (all types) of files should be as similar as possible.

Dealing with Issue 153

Files changed

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

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.


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.


Export methods added to participants.rb

File:Export1.png File:Export2.png

References

<references/>