Switch to unified view

a/OSSEval/analysis/models.py b/OSSEval/analysis/models.py
...
...
525
        self.comment = xmlMinidom.getStringAttribute(xmldoc, 'Comment')
525
        self.comment = xmlMinidom.getStringAttribute(xmldoc, 'Comment')
526
        self.created = xmlMinidom.getStringAttribute(xmldoc, 'Created')
526
        self.created = xmlMinidom.getStringAttribute(xmldoc, 'Created')
527
        self.methodology_version = MethodologyVersion.objects.get(pk=xmlMinidom.getNaturalAttribute(xmldoc, 'MethodologyVersionId'))
527
        self.methodology_version = MethodologyVersion.objects.get(pk=xmlMinidom.getNaturalAttribute(xmldoc, 'MethodologyVersionId'))
528
        self.user_login = xmlMinidom.getStringAttribute(xmldoc, 'UserLogin')
528
        self.user_login = xmlMinidom.getStringAttribute(xmldoc, 'UserLogin')
529
        self.visible = xmlMinidom.getStringAttribute(xmldoc, 'Visible')
529
        self.visible = xmlMinidom.getStringAttribute(xmldoc, 'Visible')
530
        self.protected = xmlMinidom.getStringAttribute(xmldoc, 'Protected')
531
        #self.weight_scenario
530
        #self.weight_scenario
532
        xml_weight_scenario = xmldoc.getElementsByTagName('WeightScenario')[0]
531
        xml_weight_scenario = xmldoc.getElementsByTagName('WeightScenario')[0]
533
        ws = WeightScenario()
532
        ws = WeightScenario()
534
        # while we import an analysis we shall not insert new weight scenarios
533
        # while we import an analysis we shall not insert new weight scenarios
535
        # weight scenarios should be just a reference to and existing one imported 
534
        # weight scenarios should be just a reference to and existing one imported 
...
...
550
        str_xml += "<Instances>"
549
        str_xml += "<Instances>"
551
        for instance in self.instance_set.all():
550
        for instance in self.instance_set.all():
552
            str_xml += instance.to_xml()
551
            str_xml += instance.to_xml()
553
        str_xml += "</Instances>"
552
        str_xml += "</Instances>"
554
             
553
             
555
        return '<Analysis Id="' + str(self.id) + '" MethodologyVersionId="' + str(self.methodology_version.id) + '" Name="' + self.name + '"  Created="' + str(self.created) + '" Visible="' + str(self.visible) + '" Protected="' + str(self.protected) + '" UserLogin="' + self.user_login + '">' + str_xml + "</Analysis>"
554
        return '<Analysis Id="' + str(self.id) + '" MethodologyVersionId="' + str(self.methodology_version.id) + '" Name="' + self.name + '"  Created="' + str(self.created) + '" Visible="' + str(self.visible) + '" UserLogin="' + self.user_login + '">' + str_xml + "</Analysis>"
556
    
555
    
557
class Instance(models.Model):
556
class Instance(models.Model):
558
    """
557
    """
559
    It represents one of the entities we evaluate in the assessment
558
    It represents one of the entities we evaluate in the assessment
560
    """
559
    """