Commit e0dcfc58 authored by Fernando Ribeiro's avatar Fernando Ribeiro
Browse files

Merge branch 'develop' into 'master'

Develop into master

See merge request !11
parents d4f0ff56 b74499ee
......@@ -7,6 +7,7 @@ from .videos.models import Video
from .models import (
Course, Lesson, Unit, CourseProfessor, CourseStudent,
StudentProgress, Class,
ProfessorMessage,
)
from .course_material.models import CourseMaterial, File
......@@ -112,3 +113,7 @@ class WorkspaceAdmin(admin.ModelAdmin):
'groups',
'classes',
)
@admin.register(ProfessorMessage)
class ProfessorMessageAdmin(admin.ModelAdmin):
pass
......@@ -663,6 +663,9 @@ class ProfessorMessage(models.Model):
blank=True,
)
def __str__(self):
return self.professor.name + " - " + self.subject + " - " + str(self.date)
def send(self):
# bcc = list with all destinataries
# batch = bcc.split( constant )
......
......@@ -2,6 +2,7 @@ from rest_framework import serializers
from django.contrib.auth.models import Group
from baquara.users.serializers import SimpleUserSerializer
from courses.models import Course, Class
# from courses.serializers import ClassSerializer as CoreClassSerializer
# from courses_legacy.core.serializers import ClassSerializer as CoreClassSerializer
......@@ -24,12 +25,11 @@ class GroupSerializer(serializers.ModelSerializer):
class GroupAdminSerializer(serializers.ModelSerializer):
# users = TimtecUserSerializer(many=True, read_only=True, source="user_set")
users = SimpleUserSerializer(many=True, read_only=True, source="user_set")
class Meta:
model = Group
fields = ('id', 'name', 'users', )
depth = 1
class ClassSerializer(serializers.ModelSerializer):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment