code stringlengths 1 18.2k |
|---|
# osid.resource.ResourceLookupSession.get_resources_by_ids # NOTE: This implementation currently ignores plenary view collection = JSONClientValidated('authentication', collection='Agent', runtime=self._runtime) object_id_list = [] for i in agent_ids: object_id_list.append(ObjectId(self._get_id(i, 'authentication').get... |
def get_agents_by_genus_type(self, agent_genus_type): """Gets an ``AgentList`` corresponding to the given agent genus ``Type`` which does not include agents of genus types derived from the specified ``Type``. In plenary mode, the returned list contains all known agents or an error results. Otherwise, the returned list ... |
def get_agents(self): """Gets all ``Agents``. In plenary mode, the returned list contains all known agents or an error results. Otherwise, the returned list may contain only those agents that are accessible through this session. return: (osid.authentication.AgentList) - a list of ``Agents`` raise: OperationFailed - una... |
def __stream_format_allowed(self, stream): """ Check whether a stream allows formatting such as coloring. Inspired from Python cookbook, #475186 """ # curses isn't available on all platforms try: import curses as CURSES except: return False try: CURSES.setupterm() return CURSES.tigetnum("colors") >= 2 except: return Fa... |
def lastLogged(self): """Get a dictionary of last logged messages. Keys are log types and values are the the last messages.""" d = copy.deepcopy(self.__lastLogged) d.pop(-1, None) return d |
def set_stdout(self, stream=None): """ Set the logger standard output stream. :Parameters: #. stdout (None, stream): The standard output stream. If None, system standard output will be set automatically. Otherwise any stream with read and write methods can be passed """ if stream is None: self.__stdout = sys.stdout els... |
def set_log_type_flags(self, logType, stdoutFlag, fileFlag): """ Set a defined log type flags. :Parameters: #. logType (string): A defined logging type. #. stdoutFlag (boolean): Whether to log to the standard output stream. #. fileFlag (boolean): Whether to log to to file. """ assert logType in self.__logTypeStdoutFlag... |
def set_log_file(self, logfile): """ Set the log file full path including directory path basename and extension. :Parameters: #. logFile (string): the full log file path including basename and extension. If this is given, all of logFileBasename and logFileExtension will be discarded. logfile is equivalent to logFileBas... |
def set_log_file_extension(self, logFileExtension): """ Set the log file extension. :Parameters: #. logFileExtension (string): Logging file extension. A logging file full name is set as logFileBasename.logFileExtension """ assert isinstance(logFileExtension, basestring), "logFileExtension must be a basestring" assert l... |
def __set_log_file_name(self): """Automatically set logFileName attribute""" # ensure directory exists dir, _ = os.path.split(self.__logFileBasename) if len(dir) and not os.path.exists(dir): os.makedirs(dir) # create logFileName self.__logFileName = self.__logFileBasename+"."+self.__logFileExtension number = 0 while os... |
def set_log_file_maximum_size(self, logFileMaxSize): """ Set the log file maximum size in megabytes :Parameters: #. logFileMaxSize (number): The maximum size in Megabytes of a logging file. Once exceeded, another logging file as logFileBasename_N.logFileExtension will be created. Where N is an automatically incremented... |
def set_minimum_level(self, level=0, stdoutFlag=True, fileFlag=True): """ Set the minimum logging level. All levels below the minimum will be ignored at logging. :Parameters: #. level (None, number, str): The minimum level of logging. If None, minimum level checking is left out. If str, it must be a defined logtype and... |
'%s' given as string, is not defined logType" %level level = self.__logTypeLevels[level] assert _is_number(level), "level must be a number" level = float(level) if stdoutFlag: if self.__stdoutMaxLevel is not None: assert level<=self.__stdoutMaxLevel, "stdoutMinLevel must be smaller or equal to stdoutMaxLevel %s"%self._... |
def force_log_type_stdout_flag(self, logType, flag): """ Force a logtype standard output logging flag despite minimum and maximum logging level boundaries. :Parameters: #. logType (string): A defined logging type. #. flag (None boolean): The standard output logging flag. If None, logtype existing forced flag is release... |
def force_log_type_file_flag(self, logType, flag): """ Force a logtype file logging flag despite minimum and maximum logging level boundaries. :Parameters: #. logType (string): A defined logging type. #. flag (None, boolean): The file logging flag. If None, logtype existing forced flag is released. """ assert logType i... |
def force_log_type_flags(self, logType, stdoutFlag, fileFlag): """ Force a logtype logging flags. :Parameters: #. logType (string): A defined logging type. #. stdoutFlag (None, boolean): The standard output logging flag. If None, logtype stdoutFlag forcing is released. #. fileFlag (None, boolean): The file logging flag... |
def set_log_type_name(self, logType, name): """ Set a logtype name. :Parameters: #. logType (string): A defined logging type. #. name (string): The logtype new name. """ assert logType in self.__logTypeStdoutFlags.keys(), "logType '%s' not defined" %logType assert isinstance(name, basestring), "name must be a string" n... |
def set_log_type_level(self, logType, level): """ Set a logtype logging level. :Parameters: #. logType (string): A defined logging type. #. level (number): The level of logging. """ assert _is_number(level), "level must be a number" level = float(level) name = str(name) self.__logTypeLevels[logType] = level |
def remove_log_type(self, logType, _assert=False): """ Remove a logtype. :Parameters: #. logType (string): The logtype. #. _assert (boolean): Raise an assertion error if logType is not defined. """ # check logType if _assert: assert logType in self.__logTypeStdoutFlags.keys(), "logType '%s' is not defined" %logType # r... |
def add_log_type(self, logType, name=None, level=0, stdoutFlag=None, fileFlag=None, color=None, highlight=None, attributes=None): """ Add a new logtype. :Parameters: #. logType (string): The logtype. #. name (None, string): The logtype name. If None, name will be set to logtype. #. level (number): The level of logging.... |
light cyan #. highlight (None, string): The logging text highlight color. The defined highlights are:\n black , red , green , orange , blue , magenta , cyan , grey #. attributes (None, string): The logging text attribute. The defined attributes are:\n bold , underline , blink , invisible , strike through **N.B** *loggi... |
def update_log_type(self, logType, name=None, level=None, stdoutFlag=None, fileFlag=None, color=None, highlight=None, attributes=None): """ update a logtype. :Parameters: #. logType (string): The logtype. #. name (None, string): The logtype name. If None, name will be set to logtype. #. level (number): The level of log... |
cyan #. highlight (None, string): The logging text highlight color. The defined highlights are:\n black , red , green , orange , blue , magenta , cyan , grey #. attributes (None, string): The logging text attribute. The defined attributes are:\n bold , underline , blink , invisible , strike through **N.B** *logging col... |
None: attributes = self.__logTypeAttributes[logType] # update log type self.__set_log_type(logType=logType, name=name, level=level, stdoutFlag=stdoutFlag, fileFlag=fileFlag, color=color, highlight=highlight, attributes=attributes) |
def log(self, logType, message, data=None, tback=None): """ log a message of a certain logtype. :Parameters: #. logType (string): A defined logging type. #. message (string): Any message to log. #. data (None, object): Any type of data to print and/or write to log file after log message #. tback (None, str, list): Stac... |
= log |
def force_log(self, logType, message, data=None, tback=None, stdout=True, file=True): """ Force logging a message of a certain logtype whether logtype level is allowed or not. :Parameters: #. logType (string): A defined logging type. #. message (string): Any message to log. #. tback (None, str, list): Stack traceback t... |
= log self.__lastLogged[-1] = log |
def flush(self): """Flush all streams.""" if self.__logFileStream is not None: try: self.__logFileStream.flush() except: pass try: os.fsync(self.__logFileStream.fileno()) except: pass if self.__stdout is not None: try: self.__stdout.flush() except: pass try: os.fsync(self.__stdout.fileno()) except: pass |
def info(self, message, *args, **kwargs): """alias to message at information level""" self.log("info", message, *args, **kwargs) |
def information(self, message, *args, **kwargs): """alias to message at information level""" self.log("info", message, *args, **kwargs) |
def warn(self, message, *args, **kwargs): """alias to message at warning level""" self.log("warn", message, *args, **kwargs) |
def warning(self, message, *args, **kwargs): """alias to message at warning level""" self.log("warn", message, *args, **kwargs) |
def ts_to_dt_str(ts, dt_format='%Y-%m-%d %H:%M:%S'): """ 时间戳转换为日期字符串 Args: ts: 待转换的时间戳 dt_format: 目标日期字符串格式 Returns: 日期字符串 """ return datetime.datetime.fromtimestamp(int(ts)).strftime(dt_format) |
def str_to_datetime(dt_str, fmt='%Y-%m-%d %H:%M:%S'): """ 字符串转换为datetime类型数据 :param dt_str: :param fmt: :return: """ d_time = datetime.datetime.strptime(dt_str, fmt) return d_time |
def dt_delta(dt, delta): """ 获取dt相隔delta的日期 :param dt: :param delta: :return: """ delta_time = datetime.timedelta(days=delta) target_date = dt + delta_time return target_date |
def time_str_to_minutes(time_str): """ 通过时间字符串计算得到这是一天中第多少分钟 :param time_str: eg: '11:10:00' :return: int """ time_arr = time_str.split(":") hours = int(time_arr[0]) minutes = int(time_arr[1]) return hours * 60 + minutes |
def almost_eq(a, b, threshold=0.000001): """ 比较两个小数是否几乎相等 当两数差的绝对值小于threshold时认为其相等 :param a: :param b: :param threshold: :return: True or False """ if abs(a - b) < threshold: return True else: return False |
def sort_transcripts(self): """Sort the transcripts stored here""" txs = sorted(self.transcripts,key=lambda x: (x.range.chr, x.range.start, x.range.end)) self._transcripts = txs |
def _set_no_catalog_view(self, session): """Sets the underlying no_catalog view to match current view""" if self._no_catalog_view == COMPARATIVE: try: session.use_comparative_no_catalog_view() except AttributeError: pass else: try: session.use_plenary_no_catalog_view() except AttributeError: pass |
def send(self, send_to, from_who, subject, message, reply_to=None): """Send Email. To use this module pass in a message, send_to, from_who, and subject. :param send_to: ``str`` :param from_who: ``str`` :param subject: ``str`` :param message: ``str`` :param reply_to: ``str`` """ # Set the reply to address if it's None i... |
def authenticate(self, account_name, password): """ Authenticates zimbra account. @param account_name: account email address @param password: account password @raise AuthException: if authentication fails @raise SoapException: if soap communication fails """ self.auth_token = self.authenticator.authenticate(self.transp... |
def change_password(self, current_password, new_password): """ Changes account password. @param current_password: current password @param new_password: new password """ attrs = {sconstant.A_BY: sconstant.V_NAME} account = SOAPpy.Types.stringType(data=self.auth_token.account_name, attrs=attrs) params = {sconstant.E_ACCO... |
def get_account_info(self): """ Gets account info. @return: AccountInfo """ attrs = {sconstant.A_BY: sconstant.V_NAME} account = SOAPpy.Types.stringType(data=self.auth_token.account_name, attrs=attrs) params = {sconstant.E_ACCOUNT: account} res = self.invoke(zconstant.NS_ZIMBRA_ACC_URL, sconstant.GetAccountInfoRequest,... |
def get_info(self, params={}): """ Gets mailbox info. @param params: params to retrieve @return: AccountInfo """ res = self.invoke(zconstant.NS_ZIMBRA_ACC_URL, sconstant.GetInfoRequest, params) return res |
def get_relationship_mdata(): """Return default mdata map for Relationship""" return { 'source': { 'element_label': { 'text': 'source', 'languageTypeId': str(DEFAULT_LANGUAGE_TYPE), 'scriptTypeId': str(DEFAULT_SCRIPT_TYPE), 'formatTypeId': str(DEFAULT_FORMAT_TYPE), }, 'instructions': { 'text': 'accepts an osid.id.Id ob... |
def _match_minimum_date_time(self, match_key, date_time_value, match=True): """Matches a minimum date time value""" if match: gtelt = '$gte' else: gtelt = '$lt' if match_key in self._query_terms: self._query_terms[match_key][gtelt] = date_time_value else: self._query_terms[match_key] = {gtelt: date_time_value} |
def _clear_minimum_terms(self, match_key): """clears minimum match_key term values""" try: # clear match = True case del self._query_terms[match_key]['$gte'] except KeyError: pass try: # clear match = False case del self._query_terms[match_key]['$lt'] except KeyError: pass try: if self._query_terms[match_key] == {}: de... |
def _clear_maximum_terms(self, match_key): """clears maximum match_key term values""" try: # clear match = True case del self._query_terms[match_key]['$lte'] except KeyError: pass try: # clear match = False case del self._query_terms[match_key]['$gt'] except KeyError: pass try: if self._query_terms[match_key] == {}: de... |
def match_keyword(self, keyword, string_match_type=DEFAULT_STRING_MATCH_TYPE, match=True): """Adds a keyword to match. Multiple keywords can be added to perform a boolean ``OR`` among them. A keyword may be applied to any of the elements defined in this object such as the display name, description or any method defined... |
in self._keyword_terms: self._keyword_terms[field_name] = {'$in': list()} self._keyword_terms[field_name]['$in'].append(match_value) |
def match_any(self, match): """Matches any object. arg: match (boolean): ``true`` to match any object ``,`` ``false`` to match no objects *compliance: mandatory -- This method must be implemented.* """ match_key = '_id' param = '$exists' if match: flag = 'true' else: flag = 'false' if match_key in self._query_terms: se... |
def match_start_date(self, start, end, match): """Matches temporals whose start date falls in between the given dates inclusive. arg: start (osid.calendaring.DateTime): start of date range arg: end (osid.calendaring.DateTime): end of date range arg: match (boolean): ``true`` if a positive match, ``false`` for a negativ... |
def match_end_date(self, start, end, match): """Matches temporals whose effective end date falls in between the given dates inclusive. arg: start (osid.calendaring.DateTime): start of date range arg: end (osid.calendaring.DateTime): end of date range arg: match (boolean): ``true`` if a positive match, ``false`` for neg... |
def match_date(self, from_, to, match): """Matches temporals where the given date range falls entirely between the start and end dates inclusive. arg: from (osid.calendaring.DateTime): start date arg: to (osid.calendaring.DateTime): end date arg: match (boolean): ``true`` if a positive match, ``false`` for a negative m... |
def match_display_name(self, display_name, string_match_type=DEFAULT_STRING_MATCH_TYPE, match=True): """Adds a display name to match. Multiple display name matches can be added to perform a boolean ``OR`` among them. arg: display_name (string): display name to match arg: string_match_type (osid.type.Type): the string m... |
def match_description(self, description, string_match_type=DEFAULT_STRING_MATCH_TYPE, match=True): """Adds a description name to match. Multiple description matches can be added to perform a boolean ``OR`` among them. arg: description (string): description to match arg: string_match_type (osid.type.Type): the string ma... |
def get_handler_fp(logger): """ Get handler_fp. This method is integrated to LoggerFactory Object in the future. :param logging.Logger logger: Python logging.Logger. logger instance. :rtype: logging.Logger.handlers.BaseRotatingHandler :return: Handler or Handler's stream. We call it `handler_fp`. """ if not hasattr(log... |
def from_status(cls, http_status, code_index=0, message=None, developer_message=None, meta=None): # type: (HTTPStatus, int, AnyStr, AnyStr, dict) -> Error """ Automatically build an HTTP response from the HTTP Status code. :param http_status: :param code_index: :param message: :param developer_message: :param meta: """... |
def acquire(self, timeout=None): ''' acquire - Acquire given lock. Can be blocking or nonblocking by providing a timeout. Returns "True" if you got the lock, otherwise "False" @param timeout <None/float> - Max number of seconds to wait, or None to block until we can acquire it. @return <bool> - True if you got the lock... |
time.time() + timeout keepGoing = lambda : bool(time.time() < endTime) else: pollTime = DEFAULT_POLL_TIME keepGoing = lambda : True success = False while keepGoing(): try: os.mkdir(self.lockPath) success = True break except: time.sleep(pollTime) if self.maxLockAge: if os.path.exists(self.lockPath) and os.stat(self.lock... |
def release(self, forceRelease=False): ''' release - Release the lock. @param forceRelease <bool> default False - If True, will release the lock even if we don't hold it. @return - True if lock is released, otherwise False ''' if not self.held: if forceRelease is False: return False # We were not holding the lock else:... |
def __checkExpiration(self, mtime=None): ''' __checkExpiration - Check if we have expired @param mtime <int> - Optional mtime if known, otherwise will be gathered @return <bool> - True if we did expire, otherwise False ''' if not self.maxLockAge: return False if mtime is None: try: mtime = os.stat(self.lockPath).st_mti... |
def isHeld(self): ''' isHeld - True if anyone holds the lock, otherwise False. @return bool - If lock is held by anyone ''' if not os.path.exists(self.lockPath): return False try: mtime = os.stat(self.lockPath).st_mtime except FileNotFoundError as e: return False if self.__checkExpiration(mtime): return False return Tr... |
def hasLock(self): ''' hasLock - Property, returns True if we have the lock, or False if we do not. @return <bool> - True/False if we have the lock or not. ''' # If we don't hold it currently, return False if self.held is False: return False # Otherwise if we think we hold it, but it is not held, we have lost it. if no... |
def stack_frame_info(stacklevel): ''' Return a named tuple with information about the given stack frame: - filename - line_number - module_name - function_name stacklevel: How far up the stack to look. 1 means the immediate caller, 2 its caller, and so on. ''' import inspect if stacklevel < 1: raise ValueError('A stack... |
def pretty(self): ''' Return a string like '/foo/bar.py:230 in foo.bar.my_func'. ''' return '{}:{} in {}.{}'.format( self.filename, self.line_number, self.module_name, self.function_name) |
def validate(bundle): """Validate a bundle object and all of its components. The bundle must be passed as a YAML decoded object. Return a list of bundle errors, or an empty list if the bundle is valid. """ errors = [] add_error = errors.append # Check that the bundle sections are well formed. series, services, machines... |
def _validate_sections(bundle, add_error): """Check that the base bundle sections are valid. The bundle argument is a YAML decoded bundle content. A bundle is composed of series, services, machines and relations. Only the services section is mandatory. Use the given add_error callable to register validation error. Retu... |
machines.items()) except (TypeError, ValueError): add_error('machines spec identifiers must be digits') else: add_error('machines spec does not appear to be well-formed') # Validate the relations section. relations = bundle.get('relations') if (relations is not None) and (not islist(relations)): add_error('relations sp... |
def _validate_series(series, label, add_error): """Check that the given series is valid. Use the given label (e.g. "machine X" or just "bundle") to describe possible errors. Use the given add_error callable to register validation error. """ if series is None: return if not isstring(series): add_error('{} series must be... |
def _validate_services(services, machines, add_error): """Validate each service within the bundle. Receive the services and machines sections of the bundle. Use the given add_error callable to register validation error. """ machine_ids = set() for service_name, service in services.items(): if not isstring(service_name)... |
placements = [placements] if (num_units is not None) and (len(placements) > num_units): add_error( 'too many units placed for service {}'.format(service_name)) for placement in placements: machine_id = _validate_placement( placement, services, machines, charm, add_error) machine_ids.add(machine_id) if machines is not N... |
def _validate_charm(url, service_name, add_error): """Validate the given charm URL. Use the given service name to describe possible errors. Use the given add_error callable to register validation error. If the URL is valid, return the corresponding charm reference object. Return None otherwise. """ if url is None: add_... |
service {}: {}' ''.format(service_name, charm)) return None return charm |
def _validate_num_units(num_units, service_name, add_error): """Check that the given num_units is valid. Use the given service name to describe possible errors. Use the given add_error callable to register validation error. If no errors are encountered, return the number of units as an integer. Return None otherwise. "... |
def _validate_constraints(constraints, label, add_error): """Validate the given service or machine constraints. Use the given label (e.g. "machine X" or "service Y") to describe possible errors. Use the given add_error callable to register validation error. """ if constraints is None: return msg = '{} has invalid const... |
def _validate_storage(storage, service_name, add_error): """Lazily validate the storage constraints, ensuring that they are a dict. Use the given add_error callable to register validation error. """ if storage is None: return if not isdict(storage): msg = 'service {} has invalid storage constraints {}'.format( service_... |
def _validate_options(options, service_name, add_error): """Lazily validate the options, ensuring that they are a dict. Use the given add_error callable to register validation error. """ if options is None: return if not isdict(options): add_error('service {} has malformed options'.format(service_name)) |
def _validate_annotations(annotations, label, add_error): """Check that the given service or machine annotations are valid. Use the given label (e.g. "machine X" or "service Y") to describe possible errors. Use the given add_error callable to register validation error. """ if annotations is None: return if not isdict(a... |
def _validate_placement(placement, services, machines, charm, add_error): """Validate a placement directive against other services. Receive the placement (possibly as a string), the services and machines bundle sections, the corresponding charm (or None if invalid) and the add_error callable used to register validation... |
return if unit_placement.service: service = services.get(unit_placement.service) if service is None: add_error( 'placement {} refers to non-existent service {}' ''.format(placement, unit_placement.service)) return if unit_placement.unit is not None: try: num_units = int(service['num_units']) except (TypeError, ValueErr... |
not isdict(machine): # Ignore this error here, as it is emitted while validating the # machines section of the bundle. machine = {} # If the unit is "hulk smashed", then we need to check that the charm # and the machine series match. if not unit_placement.container_type: series = machine.get('series') if charm.series a... |
def _validate_machines(machines, add_error): """Validate the given machines section. Validation includes machines constraints, series and annotations. Use the given add_error callable to register validation error. """ if not machines: return for machine_id, machine in machines.items(): if machine_id < 0: add_error( 'ma... |
def _validate_relations(relations, services, add_error): """Validate relations, ensuring that the endpoints exist. Receive the relations and services bundle sections. Use the given add_error callable to register validation error. """ if not relations: return for relation in relations: if not islist(relation): add_error... |
def get_block_bounds(filename): """Pre block starts start 0-indexted, end 1-indexted :param filename: filename :type filename: string :return: 0-index start and 1-index end :rtype: array of arrays with the [start end] of each block """ bs = [] with open(filename,'rb') as inf: while True: bytes1 = inf.read(12) if len(by... |
def is_bgzf(filename): """Pre: filename to test if it is a bgzf format Post: True or False :param filename: :type filename: string :return: if its a bgzf :rtype: bool """ with open(filename,'rb') as inf: bytes1 = inf.read(12) if len(bytes1) != 12: sys.stderr.write("File length ERROR\n") return False try: gzip_id1,gzip_... |
True: v1 = s.read(4) if len(v1) == 0: break if len(v1) < 4: sys.stderr.write("lack header values ERROR\n") return False s1,s2,slen = struct.unpack('<BBH',v1) if s1 == 66 and s2 == 67: has_id = True obsslen = slen v = s.read(slen) if len(v) != slen: sys.stderr.write("extra field read ERROR\n") return False if not has_id... |
def read(self,size): """read size bytes and return them""" done = 0 #number of bytes that have been read so far v = '' while True: if size-done < len(self._buffer['data']) - self._buffer_pos: v += self._buffer['data'][self._buffer_pos:self._buffer_pos+(size-done)] self._buffer_pos += (size-done) #self.pointer += size r... |
def get_objective_admin_session(self): """Gets the ``OsidSession`` associated with the objective administration service. return: (osid.learning.ObjectiveAdminSession) - an ``ObjectiveAdminSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_objective_admin()`` is ``false`` *co... |
def get_objective_admin_session_for_objective_bank(self, objective_bank_id): """Gets the ``OsidSession`` associated with the objective admin service for the given objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of the objective bank return: (osid.learning.ObjectiveAdminSession) - ``an _objective_admin_s... |
def get_objective_objective_bank_session(self): """Gets the session for retrieving objective to objective bank mappings. return: (osid.learning.ObjectiveObjectiveBankSession) - an ``ObjectiveObjectiveBankSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_objective_objective_... |
def get_objective_objective_bank_assignment_session(self): """Gets the session for assigning objective to objective bank mappings. return: (osid.learning.ObjectiveObjectiveBankAssignmentSession) - an ``ObjectiveObjectiveBankAssignmentSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - `... |
def get_activity_query_session(self): """Gets the ``OsidSession`` associated with the activity query service. return: (osid.learning.ActivityQuerySession) - a ``ActivityQuerySession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_activity_query()`` is ``false`` *compliance: optio... |
def get_activity_query_session_for_objective_bank(self, objective_bank_id): """Gets the ``OsidSession`` associated with the activity query service for the given objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of the objective bank return: (osid.learning.ActivityQuerySession) - an ``ActivityQuerySession`... |
def get_proficiency_query_session(self): """Gets the ``OsidSession`` associated with the proficiency query service. return: (osid.learning.ProficiencyQuerySession) - a ``ProficiencyQuerySession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_proficiency_query()`` is ``false`` *co... |
def get_proficiency_query_session_for_objective_bank(self, objective_bank_id): """Gets the ``OsidSession`` associated with the proficiency query service for the given objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of the obective bank return: (osid.learning.ProficiencyQuerySession) - a ``ProficiencyQue... |
def get_objective_bank_hierarchy_design_session(self): """Gets the session designing objective bank hierarchies. return: (osid.learning.ObjectiveBankHierarchyDesignSession) - an ``ObjectiveBankHierarchyDesignSession`` raise: OperationFailed - unable to complete request raise: Unimplemented - ``supports_objective_bank_h... |
def get_objective_lookup_session(self, proxy): """Gets the ``OsidSession`` associated with the objective lookup service. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.learning.ObjectiveLookupSession) - an ``ObjectiveLookupSession`` raise: NullArgument - ``proxy`` is ``null`` raise: OperationFailed - unable to co... |
def get_objective_lookup_session_for_objective_bank(self, objective_bank_id, proxy): """Gets the ``OsidSession`` associated with the objective lookup service for the given objective bank. arg: objective_bank_id (osid.id.Id): the ``Id`` of the objective bank arg: proxy (osid.proxy.Proxy): a proxy return: (osid.learning.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.