Skip to content
Snippets Groups Projects
Commit 53f10c5d authored by strentini's avatar strentini
Browse files

OLAT-6375 : user can no longer delete own portfolio-task after it was handed...

OLAT-6375 : user can no longer delete own portfolio-task after it was handed in. (delete-link is no longer displayed)

--HG--
branch : uzhFixes711
parent da104d76
No related branches found
No related tags found
No related merge requests found
...@@ -167,12 +167,18 @@ public class EPMultipleMapController extends BasicController implements Activate ...@@ -167,12 +167,18 @@ public class EPMultipleMapController extends BasicController implements Activate
vLink.setUserObject(map); vLink.setUserObject(map);
vLink.setCustomEnabledLinkCSS("b_with_small_icon_right b_open_icon"); vLink.setCustomEnabledLinkCSS("b_with_small_icon_right b_open_icon");
boolean myMaps = (option.equals(EPMapRunViewOption.MY_DEFAULTS_MAPS) || option.equals(EPMapRunViewOption.MY_EXERCISES_MAPS));
//can always try to delete your own map, but exercise only if the course was deleted //can always try to delete your own map, but exercise only if the course was deleted
vC.remove(vC.getComponent(DELETE_LINK_PREFIX + i)); // remove as update could require hiding it vC.remove(vC.getComponent(DELETE_LINK_PREFIX + i)); // remove as update could require hiding it
if(myMaps) { // can always try to delete your own map, but exercise only if the course was deleted
Link dLink = LinkFactory.createCustomLink(DELETE_LINK_PREFIX + i, "delMap" + map.getResourceableId(), "delete.map", final boolean myMaps = (option.equals(EPMapRunViewOption.MY_DEFAULTS_MAPS) || option.equals(EPMapRunViewOption.MY_EXERCISES_MAPS));
Link.LINK, vC, this); boolean addDeleteLink = myMaps;
if((map instanceof EPStructuredMap) && (((EPStructuredMap) map).getReturnDate() != null)){
addDeleteLink = false; //it's a portfolio-task that was already handed in, so do not display delete-link
}
if (addDeleteLink) {
final Link dLink = LinkFactory.createCustomLink(DELETE_LINK_PREFIX + i, "delMap" + map.getResourceableId(), "delete.map", Link.LINK, vC, this);
dLink.setCustomEnabledLinkCSS("b_with_small_icon_left b_delete_icon"); dLink.setCustomEnabledLinkCSS("b_with_small_icon_left b_delete_icon");
dLink.setUserObject(map); dLink.setUserObject(map);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment