Returns a list of uw_sws.models.SectionReference objects
    for the passed curriculum and term.
493034
def get_sections_by_curriculum_and_term(curriculum, term):
    
    url = "{}?{}".format(
        section_res_url_prefix,
        urlencode([("curriculum_abbreviation", curriculum.label,),
                   ("quarter", term.quarter.lower(),),
                   ("year", term.year,), ]))
    return _json_to_sectionref(get_resource(url))
952718
def get_linked_sections(section,
                        include_instructor_not_on_time_schedule=True):
    
    linked_sections = []

    for url in section.linked_section_urls:
        section = get_section_by_url(url,
                                     include_instructor_not_on_time_schedule)
        linked_sections.append(section)

    return linked_sections
1301007
def _get_sections(request):
    
    sections = []
    for section_url in SECTIONS:
        crumb = find_crumb(request, section_url)
        if crumb:
            if section_url == '/':
                if request.path == section_url:
                    crumb.is_current = True
            else:
                if request.path.startswith(section_url):
                    crumb.is_current = True
            sections.append(crumb)

    return sections
915563
def obtain_category_list(sub_only = false)

      segments = params[:slug].split('/')
      category_url = Setting.get('category_slug')
      # variables and data

      # check to see if we are on the category term type, that we just want the sub cateogries and the segments actually exist
      if segments[1] == category_url && sub_only && !segments[2].blank?

        # get the current category
        parent_term = Term.where(roroacms_term_anatomies: {taxonomy: 'category'}, :structured_url => "/" +  segments.drop(2).join('/')).includes(:term_anatomy).first

        terms =
          if !parent_term.blank?
            # get all the records with the current category as its parent
            Term.where(:parent_id => parent_term.id)
          else
            []
          end

      else
        # get all the categories
        terms = Term.where(roroacms_term_anatomies: {taxonomy: 'category'}, :parent_id => nil).includes(:term_anatomy)
      end

      li_loop_for_terms(terms.arrange, category_url)

    end
1187148
def get_reference_fields(self, exclude_models=None):
        
        if exclude_models is None:
            exclude_models = []
        result = []
        for django_model in django.apps.apps.get_models():
            if any([issubclass(django_model, m) for m in exclude_models]):
                continue
            for django_field in django_model._meta.fields:
                if isinstance(django_field, models.ForeignKey) and django_field.related.to == Item:
                    result = [(m, f) for (m, f) in result if not issubclass(django_model, m)]
                    result.append((django_model, django_field))
        return result
1147909
public List<DSLMappingEntry> getEntries(final DSLMappingEntry.Section section) {
        final List<DSLMappingEntry> list = new LinkedList<DSLMappingEntry>();
        for ( final Iterator<DSLMappingEntry> it = this.entries.iterator(); it.hasNext(); ) {
            final DSLMappingEntry entry = it.next();
            if ( entry.getSection().equals( section ) ) {
                list.add( entry );
            }
        }
        return list;
    }
655777
def list(self,walkTrace=tuple(),case=None,element=None):
        
        if case == 'sectionmain': print(walkTrace,self.title)
1172313
def getReferenceAnalyses(self):
        """"""
        ans = self.getAnalyses()
        references = [an for an in ans if IReferenceAnalysis.providedBy(an)]
        return references
1354767
def get_sections_for_school(id, opts = {})
      data, _status_code, _headers = get_sections_for_school_with_http_info(id, opts)
      return data
    end
318735
def sections(self):
        
        secs = OrderedDict()
        secs['Overview'] = self.sec_overview
        secs['Communication Channels'] = self.sec_com_channels
        secs['Detailed Activity by Project'] = self.sec_projects

        return secs
622343
def get_gradebooks(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('gradebook_lookup_session').get_gradebooks()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Gradebook(self._provider_manager, cat, self._runtime, self._proxy))
        return GradebookList(cat_list)
379198
def children(self):
        
        return TermList(unique_everseen(
            y for x in self for y in x.children
        ))
1263408
def get_referenced_fields_and_fragment_names(
    context: ValidationContext,
    cached_fields_and_fragment_names: Dict,
    fragment: FragmentDefinitionNode,
) -> Tuple[NodeAndDefCollection, List[str]]:
    
    # Short-circuit building a type from the node if possible.
    cached = cached_fields_and_fragment_names.get(fragment.selection_set)
    if cached:
        return cached

    fragment_type = type_from_ast(context.schema, fragment.type_condition)
    return get_fields_and_fragment_names(
        context, cached_fields_and_fragment_names, fragment_type, fragment.selection_set
    )
1179001
def get_grade_systems(self):
        
        if self.retrieved:
            raise errors.IllegalState('List has already been retrieved.')
        self.retrieved = True
        return objects.GradeSystemList(self._results, runtime=self._runtime)
804621
def get_sections_for_teacher(id, opts = {})
      data, _status_code, _headers = get_sections_for_teacher_with_http_info(id, opts)
      return data
    end
294101
def get_user_lists(self, course, classroomid):
        
        tutor_list = course.get_staff()

        # Determine if user is grouped or not in the classroom
        student_list = list(self.database.classrooms.aggregate([
            {"$match": {"_id": ObjectId(classroomid)}},
            {"$unwind": "$students"},
            {"$project": {
                "students": 1,
                "grouped": {
                    "$anyElementTrue": {
                        "$map": {
                            "input": "$groups.students",
                            "as": "group",
                            "in": {
                                "$anyElementTrue": {
                                    "$map": {
                                        "input": "$$group",
                                        "as": "groupmember",
                                        "in": {"$eq": ["$$groupmember", "$students"]}
                                    }
                                }
                            }
                        }
                    }
                }
            }}
        ]))

        student_list = dict([(student["students"], student) for student in student_list])

        other_students = [entry['students'] for entry in list(self.database.classrooms.aggregate([
            {"$match": {"courseid": course.get_id(), "_id": {"$ne": ObjectId(classroomid)}}},
            {"$unwind": "$students"},
            {"$project": {"_id": 0, "students": 1}}
        ]))]

        users_info = self.user_manager.get_users_info(other_students + list(student_list.keys()) + tutor_list)

        # Order the non-registered students
        other_students = sorted(other_students, key=lambda val: (("0"+users_info[val][0]) if users_info[val] else ("1"+val)))

        return student_list, tutor_list, other_students, users_info
134259
public List<Term> getAllTerms() {
        List<Term> ret = new ArrayList<Term>();
        ret.add(subject);

        List<Term> subjectTerms = subject.getTerms();
        if (subjectTerms != null) {
            ret.addAll(subjectTerms);
            for (final Term term : subjectTerms) {
                ret.addAll(term.getAllTerms());
            }
        }

        if (object != null) {
            ret.addAll(object.getAllTerms());
        }
        return ret;
    }