1616from django .db import models , transaction
1717from django .db .models import Count , Manager , Q , QuerySet
1818from django .http .request import HttpRequest
19+ from django .urls import reverse
1920from django .utils import formats , timezone
2021from sentry_sdk import add_breadcrumb , capture_exception
2122from simple_history .models import HistoricalRecords
@@ -1140,11 +1141,16 @@ def set_sticky_students(self, users: "Sequence[AbstractBaseUser]") -> None:
11401141
11411142 self .sticky_students .set (users )
11421143
1144+ base_url = reverse ("eighth_signup" , args = [self .block .id ])
11431145 if new_stickied_students :
11441146 email_send_task .delay (
11451147 "eighth/emails/students_stickied.txt" ,
11461148 "eighth/emails/students_stickied.html" ,
1147- data = {"activity" : self },
1149+ data = {
1150+ "activity" : self .activity ,
1151+ "block" : self .block ,
1152+ "base_url" : base_url ,
1153+ },
11481154 subject = "You have been stickied into an activity" ,
11491155 emails = new_stickied_students ,
11501156 bcc = True ,
@@ -1153,7 +1159,11 @@ def set_sticky_students(self, users: "Sequence[AbstractBaseUser]") -> None:
11531159 email_send_task .delay (
11541160 "eighth/emails/students_unstickied.txt" ,
11551161 "eighth/emails/students_unstickied.html" ,
1156- data = {"activity" : self },
1162+ data = {
1163+ "activity" : self .activity ,
1164+ "block" : self .block ,
1165+ "base_url" : base_url ,
1166+ },
11571167 subject = "You have been unstickied from an activity" ,
11581168 emails = unstickied_students ,
11591169 bcc = True ,
0 commit comments