giseldo/neodataset huggingface dataset:
Create flagging service to replace current flag functions

Rip out all flagging code from FeedbackService and SessionService/Utils ~~to create a new FlaggingService. This service should handle all flagging logic and determining when a session should be included in session review. Invoke the new service in the end session and save feedback code.~~

~~Code that checks flags can be implemented something like below. The `getPopulatedSession` function will need to return a an object that meets the spec of the `PopulatedSession` interface as defined by ticket #832 
NOTE: you can optimize the flag filters by partitioning out session flags vs feedback flags so they don't get double checked~~
```
function checkFlags(sessionId) {
  session = getPopulatedSession(sessionId)
  flags = []
  review = false
  for (flag in ALL_FLAGS) {
    if (flag.qualifies(session)) {
      flags.push(flag)
      if (flag.toReview(session)) review = true
    }
  }
}
session.updateFlags(Array.map(flag => flag.key))
session.update({ toReview })
```

## Deployment
Hold off on deploying until the frontend filter changes (#835) is completed. Merge that work onto this branch and deploy them all at once

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session
- [ ] Completed sessions get flagged correctly

Story points: 3.0
Create Flag objects for all new flags

Create flag objects that look like the interface below based on the rules/examples on the epic. Will also need to define the `PopulatedSession` interface for the code that will call these functions.
```
interface Flag {
  key: string,  // for legacy keying
  displayName: string, 
  toReview: async (session: PopulatedSession): Promise<boolean>,
  qualifies: async (session: PopulatedSession): Promise<boolean>
}

function checkFlags(sessionId) {
  session = getPopulatedSession(sessionId)
  flags = []
  review = false
  for (flag in ALL_FLAGS) {
    if (flag.qualifies(session)) {
      flags.push(flag)
      if (flag.toReview(session)) review = true
    }
  }
}
session.updateFlags(Array.map(flag => flag.key))
session.update({ toReview })
```

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Add check on every message for activity promt cache key

When a new session is created add a cache key for something like `${sessionId}-activity-prompt-sent = false`. In the socket router session message handler add a check for this cache key. If it is set to true kick off a new round of notifications and remove the key otherwise do nothing different than before.

This can be deployed without the bot since unless the key is set to true this logic should be a no-op.

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Create job to handle chat bot flow chart

To keep the logic all in one place we should have a single job that implements all the chatbot flow chart decision logic. The job can re-queue itself with different timings and parse the session message history to know where in the chart it is.

Also add a quick handler to app server to check for socket event `activity-prompt-sent` with the sessionID in the payload.

[Flowchart](https://docs.google.com/drawings/d/1wOGuFaH1r5YBe3Ob9BgpyYqIG0dRIqWSxOvI-5qB45s/edit)

## Tasks
- [x] Code review
- [x] Add doppler API key to staging
- [x] Run staging migration script
- [x] Staging smoke tests
- [x] Merge to main
- [x] Add doppler API key to prod
- [x] Run prod migration script
- [ ] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session
- [x] Chatbot flow chart is followed correctly (minus notifications going out)
- [x] Server handling new socket event for activity prompt

Story points: 3.0
Check for volunteer already notified for the session to twilio.notifyVolunteer

When we find volunteers to be notified for a session we don't want to repeat a volunteer so add this check to `twilio.js:notifyVolunteer`

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session
- [ ] Volunteers still notified for sessions

Story points: 2.0
Send historical ASSISTments data to ASSISTments

* Write a script that backfills ASSISTments session data to ASSIStments
* Following same contract as in #821 .
* Should take a datetime OR a pair of datetimes, AND an auth token
  * If given a datetime, should backfill all sessions prior to that date
  * If given a pair of datetimes, should backfill any sessions where the `sent` key is false or does not exist between those datetimes
* Should be rate limited to 1 per second

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod
- [x] Run backfill script
- [x] Flip feature flag

Story points: 2.0
Migration: Fix the student_favorite_volunteers table to remove self-favorited volunteers

Due to the bug described in https://gitlab.com/upchieve/subway/-/issues/1210, volunteers were being stored under `student_id` and `volunteer_id` in the student_favorite_volunteers. We need to create a migration that removes those self-favorited volunteers from the table and the relevant user actions that follows those events

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
BUG: Volunteers are seeing an error message that they have reached the favoriting limit

A volunteer that they kept getting a message that the "Favorite volunteer limit reached." when ending a session and when submitting the post-session form. Our checks to see if a user is a volunteer is failing and causing volunteers to self-favorite themselves

Fixed in https://gitlab.com/upchieve/subway/-/merge_requests/1168

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Investigate issue where some volunteers do not see the results page after taking a quiz

"It appears there is a bug with our ceritfications. A couple of coaches complained after submitting they never advanced past getting your results page. (Volunteer name) was on microsoft edge on a PC, Windows 11,"

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
BUG: US History cert failing

![Screen_Shot_2022-06-30_at_8.48.36_AM](/uploads/f0bcc6b44fd44b778b1ce132049c901c/Screen_Shot_2022-06-30_at_8.48.36_AM.png)

![Screen_Shot_2022-06-30_at_9.15.03_AM](/uploads/1f06ae9d122adfcb93dd40a701e8cbad/Screen_Shot_2022-06-30_at_9.15.03_AM.png)

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Keep Historical Data: Turn off links for corporate partnerships

Change logic around how app creates partner links to not allow links for disabled or inactive partners so people can't keep signing up for them - Instead this should redirect users to regular sign up page https://app.upchieve.org/sign-up

- relevant file: src/views/StudentPartnerSignupView.vue
- Add check if partner is valid

Open Question for Katie O: Do we add a message for previous partners? **Answer:** Yes I think we should at some point when we are ready - so for now keep as is
   

## Tasks
- [x] Posthog event user visited inactive partner link
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Keep Historical Data: Write scripts to move data to new schema

We need to migrate are existing data from all relationships below from their creation point 

May need to do research here to make sure we do this correct 

Need estimated dates (month and year) for when sponsor orgs, volunteer partners, student partners, (any org) joined

Assume that current lengths are correct for rest of relationships - from time person joined or org was created 

Need to migrate data to schema created here https://gitlab.com/upchieve/subway/-/issues/1175

Note: Make it clear not to run again - Maybe goes into another directory for one time data migrations 

**Likely places that will require code changes:**
- notification groups
- hour summary on dashboard
- reports (own story)
- weekly emails
- sign ups (own story)
- chron jobs, queued jobs, partner jobs
- sponsor orgs (own story)

**Relationships:**

* Sponsor Orgs -> Student Partner Orgs
* Sponsor Orgs -> Schools
* Schools -> Student Profiles
* Volunteer Partner Orgs -> Volunteer Profiles
* Associated Partners -> Student Partner Orgs
* Associated Partners -> Sponsor Orgs
* Associated Partners -> Volunteer Partner Orgs  

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [ ] **Once Scripts and code changes are made reassess what we want to test** 
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session

Story points: 5.0
Keep Historical Data: Create schema

**Migration files that create a schema that can receive new data and historical data that covers all these use cases while maintaining compatibility with current code ie we may remove partner org id from partner org but that will need to be staged with code changes**

**If there are code changes forced by the new schema then put notes for updates here https://gitlab.com/upchieve/subway/-/issues/1176**

Edge Cases:

* What if a sponsor orgs stops sponsoring a s schools or nonprofit?
* What if a volunteer changes companies?
  * What if a volunteer is not part of a company and then joins one?
* What if a student leaves one of our nonprofit partners?
* What if a paid partner org churns?
* What if a student changes schools?
* What if any of above reverse? - this happens most with sponsor orgs
  * What if a person goes back to working at a company they left
* What if a student becomes a volunteer
* What if a student graduates? 
* What activities did student take when in certain grade level?

Metadata:

* StartDate
* EndDate
* LastUpdatedBy - user admin system 

Relationships:

- Sponsor Orgs -> Student Partner Orgs
- Sponsor Orgs -> Schools
- Schools -> Student Profiles 
- Volunteer Partner Orgs -> Volunteer Profiles
- Associated Partners -> Student Partner Orgs
- Associated Partners -> Sponsor Orgs
- Associated Partners -> Volunteer Partner Orgs

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Write queries that we can update or read all Edge Cases to ensure schema is working as expected
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 8.0
Launch "Environmental Science" as subject to students (web)

Example Reading: https://gitlab.com/upchieve/subway/-/merge_requests/1065

Create feature flag for this 
Make sure to update route with feature flag too

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
HEIC photo conversion for desktop

Here is a wrap up from a spike that we did on whether the HEIC photo conversion should be on the frontend or backend: https://gitlab.com/upchieve/subway/-/issues/1068#note_1004437374

Here's another [comment](https://gitlab.com/upchieve/subway/-/issues/1068#note_1002783111) that goes more into the finding of what happened when the photo upload operations and the conversion was moved to the backend

A majority of the implementation was drafted in this MR https://gitlab.com/upchieve/subway/-/merge_requests/1111 while investigating the upload speeds of the conversion on the client-side. That can be used as a base to close out this ticket

The remaining work that is left
- Fixing the tests
- Better UX for error handling
- Better way to determine if a user is on a desktop browser instead of relying on the screensize

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Students can upload an HEIC file to whiteboard 
- [ ] Students can upload jpeg, png, and gif images to whiteboard
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Launch " Environmental Science": Update materials for volunteers

![Screen_Shot_2022-06-21_at_2.42.03_PM](/uploads/9feba232946c6d84bf657dd045f86dbd/Screen_Shot_2022-06-21_at_2.42.03_PM.png)

hyphen in subject name was removed in files above to match file names for example `environmentalscience-topics-and-resources.pdf`

Update materials from "Sorry, review materials for Environmental Science are currently under development. Check back soon!" to material links above 

https://app.upchieve.org/training/review/environmental-science

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Web Socket Observability: Clean up code to not use promise chaining - instead await

Code is hard to read because instantiates new promises instead of awaiting - cleaning this will help reading code and this will help with other issues in epic

**This is in sockets.ts**

Need to add unit tests

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
* [x] Ensure volunteers can still see sessions to pick up from dashboard
* [x] Sending and receiving messages during sessions
* [x] Reset whiteboard during session
* [x] Quill doc updating and reseting during session
* [x] Refresh get correct state of document during a session
* [x] Typing indicator during session (shows correctly when person is typing and when person is not typing)
* [x] Student/volunteer can login
* [x] Student/volunteer can make/join session
* [x] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Web Socket Observability: Replace passport-socket.io

Gives instructions on how to replace here: https://github.com/jfromaniello/passport.socketio/issues/148#issue-865236471

We should have accurate typing after this is done 

## Tasks
- [x] Code review
- [x] Staging smoke tests
- [x] Merge to main
- [x] Deploy to prod

## Smoke tests
- [x] Ensure volunteers can still see sessions to pick up from dashboard
- [x] Sending and receiving messages during sessions
- [x] Reset whiteboard during session 
- [x] Quill doc updating and reseting during session
- [x] Refresh get correct state of document during a session
- [x] Typing indicator during session (shows correctly when person is typing and when person is not typing) 
- [x] Student/volunteer can login
- [x] Student/volunteer can make/join session
- [x] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
BUG: References cannot submit the reference form when the view is in mobile mode

Related gleap report: https://app.gleap.io/share/gCT8JvtkIhXykPklYHVycPMEJzY3o5HHQYkLlR4TAxgphQxp5xWoPnhkjUCaKf247Rk8xR

As shown in the screenshot, the submit button is still grayed out even after answering all of the questions on the form. 
Looking at the Vue devtools, the state `"multipleRadioResponse"` for ReferenceForm.vue never gets populated with the answers from questions with dropdowns


## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Summer Program: Turn off flag and Clean up code

Turn off flag on July 26th
Clean up code 
- remove flag
- remove banner
- clean all references

https://gitlab.com/upchieve/subway/-/issues/1135 created summer program banners. They'll stop showing up after 7/26 - this ticket is to remove the code from the associated MR https://gitlab.com/upchieve/subway/-/merge_requests/1101/diffs

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Summer Program: Turn on Flag for web banner

Turn on Flag when ready to go live with banner 

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 0.0
SPIKE: Verizon Mobile App Stats

Time Box: 2 Days

**Answer these Questions:**
1. What is possible to pull from app store?
2. Can we match up the data and determine how many VILS students in-particular downloaded or updated the app not  just total number of downloads?
3. Is there another way to tell a VILS student user is using mobile app besides them making a request on mobile app?
4. Is there a benefit of integrating with API?
5. Can we get % of app downloads that have no activity? 

**Some things we can try:**
1. Maybe we can do logical explanation for why we believe X% of downloads are VILS students
2. number of downloads from app store minus number of VILS students who have made a request on mobile = non-vils students who have downloaded app

**Note from Dave:**
Some of this is going to come from Posthog as well, in that we should be able to pull and correlate VILS students from there, by getting the user IDs that take some action there then getting if that ID is a VILS student from the database or adding a new property in Posthog and backfilling it

Slack: https://upchieve.slack.com/archives/G0161HX53SM/p1655153007045299

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Summer Program: Create banner (web)

banner to show to students with at least one session and not banned or reported something like "Sign up for our Summer College Prep Programs" link to bit.ly/upchievesummer

- Read if any sessions off legacy user object 
- Show banner or not 
- Feature flag to show or hide 
- Replicate down time banner and change text to this 

Open Questions:
1. Confirm this is **at least** one session? **Answer:** Yes
2. When is this needed? If possible **Answer:** Jun 22 - wait for Bailey to confirm before launching 

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Summer Program: Push notifications: Create job to send notification

looks at their token and payload - need to figure out how to format payload for firebase

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
Summer Program: Push notifications: Spike does firebase still work with new app?

If this does not work we will need additional time to investigate this me be bigger

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
BUG: Undefined text shows when Can't find school is selected from school search autocomplete component

Time box: 2

The input says `undefined` when clicking on "Can't find school" - this should not show the undefined object should show nothing or "Can't find school" text

![Screen_Recording_2022-06-07_at_5.36.10_PM](/uploads/12405a37f71267547f8855f580e6066e/Screen_Recording_2022-06-07_at_5.36.10_PM.mov)
## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0
BUG: Investigate if students can/can't upload images

Investigate to see if we can recreate this issue. - Create follow up issue to fix after confirming issue and understanding what is happening 

Thread: https://upchieveaccommunity.slack.com/archives/C01E128V8R4/p1653343792207799

```
Asking for a feature to upload pictures onto the whiteboard. I've had many students who wanted to upload a picture of their work or question and couldn't do so. I mainly ask them to send an imgur link or external applications but would prefer for it to stay on Upchieve.
```

```
The students I've had that uploaded pictures can see them on their end, but I cannot. I have reported the bug in the past and nothing has changed. I've even tried switching to mobile (instead of desktop) and I still can't see it.
```

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 1.0
Launch "U.S. History": DB: Create Social Studies Topic

- Add seeds for social studies topic and US History sub topic
- Add quiz to quizzes table 
- Add certification to certifications table  

![Screen_Shot_2022-06-17_at_8.57.52_AM](/uploads/1892811e10cc4e1f201ec2baf2fa7f5f/Screen_Shot_2022-06-17_at_8.57.52_AM.png)

## Tasks
- [ ] Code review
- [ ] Staging smoke tests
- [ ] Merge to main
- [ ] Deploy to prod

## Smoke tests
- [ ] Student/volunteer can login
- [ ] Student/volunteer can make/join session
- [ ] Student/volunteer can use whiteboard and chat in session

Story points: 2.0