Skip to content

Add instructor email notifications for pending requests#378

Open
alxstx wants to merge 6 commits intoberkeley-cdss:mainfrom
alxstx:email-notifications
Open

Add instructor email notifications for pending requests#378
alxstx wants to merge 6 commits intoberkeley-cdss:mainfrom
alxstx:email-notifications

Conversation

@alxstx
Copy link
Copy Markdown
Contributor

@alxstx alxstx commented Apr 10, 2026

Summary

  • Add configurable email notifications for instructors when there are pending extension requests
  • Instructors can choose daily or weekly digest frequency and specify a notification email in course settings
  • Added PendingRequestsNotificationJob and rake task notifications:send_pending_digests[daily|weekly] for cron scheduling

Changes

  • Added pending_notification_frequency and pending_notification_email columns to course_settings
  • Added validations, normalization callbacks, and query scope to CourseSettings model
  • Added PendingRequestsNotificationJob to send digest emails with pending request count and link
  • Added pending notification params to CourseSettingsController permit list
  • Added rake task for cron scheduling
  • Added frequency dropdown and notification email field to General Settings tab
  • Added Stimulus toggle to disable email field when no frequency is selected

Test plan

  • Model validation and scope tests (spec/models/course_settings_spec.rb)
  • Job tests (spec/jobs/pending_requests_notification_job_spec.rb)
  • Controller tests (spec/controllers/course_settings_controller_spec.rb)
  • Rake task tests (spec/tasks/notifications_rake_spec.rb)

Closes #344

🤖 Generated with Claude Code

@superconductor-for-github
Copy link
Copy Markdown

Superconductor is workingView implementation | App Preview


I'll get back to you soon!

@cycomachead
Copy link
Copy Markdown
Contributor

This looks great!

I might have a couple more comments, but I think two things are worth addressing:

So, I think you can merge main+379 into your branch. We should then figure out what the syntax is to have cron jobs.
I assume we essentially want 2 cron jobs scheduled in good job, one with the weekly argument, and a daily job with the daily argument?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Instructors should get email notifications for pending requests

2 participants