Teammates: Rubric questions: Add front-end validation for choices

Created on 14 May 2018  路  7Comments  路  Source: TEAMMATES/teammates

Environment:
master branch

Steps to reproduce:

  • Login as Instructor
  • Edit an existing session or create a new one
  • Add a new Rubric question
  • click on add column
  • Do not enter the choice and descriptions
  • click save

Expected behaviour: Like Subquestion has front-end validation, the choices should have front-end validataion too, and an instructor should not be allowed to enter an empty choice column, as an empty choice does not make sense.

Actual behaviour: The instructor is allowed to add a empty choice column.
screenshot 492

a-UIX help wanted p.Low

Most helpful comment

I am wondering what was the reason for allowing Rubric choices to be empty? as I now see it was intentional.

hmm... I suppose some cells can be left empty. For example, if the column heading has a value, it is fine for cells below it to be empty as the meaning of the cell is implied by the column heading. e.g.,

  | Bad | Good | Very Good
---|---- | ---- | ----
attitude | o | o | o

If the cell contains an explanation, column header can be left empty.

  |   |   |  
---|---- | ---- | ----
attitude | o lousy | o ok| o positive

But if both are left empty, then it is not possible to deduce the meaning of a cell. e.g.,

  |   |   |  
---|---- | ---- | ----
attitude | o | o | o

We can consider this a case of 'not worth handling because if a user is silly enough to create this scenario, let s/he suffer the consequences'

All 7 comments

Hi @sukanta-27

Will you be working on this issue?

@tanhengyeow Currently my final exams are going on. So, if you want you can take it. :+1:

@tanhengyeow Have you started working on it yet?

@sukanta-27 Not at the moment, if you already found a fix you can submit a PR first 馃槃

@damithc

https://github.com/TEAMMATES/teammates/blob/4416b4db657cdf6993fd298d51cc7e3a7d630c66/src/main/java/teammates/common/datatransfer/questions/FeedbackRubricQuestionDetails.java#L973-L981

This code was commented out in #2815 (specifically in https://github.com/TEAMMATES/teammates/commit/5d6aabb0e0f1366974cddcbe6689f2cb643f23a6), this is the main reason for this issue coming up. I am wondering what was the reason for allowing Rubric choices to be empty? as I now see it was intentional.

I am wondering what was the reason for allowing Rubric choices to be empty? as I now see it was intentional.

hmm... I suppose some cells can be left empty. For example, if the column heading has a value, it is fine for cells below it to be empty as the meaning of the cell is implied by the column heading. e.g.,

  | Bad | Good | Very Good
---|---- | ---- | ----
attitude | o | o | o

If the cell contains an explanation, column header can be left empty.

  |   |   |  
---|---- | ---- | ----
attitude | o lousy | o ok| o positive

But if both are left empty, then it is not possible to deduce the meaning of a cell. e.g.,

  |   |   |  
---|---- | ---- | ----
attitude | o | o | o

We can consider this a case of 'not worth handling because if a user is silly enough to create this scenario, let s/he suffer the consequences'

Closing this issue as this is not a bug.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whipermr5 picture whipermr5  路  3Comments

Derek-Hardy picture Derek-Hardy  路  3Comments

LiHaoTan picture LiHaoTan  路  4Comments

wkurniawan07 picture wkurniawan07  路  4Comments

sujeet14108 picture sujeet14108  路  4Comments