]> git.parisson.com Git - teleforma.git/commitdiff
fix notif
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Thu, 14 Nov 2024 21:22:47 +0000 (22:22 +0100)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Thu, 14 Nov 2024 21:22:47 +0000 (22:22 +0100)
teleforma/views/core.py

index ef8d942932ef89da49aa7d9f59e102d605b61ec2..d0e882bf6c8f61f389378932b91823507b66ab17 100644 (file)
@@ -966,12 +966,14 @@ class LiveConferenceNotify(APIView):
             raise Exception('No conference id in request')
         conference = Conference.objects.get(pk=int(conference_id))
         students = Student.objects.filter(period=conference.period, platform_only=True)
-        text = f"""Une conférence live "{conference.course.title}" commence"""
 
-        if conference.bbb_record_id:
+
+        if conference.bbb_room_id:
             url = reverse('teleforma-conference-join', kwargs={'pk': conference.id})
+            text = f"""Une visio-conférence live "{conference.course.title}" commence"""
         else:
             url = reverse('teleforma-conference-detail', kwargs={'period_id': conference.period.id, 'pk': conference.id})
+            text = f"""Une conférence live classique "{conference.course.title}" commence"""
 
         # notify students
         for student in students:
@@ -981,8 +983,6 @@ class LiveConferenceNotify(APIView):
                     for course in courses:
                         if conference.course == course['course'] and \
                                 conference.course_type in course['types']:
-                            if conference.bbb_room_id:
-                                url = conference.get_join_conference_url(student.user)
                             notify(student.user, text, url)
                             logger.info("Student notified: " + student.user.username)
             except Exception as e: