Skip to content

Commit

Permalink
LSNBLDR-782; updating text creates a new item (sakaiproject#3919)
Browse files Browse the repository at this point in the history
  • Loading branch information
clhedrick authored Feb 14, 2017
1 parent ef3642c commit d38b973
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lessonbuilder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ Checklist for adding code to Lessons:
the page to do that.) Note that layout at the top is slightly
different when it's the second tool, because there's no way
lessons can change the header for the tool.
* Make sure that the backend code that adds or changes items
does a single hibernate operation: save, update or saveOrUpdate.
See LSNBLDR-722 for a full explanation. Old code often created
an item and then fixed up fields. That can cause trouble.
* Code that plays with sequence numbers will need to call setRefreshMode
at the beginning. It must be called before any items on the page
have been loaded into the Session.

For new code I encourage doing something that isn't in the original code
but should have been:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ else if (filterSpec.equalsIgnoreCase("none"))
item.setHtml(html);
item.setPrerequisite(this.prerequisite);
setItemGroups(item, selectedGroups);
saveItem(item);
saveOrUpdate(item);
} else {
rv = "cancel";
}
Expand Down

0 comments on commit d38b973

Please sign in to comment.