Skip to content
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

MIN: Set Expiry Date for EDX User #1567

Merged
merged 5 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions backend/src/components/edx/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,8 @@ async function districtUserActivationInvite(req, res) {
}

const payload = {
...req.body
...req.body,
edxUserExpiryDate: req.body.edxUserExpiryDate
};
try {
const response = await utils.postData(token, config.get('server:edx:districtUserActivationInviteURL'), payload, null, utils.getUser(req).idir_username);
Expand All @@ -536,7 +537,8 @@ async function schoolUserActivationInvite(req, res) {
}

const payload = {
...req.body
...req.body,
edxUserExpiryDate: req.body.edxUserExpiryDate
};
try {
const response = await utils.postData(token, config.get('server:edx:schoolUserActivationInviteURL'), payload, null, utils.getUser(req).idir_username);
Expand Down Expand Up @@ -580,6 +582,7 @@ async function updateEdxUserSchoolRoles(req, res) {

selectedUserSchool.updateDate = null;
selectedUserSchool.createDate = null;
selectedUserSchool.expiryDate = req.body.params.expiryDate;

const result = await utils.putData(token, `${config.get('server:edx:edxUsersURL')}/${selectedUserSchool.edxUserID}/school`, selectedUserSchool, userInfo.idir_username);
return res.status(HttpStatus.OK).json(result);
Expand Down Expand Up @@ -621,6 +624,7 @@ async function updateEdxUserDistrictRoles(req, res) {

selectedUserDistrict.updateDate = null;
selectedUserDistrict.createDate = null;
selectedUserDistrict.expiryDate = req.body.params.expiryDate;

const result = await utils.putData(token, `${config.get('server:edx:edxUsersURL')}/${selectedUserDistrict.edxUserID}/district`, selectedUserDistrict, userInfo.idir_username);
return res.status(HttpStatus.OK).json(result);
Expand Down
158 changes: 93 additions & 65 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@fortawesome/fontawesome-free": "6.4.0",
"@js-joda/core": "^5.5.3",
"@mdi/font": "^7.2.96",
"@vuepic/vue-datepicker": "^4.2.0",
"axios": "^1.4.0",
"chart.js": "^4.3.0",
"chartjs-plugin-datalabels": "^2.2.0",
Expand Down
Loading