Exemplo n.º 1
0
 def __init__(self, **kwargs):
     if kwargs.get("section"):
         section = kwargs.get("section")
         self.key = section.canvas_course_sis_id()
         self.data = [
             self.key,
             section_short_name(section),
             section_long_name(section),
             Curriculum.objects.canvas_account_id(section),
             term_sis_id(section),
             "active" if is_active_section(section) else "deleted",
             None,
             None,
         ]
     else:
         self.key = kwargs["course_id"]
         self.data = [
             self.key,
             kwargs["short_name"],
             kwargs["long_name"],
             kwargs["account_id"],
             kwargs["term_id"],
             kwargs.get("status", "active"),
             kwargs.get("start_date", None),
             kwargs.get("end_date", None),
         ]
Exemplo n.º 2
0
 def __init__(self, section, status='active'):
     self.key = term_sis_id(section)
     self.data = [self.key,
                  term_name(section),
                  status,
                  term_start_date(section),
                  term_end_date(section)]
Exemplo n.º 3
0
 def __init__(self, **kwargs):
     if kwargs.get('section'):
         section = kwargs.get('section')
         self.key = section.canvas_course_sis_id()
         self.data = [self.key,
                      section_short_name(section),
                      section_long_name(section),
                      account_id_for_section(section),
                      term_sis_id(section),
                      'active' if is_active_section(section) else 'deleted',
                      None, None]
     else:
         self.key = kwargs['course_id']
         self.data = [self.key, kwargs['short_name'], kwargs['long_name'],
                      kwargs['account_id'], kwargs['term_id'],
                      kwargs.get('status', 'active'),
                      kwargs.get('start_date', None),
                      kwargs.get('end_date', None)]
Exemplo n.º 4
0
 def __init__(self, section, status="active"):
     self.key = term_sis_id(section)
     self.data = [self.key, term_name(section), status, term_start_date(section), term_end_date(section)]