mitodl / edx-sga

Staff Graded Assignment XBlock for the edX platform
GNU Affero General Public License v3.0
34 stars 108 forks source link

an empty weight setting appears to export as "None" and then a subsequent import will not work #83

Open pdpinch opened 9 years ago

pdpinch commented 9 years ago

This needs further investigation.

In production, we saw an SGA block created in Studio with no weight set. On export, that manifested as weight="none" in the OLX XML.

On a subsequent import, this broke the progress bar because the weighted grade could not be calculated.

I think the error is in the grade calculation, or possibly the import. I believe the export did the common practice of casting an undefined value as none in OLX XML.

pdpinch commented 9 years ago

@carsongee do you have anything more to add here (or correct in my description)?

carsongee commented 9 years ago

I don't really know what is expected or right. I thought typically when exported unset values just weren't added to the XML at all.

pdpinch commented 9 years ago

Testing today, with the cypress release, the exported SGA with no weight comes out with an attribute of weight="null" Doing the same with other problem types omits the weight attribute altogether.

Importing the SGA into a new course causes studio to throw an error when editing SGA settings.

More investigation is needed.