use of org.olat.course.condition.additionalconditions.PasswordStore in project OpenOLAT by OpenOLAT.
the class CourseNodePasswordManagerImpl method updatePwd.
/**
* @see de.bps.course.nodes.CourseNodePasswordManager#updatePwd(org.olat.core.id.Identity, java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public void updatePwd(Identity identity, String nodeIdentifier, Long courseId, String value) {
AdditionalConditionAnswerContainer answers = getAnswerContainer(identity);
if (answers == null) {
answers = new AdditionalConditionAnswerContainer();
}
PasswordStore pwdStore = (PasswordStore) answers.getAnswers(nodeIdentifier, courseId);
if (pwdStore != null) {
pwdStore.setPassword(value);
} else {
PasswordStore store = new PasswordStore();
store.setPassword(value);
store.setNodeIdent(Long.valueOf(nodeIdentifier));
store.setCourseId(Long.valueOf(courseId));
answers.insertAnswer(nodeIdentifier, courseId, store);
}
persistAnswerContainer(identity, answers);
}
use of org.olat.course.condition.additionalconditions.PasswordStore in project openolat by klemens.
the class CourseNodePasswordManagerImpl method updatePwd.
/**
* @see de.bps.course.nodes.CourseNodePasswordManager#updatePwd(org.olat.core.id.Identity, java.lang.String, java.lang.String, java.lang.String)
*/
@Override
public void updatePwd(Identity identity, String nodeIdentifier, Long courseId, String value) {
AdditionalConditionAnswerContainer answers = getAnswerContainer(identity);
if (answers == null) {
answers = new AdditionalConditionAnswerContainer();
}
PasswordStore pwdStore = (PasswordStore) answers.getAnswers(nodeIdentifier, courseId);
if (pwdStore != null) {
pwdStore.setPassword(value);
} else {
PasswordStore store = new PasswordStore();
store.setPassword(value);
store.setNodeIdent(Long.valueOf(nodeIdentifier));
store.setCourseId(Long.valueOf(courseId));
answers.insertAnswer(nodeIdentifier, courseId, store);
}
persistAnswerContainer(identity, answers);
}
Aggregations