New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instructor copy session: support edit-before-save #11013
Comments
This happened again today. We might have to do a patch first before implementing a proper solution. In this case, I think the 'published emails sent' flag should be copied as-is, to prevent the 'results published' email being sent again. When the instructor changes the publishing date, the flag can be reset. |
@damithc One proposal for this is to:
teammates/src/web/app/pages-instructor/instructor-session-base-page.component.ts Lines 52 to 67 in 3801819
Do you think that works? |
Isn't this simpler? If the email was already sent out in the original session, the flag must be set accordingly in the original to prevent resending the email again. We just need to replicate the same flag in the copy. |
The issue with this is that we do not expose this flag in the API. This flag is only updated by the email action workers. We have to change the The above proposal is much easier - just change existing function (the one I pasted) and update UI. |
Well, I hesitate to change fields arbitrarily. What if the user wanted to keep them as they are? It reduces the value of copying if the user has to go and change things back to original values again. Feels like shifting our work to the user. |
Yes true, it is definitely abit of a hack to change fields arbitrarily. For the proper solution, we may have to change the feature a little. Right now, we allow for one session to be copied to multiple courses. Do we want to make it one-to-one instead? You have to copy one at a time but you will get a form modal with the details. |
Perhaps whatever the changes user specifies in the second modal can be copied to all target courses? We don't allow specifying different values for different copies. |
Yup I think that works! |
Current: When an instructor copies a session, start/end/publish dates are copied as is. The user has to change those dates via a subsequent edit operation.
The problem: For the brief period, the session is saved with possibly wrong dates. On a rare case, the hourly email generation scripts can run during that period, generating automated emails incorrectly. Happened once recently, sending 'session published' emails for a session incorrectly.
Suggested: When the user clicks the copy button, open a modal containing the full details of the session (i.e., same as the form used when editing an existing session) and allow the user to edit any field, before saving the session. This way, the session will not exist with incorrect dates, even for a brief period.
Complication: How to deal with this case when copying to multiple courses?
The text was updated successfully, but these errors were encountered: