Gradebook 2 import shows request failed: item already exists when importing a scantron file to replace old data

Description

Gradebook 2 import shows request failed: item already exists when importing a scantron file to replace old data

Used exb 10 scantron data to reproduce this on gbrk 1.1.x-dev

Activity

Show:

Sandra Stewart July 6, 2010 at 11:36 AM

duplicate of grbk-407.

David Woods July 1, 2010 at 4:45 PM

see for verification discussion.

I'm not sure if it answers the question posed, but the testing shows that current production and test26 code don't allow the import of data (new or overlay) from a scantron format file to a previously existing category/item in the gradebook.

Thomas Amsler June 29, 2010 at 2:28 PM

QA can you please verify this bug

Michael Wenk November 6, 2009 at 6:22 PM
Edited

Found the problem and it relates to the name change code that happens pretty early in the import proces.

What happens is the later code cannot locate the changed name in the gradebook, so it assumes its a new item. However, this assumption is bad and causes the BRE exception even later in the process.

My initial thought to fix was detect that we have a changed name, and if we do on the actual import update(near the end of the process) check the name to see if its the original, and if it is, update, if not, create.

However in looking into that, it brought up the question of an item of the same name in multiple categories. IE:

Category 1
-> Item 1
Category 2
-> Item 1

The code in findModelByName looks like it will pick the last one it sees. So if we have a scantron item, which one do we pick? Do we use the existing method and pick the last one it sees or do we make a new method? What I think should happen is it checks all categories, and then if it has any ambiguity on category, it reports to the user, and has the user decide.

Fixed

Details

Assignee

Reporter

QA Status

FAIL

Components

Fix versions

Affects versions

Priority

Created November 5, 2009 at 3:10 PM
Updated August 10, 2010 at 9:30 AM
Resolved June 29, 2010 at 2:28 PM