Pass through to provider AssessmentOfferedLookupSession.use_comparative_assessment_offered_view
160054
def use_comparative_assessment_offered_view(self):
        """"""
        self._object_views['assessment_offered'] = COMPARATIVE
        # self._get_provider_session('assessment_offered_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_assessment_offered_view()
            except AttributeError:
                pass
1164931
def use_comparative_grade_entry_view(self):
        """"""
        self._object_views['grade_entry'] = COMPARATIVE
        # self._get_provider_session('grade_entry_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_grade_entry_view()
            except AttributeError:
                pass
1183543
def use_comparative_book_view(self):
        """"""
        self._book_view = COMPARATIVE
        # self._get_provider_session('comment_book_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_book_view()
            except AttributeError:
                pass
235549
def use_comparative_sequence_rule_enabler_rule_view(self):
        """"""
        self._object_views['sequence_rule_enabler_rule'] = COMPARATIVE
        # self._get_provider_session('sequence_rule_enabler_rule_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_sequence_rule_enabler_rule_view()
            except AttributeError:
                pass
925703
def use_comparative_asseessment_part_item_view(self):
        """"""
        self._object_views['asseessment_part_item'] = COMPARATIVE
        # self._get_provider_session('assessment_part_item_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_asseessment_part_item_view()
            except AttributeError:
                pass
58276
def get_assessment_taken_id(self):
        
        # Implemented from template for osid.learning.Activity.get_objective_id
        if not bool(self._my_map['assessmentTakenId']):
            raise errors.IllegalState('assessment_taken empty')
        return Id(self._my_map['assessmentTakenId'])
815767
def use_comparative_authorization_view(self):
        """"""
        self._object_views['authorization'] = COMPARATIVE
        # self._get_provider_session('authorization_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_authorization_view()
            except AttributeError:
                pass
1358193
def use_comparative_asset_composition_view(self):
        """"""
        self._object_views['asset_composition'] = COMPARATIVE
        # self._get_provider_session('asset_composition_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_asset_composition_view()
            except AttributeError:
                pass
517019
def _process_mrk_summary_view(self, limit):
        
        if self.test_mode:
            graph = self.testgraph
        else:
            graph = self.graph
        model = Model(graph)
        LOG.info("getting markers and equivalent ids from mrk_summary_view")
        line_counter = 0
        raw = '/'.join((self.rawdir, 'mrk_summary_view'))
        with open(raw, 'r') as fh:
            fh.readline()  # read the header row; skip
            for line in fh:
                line = line.rstrip("\n")
                line_counter += 1

                (accid, logicaldb_key, object_key, preferred,
                 mgiid, subtype, short_description) = line.split('\t')

                if self.test_mode is True:
                    if int(object_key) not in self.test_keys.get('marker'):
                        continue

                if preferred == '1':

                    if self.idhash['marker'].get(object_key) is None:
                        # can't find the marker in the hash; add it here:
                        self.idhash['marker'][object_key] = mgiid
                        LOG.error(
                            "this marker hasn't been seen before %s %s",
                            mgiid, short_description)

                    if accid == mgiid:
                        # don't need to make equivalences to itself
                        continue

                    mapped_id = None
                    if logicaldb_key == '60':
                        mapped_id = 'ENSEMBL:' + accid
                    elif logicaldb_key == '1':
                        # don't need to add the equivalence to itself.
                        continue
                    elif logicaldb_key == '55':
                        mapped_id = 'NCBIGene:' + accid

                    if mapped_id is not None:
                        if mgiid in self.markers['classes'] \
                                or subtype in ['Gene', 'Pseudogene']:
                            model.addClassToGraph(mapped_id, None)
                            model.addEquivalentClass(mgiid, mapped_id)
                        elif mgiid in self.markers['indiv']:
                            model.addIndividualToGraph(mapped_id, None)
                            model.addSameIndividual(mgiid, mapped_id)

                    # could parse the "subtype" string
                    # to get the kind of thing the marker is

                if not self.test_mode and limit is not None and line_counter > limit:
                    break

        return
851597
def use_plenary_grade_system_view(self):
        """"""
        self._object_views['grade_system'] = PLENARY
        # self._get_provider_session('grade_system_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_grade_system_view()
            except AttributeError:
                pass
784395
def get_assessment_taken(self):
        
        # Implemented from template for osid.learning.Activity.get_objective
        if not bool(self._my_map['assessmentTakenId']):
            raise errors.IllegalState('assessment_taken empty')
        mgr = self._get_provider_manager('ASSESSMENT')
        if not mgr.supports_assessment_taken_lookup():
            raise errors.OperationFailed('Assessment does not support AssessmentTaken lookup')
        lookup_session = mgr.get_assessment_taken_lookup_session(proxy=getattr(self, "_proxy", None))
        lookup_session.use_federated_bank_view()
        return lookup_session.get_assessment_taken(self.get_assessment_taken_id())
1171811
def _get_assessment_part_lookup_session(self):
        """"""
        section = getattr(self, '_assessment_section', None)
        session = get_assessment_part_lookup_session(self._runtime,
                                                     self._proxy,
                                                     section)
        session.use_unsequestered_assessment_part_view()
        session.use_federated_bank_view()
        return session
326076
def use_plenary_grade_entry_view(self):
        """"""
        self._object_views['grade_entry'] = PLENARY
        # self._get_provider_session('grade_entry_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_grade_entry_view()
            except AttributeError:
                pass
1225238
def use_comparative_asset_view(self):
        """"""
        self._object_views['asset'] = COMPARATIVE
        # self._get_provider_session('asset_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_comparative_asset_view()
            except AttributeError:
                pass
578044
def compare(self, a, b, zone):
        '''
        
        '''
        self.log.info('compare: a=%s, b=%s, zone=%s', a, b, zone)

        try:
            a = [self.providers[source] for source in a]
            b = [self.providers[source] for source in b]
        except KeyError as e:
            raise Exception('Unknown source: {}'.format(e.args[0]))

        sub_zones = self.configured_sub_zones(zone)
        za = Zone(zone, sub_zones)
        for source in a:
            source.populate(za)

        zb = Zone(zone, sub_zones)
        for source in b:
            source.populate(zb)

        return zb.changes(za, _AggregateTarget(a + b))
865710
def save_assessment_offered(self, assessment_offered_form, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.update_resource
        if assessment_offered_form.is_for_update():
            return self.update_assessment_offered(assessment_offered_form, *args, **kwargs)
        else:
            return self.create_assessment_offered(assessment_offered_form, *args, **kwargs)
793835
def use_plenary_assessment_taken_view(self):
        """"""
        self._object_views['assessment_taken'] = PLENARY
        # self._get_provider_session('assessment_taken_lookup_session') # To make sure the session is tracked
        for session in self._get_provider_sessions():
            try:
                session.use_plenary_assessment_taken_view()
            except AttributeError:
                pass