MCPcopy Create free account
hub / github.com/codecombat/codecombat / setStudentPassword

Method setStudentPassword

app/models/Classroom.js:118–135  ·  view source on GitHub ↗
(student, password)

Source from the content-addressed store, hash-verified

116 }
117
118 setStudentPassword (student, password) {
119 const classroomID = this.id
120 return new Promise((resolve, reject) => {
121 return $.ajax({
122 url: `/db/classroom/${classroomID}/members/${student.id}/reset-password`,
123 method: 'POST',
124 data: { password },
125 success: () => {
126 this.trigger('save-password:success')
127 return resolve()
128 },
129 error: response => {
130 this.trigger('save-password:error', response.responseJSON)
131 return reject(response.responseJSON)
132 }
133 })
134 })
135 }
136
137 getLevels (options) {
138 // options: courseID, withoutLadderLevels, projectLevels, assessmentLevels, levelsCollection

Callers 1

onClickChangePasswordMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected