Skip to content

Commit

Permalink
SAK-41057: edu-services > external GB item 'release to students' sett…
Browse files Browse the repository at this point in the history
…ing overwritten on update (sakaiproject#6358)
  • Loading branch information
bjones86 authored Dec 10, 2018
1 parent 21b1f65 commit e971347
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class GradebookAssignment extends GradableObject {
@Getter @Setter private String externalId;
@Getter @Setter private String externalAppName;
@Getter @Setter private String externalData;
@Setter private Boolean released;
@Setter @Getter private Boolean released;
@Getter @Setter private Category category;
@Getter @Setter private Double averageTotal;
@Setter private Boolean ungraded;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.concurrent.ConcurrentMap;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.BooleanUtils;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.criterion.Projections;
Expand Down Expand Up @@ -239,7 +240,7 @@ public Object doInHibernate(final Session session) throws HibernateException {
asn.setName(title);
asn.setDueDate(dueDate);
// support selective release
asn.setReleased(true);
asn.setReleased(BooleanUtils.isTrue(asn.getReleased()));
asn.setPointsPossible(Double.valueOf(points));
session.update(asn);
log.info("External assessment updated in gradebookUid={}, externalId={} by userUid={}", gradebookUid, externalId,
Expand Down Expand Up @@ -780,7 +781,7 @@ public void updateExternalAssessment(final String gradebookUid, final String ext
asn.setName(title);
asn.setDueDate(dueDate);
// support selective release
asn.setReleased(true);
asn.setReleased(BooleanUtils.isTrue(asn.getReleased()));
asn.setPointsPossible(points);
if (ungraded != null) {
asn.setUngraded(ungraded.booleanValue());
Expand Down

0 comments on commit e971347

Please sign in to comment.