Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6303)

Issue 71530043: Issue 1518: InstructorCourseEnroll: ignore empty columns

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 8 months ago by Oo Theong Siang
Modified:
10 years, 8 months ago
Reviewers:
damith
Visibility:
Public.

Description

Issue 1518: InstructorCourseEnroll: ignore empty columns

Patch Set 1 #

Total comments: 12

Patch Set 2 : Issue 1518: InstructorCourseEnroll: ignore empty columns #

Patch Set 3 : Issue 1518: InstructorCourseEnroll: ignore empty columns #

Unified diffs Side-by-side diffs Delta from patch set Stats (+426 lines, -305 lines) Patch
M src/main/java/teammates/common/datatransfer/StudentAttributes.java View 3 chunks +7 lines, -54 lines 0 comments Download
A src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java View 1 2 1 chunk +144 lines, -0 lines 0 comments Download
M src/main/java/teammates/logic/core/StudentsLogic.java View 7 chunks +18 lines, -52 lines 0 comments Download
A src/test/java/teammates/test/cases/common/StudentAttributesFactoryTest.java View 1 1 chunk +188 lines, -0 lines 0 comments Download
M src/test/java/teammates/test/cases/common/StudentAttributesTest.java View 1 6 chunks +13 lines, -106 lines 0 comments Download
M src/test/java/teammates/test/cases/common/StudentResultBundleTest.java View 3 chunks +3 lines, -3 lines 0 comments Download
M src/test/java/teammates/test/cases/common/TeamResultBundleTest.java View 1 chunk +3 lines, -3 lines 0 comments Download
M src/test/java/teammates/test/cases/logic/EvaluationsLogicTest.java View 1 chunk +3 lines, -3 lines 0 comments Download
M src/test/java/teammates/test/cases/logic/LogicTest.java View 5 chunks +11 lines, -9 lines 0 comments Download
M src/test/java/teammates/test/cases/logic/StudentsLogicTest.java View 10 chunks +22 lines, -62 lines 0 comments Download
M src/test/java/teammates/test/cases/testdriver/BackDoorTest.java View 2 chunks +3 lines, -3 lines 0 comments Download
M src/test/java/teammates/test/cases/ui/InstructorCourseEnrollSaveActionTest.java View 3 chunks +3 lines, -2 lines 0 comments Download
M src/test/java/teammates/test/cases/ui/browsertests/InstructorCourseEnrollPageUiTest.java View 3 chunks +6 lines, -6 lines 0 comments Download
M src/test/java/teammates/test/cases/ui/browsertests/StudentEvalEditSubmissionPageUiTest.java View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 2
damith
https://codereview.appspot.com/71530043/diff/1/src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java File src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java (right): https://codereview.appspot.com/71530043/diff/1/src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java#newcode8 src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java:8: public class StudentAttributesFactory { Write a header comment for ...
10 years, 8 months ago (2014-03-05 15:22:53 UTC) #1
Oo Theong Siang
10 years, 8 months ago (2014-03-05 17:07:34 UTC) #2
https://codereview.appspot.com/71530043/diff/1/src/main/java/teammates/common...
File src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java
(right):

https://codereview.appspot.com/71530043/diff/1/src/main/java/teammates/common...
src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java:8:
public class StudentAttributesFactory {
On 2014/03/05 15:22:54, damith wrote:
> Write a header comment for the class

Done.

https://codereview.appspot.com/71530043/diff/1/src/main/java/teammates/common...
src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java:89:
//Here we assume that the enrollLine must have the same numbers of columns as
the header row
On 2014/03/05 15:22:54, damith wrote:
> Assert the assumption?

Just realized that the assumption shouldn't be there. In the case of manual
enrollment and no header row, some rows might have comment column and some might
not have it. Moreover, the preceding if-statement already checks for case where
the required columns are not enough.

https://codereview.appspot.com/71530043/diff/1/src/main/java/teammates/common...
src/main/java/teammates/common/datatransfer/StudentAttributesFactory.java:104:
private int locateColumnIndex(String headerRow) {
On 2014/03/05 15:22:54, damith wrote:
> This name doesn't fit the purpose. ...Indexes?

Done.

https://codereview.appspot.com/71530043/diff/1/src/test/java/teammates/test/c...
File src/test/java/teammates/test/cases/common/StudentAttributesFactoryTest.java
(right):

https://codereview.appspot.com/71530043/diff/1/src/test/java/teammates/test/c...
src/test/java/teammates/test/cases/common/StudentAttributesFactoryTest.java:77:
saf = new StudentAttributesFactory("team|name|email|comment");
On 2014/03/05 15:22:54, damith wrote:
> Use different valid values e.g. Team, TEAMS etc. 
> That is better than repeating the same valid value.

Done.

https://codereview.appspot.com/71530043/diff/1/src/test/java/teammates/test/c...
src/test/java/teammates/test/cases/common/StudentAttributesFactoryTest.java:172:
//		int retVal = (Integer) privateMethod.invoke(new StudentAttributesFactory(),
line);
On 2014/03/05 15:22:54, damith wrote:
> Why commented lines?

My mistakes for not removing them, which are used for double checking purpose.

https://codereview.appspot.com/71530043/diff/1/src/test/java/teammates/test/c...
File src/test/java/teammates/test/cases/common/StudentAttributesTest.java
(right):

https://codereview.appspot.com/71530043/diff/1/src/test/java/teammates/test/c...
src/test/java/teammates/test/cases/common/StudentAttributesTest.java:50:
assertFalse(invalidStudent.isValid());
On 2014/03/05 15:22:54, damith wrote:
> This course ID doesn't have a space, although it says "Course Id with space"

Actually "Course Id with space" itself is the course id. :-P
The courseId argument is passed in as the last argument of the constructor.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b