Closed jc0n closed 12 years ago
What is the best way to handle the exam XML files? I assume we will need to include an attribute for organization_id in the XML file? The only alternative that I can think of is passing in the organization_id when we call create_from_xml
or the like.
In general, when importing data via CSV or XML, we try to define foreign relationships based on something human-readable whenever possible. I think it would be fine to specify an "organization" attribute of the exam node which is the name of an org.
It would be a good idea to document that somewhere, although I'm not sure where is best. We definitely want to update the schema definition, and also perhaps the docblock for exam_manager.create_from_xml
.
In general, when importing data via CSV or XML, we try to define foreign relationships based on something human-readable whenever possible. I think it would be fine to specify an "organization" attribute of the exam node which is the name of an org.
Sounds good to me.
Will this pose a problem for organizations that have a parent? It looks like it may since the name
attribute alone is not unique.
Ugh, good question. We already made an assumption in pr_services.import_manager.import_users
that an org name is unique. While it seems like a nice idea for more than one organization to have the same name, I don't see it being used in practice any time soon. I think this is a case where we should keep it simple and do a great job of meeting our current use cases, so I suggest removing that "unique_together" constraint and making an org name unique by itself.
In summary, from our discussion over email:
From: @mhrivnak
We will also want to verify that the task creator only specifies an organization to which he belongs and has sufficient privileges to create the Task.