raise BaseException('You should first create a course with this code: ' + code)
def get_training(self, code):
- return ''
+ platform_only = False
+ if 'I' in code[0:2]:
+ platform_only = True
+ code = code[3:]
+ training = Training.objects.get(code=code)
+ else:
+ training = Training.objects.get(code=code)
+ return platform_only, training
def import_user(self, row):
last_name = row[0].value
student = Student.objects.filter(user=user)
if not student:
student = Student(user=user)
- student.period, c = Period.objects.get_or_create(name='Estivale')
+ student.platform_only, student.training = gat_training(code=row[3].value)
+ student.period = Period.objects.get(name='Estivale')
student.iej, c = IEJ.objects.get_or_create(name=row[2].value)
- student.training, c = get_training(code=row[3].value)
+
student.save()
- student.procedure = self.get_courses('procedure', row[4].value)
- student.written_speciality = self.get_courses('written_speciality', row[5].value)
- student.oral_speciality = self.get_courses('oral_speciality', row[6].value)
- student.oral_1 = self.get_courses('oral_1', row[7].value)
- student.oral_2 = self.get_courses('oral_2', row[8].value)
+ student.procedure = self.get_courses(row[4].value)
+ student.written_speciality = self.get_course(row[5].value)
+ student.oral_speciality = self.get_course(row[6].value)
+ student.oral_1 = self.get_course(row[7].value)
+ student.oral_2 = self.get_course(row[8].value)
profile, created = Profile.objects.get_or_create(user=user)
profile.address = row[10].value
<th class="highlight">{% trans "Session" %}</th>
<th>{% trans "Professor" %}</th>
<th>{% trans "Begin date" %}</th>
- <th >{% trans "Room" %}</th>
<th>{% trans "Streaming" %}</th>
</tr>
</thead>
<tr {% if not forloop.counter0|divisibleby:"2" %}class="odd"{% endif %}>
<td><a href="{% url teleforma-conference-detail conference.id %}">{{ conference.session }}</a></td>
<td><a href="{% url telemeta-profile-detail conference.professor.user.username %}" target="_blank">{{ conference.professor }}</a></td>
- <td>{{ conference.date_begin }}</td>
- <td>{{ conference.room }}</td>
+ <td><a href="{% url teleforma-conference-detail conference.id %}">{{ conference.date_begin }}</a></td>
<td align="center">
{% if conference.streaming %}
<img src="images/media-record.png" alt="yes" style="vertical-align:middle" />