Teammates: Instructor: enroll students: blank lines processed by back-end during enrollment

Created on 22 Aug 2018  路  5Comments  路  Source: TEAMMATES/teammates

Environment:
master branch

Steps to reproduce

  1. Copy rows of student entries from external sources e.g. Microsoft Excel. Sample data shown below:

image

  1. Paste the content into the New Students spreadsheet using Ctrl + V or Cmd + V:

image

  1. Click the Enroll students button.

Expected behaviour

  1. Success enrollment. Example shown below:

image

Actual behaviour

  1. Blank lines processed by back-end during enrollment:

image

Additional info

  1. This is due to potential line feeds/carriage returns during the process of copying data from external sources.
  2. This causes the backend method getRequestParamValue to read in the line feeds/carriage returns, resulting in student entries to be read separated rows. Example shown below:

image

c.Bug p.Critical

Most helpful comment

Thanks for the quick fix and quick release @tanhengyeow @xpdavid

All 5 comments

On a somewhat related note, aren't we supposed to ignore blank lines anyway?

@damithc

Yes, the front-end now currently does this:

  1. Filter empty rows first
  2. Send the non-empty lines to the backend

However, in this case, there were unexpected line feeds/carriage returns due to copying from other sources, resulting in a new "empty line" to be formed. The unexpected empty lines weren't filtered at this point.

This resulted in the back-end returning the error messages shown in the description after checking the relevant enroll line. The hotfix I'm submitting now takes care of all the line feeds and carriage returns.

@damithc Done. Released as V6.10.1.

I've deployed v6.10.1

Thanks for the quick fix and quick release @tanhengyeow @xpdavid

Was this page helpful?
0 / 5 - 0 ratings