Skip to content
Snippets Groups Projects
Commit a8e7e9a6 authored by srosse's avatar srosse
Browse files

Merge OpenOLAT 10.4 to OpenOLAT default branch with 26a8a2f115c9ae46aa7ff1ed94a0d70ee21926e7

parents 5e85b848 749d80fc
No related branches found
No related tags found
No related merge requests found
...@@ -319,8 +319,7 @@ public class AssessmentHelper { ...@@ -319,8 +319,7 @@ public class AssessmentHelper {
// - it is of an assessable course node type // - it is of an assessable course node type
boolean hasDisplayableValuesConfigured = false; boolean hasDisplayableValuesConfigured = false;
boolean hasDisplayableUserValues = false; boolean hasDisplayableUserValues = false;
if ( (childrenData.size() > 0 || courseNode instanceof AssessableCourseNode) && !(courseNode instanceof ProjectBrokerCourseNode) ) { if (childrenData.size() > 0 || courseNode instanceof AssessableCourseNode) {
// TODO:cg 04.11.2010 ProjectBroker : no assessment-tool in V1.0 , remove projectbroker completely form assessment-tool gui
// Store node and user data in object array. This object array serves as data model for // Store node and user data in object array. This object array serves as data model for
// the user assessment overview table // the user assessment overview table
Map<String,Object> nodeData = new HashMap<String, Object>(); Map<String,Object> nodeData = new HashMap<String, Object>();
...@@ -332,7 +331,10 @@ public class AssessmentHelper { ...@@ -332,7 +331,10 @@ public class AssessmentHelper {
nodeData.put(KEY_TITLE_LONG, courseNode.getLongTitle()); nodeData.put(KEY_TITLE_LONG, courseNode.getLongTitle());
nodeData.put(KEY_IDENTIFYER, courseNode.getIdent()); nodeData.put(KEY_IDENTIFYER, courseNode.getIdent());
if (courseNode instanceof AssessableCourseNode) { if(courseNode instanceof ProjectBrokerCourseNode) {
//ProjectBroker : no assessment-tool in V1.0 , remove project broker completely form assessment-tool gui
nodeData.put(KEY_SELECTABLE, Boolean.FALSE);
} else if (courseNode instanceof AssessableCourseNode) {
AssessableCourseNode assessableCourseNode = (AssessableCourseNode) courseNode; AssessableCourseNode assessableCourseNode = (AssessableCourseNode) courseNode;
ScoreEvaluation scoreEvaluation = userCourseEnv.getScoreAccounting().getScoreEvaluation(courseNode); ScoreEvaluation scoreEvaluation = userCourseEnv.getScoreAccounting().getScoreEvaluation(courseNode);
// details // details
......
...@@ -404,7 +404,6 @@ public class AssessmentMainController extends MainLayoutBasicController implemen ...@@ -404,7 +404,6 @@ public class AssessmentMainController extends MainLayoutBasicController implemen
} else if (cmd.equals(CMD_USERFOCUS)) { } else if (cmd.equals(CMD_USERFOCUS)) {
mode = MODE_USERFOCUS; mode = MODE_USERFOCUS;
identitiesList = getAllAssessableIdentities(); identitiesList = getAllAssessableIdentities();
//fxdiff FXOLAT-108: improve results table of tests
doUserChooseWithData(ureq, identitiesList, null, null); doUserChooseWithData(ureq, identitiesList, null, null);
} else if (cmd.equals(CMD_GROUPFOCUS)) { } else if (cmd.equals(CMD_GROUPFOCUS)) {
mode = MODE_GROUPFOCUS; mode = MODE_GROUPFOCUS;
...@@ -1106,8 +1105,7 @@ public class AssessmentMainController extends MainLayoutBasicController implemen ...@@ -1106,8 +1105,7 @@ public class AssessmentMainController extends MainLayoutBasicController implemen
} }
boolean hasDisplayableValuesConfigured = false; boolean hasDisplayableValuesConfigured = false;
if ( (childrenData.size() > 0 || courseNode instanceof AssessableCourseNode) && !(courseNode instanceof ProjectBrokerCourseNode) ) { if (childrenData.size() > 0 || courseNode instanceof AssessableCourseNode) {
// TODO:cg 04.11.2010 ProjectBroker : no assessment-tool in V1.0 , remove projectbroker completely form assessment-tool gui // Store node data in hash map. This hash map serves as data model for
// the user assessment overview table. Leave user data empty since not used in // the user assessment overview table. Leave user data empty since not used in
// this table. (use only node data) // this table. (use only node data)
NodeTableRow nodeData = new NodeTableRow(recursionLevel, courseNode); NodeTableRow nodeData = new NodeTableRow(recursionLevel, courseNode);
...@@ -1121,9 +1119,11 @@ public class AssessmentMainController extends MainLayoutBasicController implemen ...@@ -1121,9 +1119,11 @@ public class AssessmentMainController extends MainLayoutBasicController implemen
nodeData.setOnyx(false); nodeData.setOnyx(false);
} }
} }
if (courseNode instanceof AssessableCourseNode) { if(courseNode instanceof ProjectBrokerCourseNode) {
//ProjectBroker : no assessment-tool in V1.0 , remove project broker completely form assessment-tool gui
nodeData.setSelectable(false);
} else if (courseNode instanceof AssessableCourseNode) {
AssessableCourseNode assessableCourseNode = (AssessableCourseNode) courseNode; AssessableCourseNode assessableCourseNode = (AssessableCourseNode) courseNode;
if ( assessableCourseNode.hasDetails() if ( assessableCourseNode.hasDetails()
|| assessableCourseNode.hasAttemptsConfigured() || assessableCourseNode.hasAttemptsConfigured()
......
...@@ -34,7 +34,6 @@ import java.util.List; ...@@ -34,7 +34,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import org.olat.core.CoreSpringFactory;
import org.olat.core.gui.UserRequest; import org.olat.core.gui.UserRequest;
import org.olat.core.gui.components.form.flexible.FormItem; import org.olat.core.gui.components.form.flexible.FormItem;
import org.olat.core.gui.components.form.flexible.FormItemContainer; import org.olat.core.gui.components.form.flexible.FormItemContainer;
...@@ -56,6 +55,7 @@ import org.olat.core.gui.control.Event; ...@@ -56,6 +55,7 @@ import org.olat.core.gui.control.Event;
import org.olat.core.gui.control.WindowControl; import org.olat.core.gui.control.WindowControl;
import org.olat.core.id.Identity; import org.olat.core.id.Identity;
import org.olat.core.id.UserConstants; import org.olat.core.id.UserConstants;
import org.olat.core.util.StringHelper;
import org.olat.core.util.vfs.LocalFileImpl; import org.olat.core.util.vfs.LocalFileImpl;
import org.olat.core.util.vfs.VFSLeaf; import org.olat.core.util.vfs.VFSLeaf;
import org.olat.course.nodes.CourseNode; import org.olat.course.nodes.CourseNode;
...@@ -68,6 +68,7 @@ import org.olat.course.nodes.projectbroker.service.ProjectBrokerModuleConfigurat ...@@ -68,6 +68,7 @@ import org.olat.course.nodes.projectbroker.service.ProjectBrokerModuleConfigurat
import org.olat.course.nodes.projectbroker.service.ProjectGroupManager; import org.olat.course.nodes.projectbroker.service.ProjectGroupManager;
import org.olat.course.run.environment.CourseEnvironment; import org.olat.course.run.environment.CourseEnvironment;
import org.olat.resource.OLATResource; import org.olat.resource.OLATResource;
import org.springframework.beans.factory.annotation.Autowired;
/** /**
* *
...@@ -86,7 +87,7 @@ public class ProjectEditDetailsFormController extends FormBasicController { ...@@ -86,7 +87,7 @@ public class ProjectEditDetailsFormController extends FormBasicController {
private RichTextElement projectDescription; private RichTextElement projectDescription;
private IntegerElement maxMembers; private IntegerElement maxMembers;
private StaticTextElement projectState; private StaticTextElement projectState;
FormLayoutContainer stateLayout; private FormLayoutContainer stateLayout;
private FileElement attachmentFileName; private FileElement attachmentFileName;
private TextElement projectLeaders; private TextElement projectLeaders;
...@@ -111,9 +112,12 @@ public class ProjectEditDetailsFormController extends FormBasicController { ...@@ -111,9 +112,12 @@ public class ProjectEditDetailsFormController extends FormBasicController {
private final static String[] values = new String[] { "" }; private final static String[] values = new String[] { "" };
private static final int MAX_MEMBERS_DEFAULT = 1; private static final int MAX_MEMBERS_DEFAULT = 1;
private final ProjectBrokerMailer projectBrokerMailer; @Autowired
private final ProjectGroupManager projectGroupManager; private ProjectBrokerMailer projectBrokerMailer;
private final ProjectBrokerManager projectBrokerManager; @Autowired
private ProjectGroupManager projectGroupManager;
@Autowired
private ProjectBrokerManager projectBrokerManager;
/** /**
* Modules selection form. * Modules selection form.
...@@ -127,12 +131,9 @@ public class ProjectEditDetailsFormController extends FormBasicController { ...@@ -127,12 +131,9 @@ public class ProjectEditDetailsFormController extends FormBasicController {
this.courseNode = courseNode; this.courseNode = courseNode;
this.projectBrokerModuleConfiguration = projectBrokerModuleConfiguration; this.projectBrokerModuleConfiguration = projectBrokerModuleConfiguration;
this.enableCancel = enableCancel; this.enableCancel = enableCancel;
projectBrokerMailer = CoreSpringFactory.getImpl(ProjectBrokerMailer.class); customfieldElementList = new ArrayList<>();
projectGroupManager = CoreSpringFactory.getImpl(ProjectGroupManager.class); eventStartElementList = new HashMap<>();
projectBrokerManager = CoreSpringFactory.getImpl(ProjectBrokerManager.class); eventEndElementList = new HashMap<>();
customfieldElementList = new ArrayList<FormItem>();
eventStartElementList = new HashMap<Project.EventType, DateChooser>();
eventEndElementList = new HashMap<Project.EventType, DateChooser>();
initForm(ureq); initForm(ureq);
} }
...@@ -343,12 +344,13 @@ public class ProjectEditDetailsFormController extends FormBasicController { ...@@ -343,12 +344,13 @@ public class ProjectEditDetailsFormController extends FormBasicController {
projectGroupManager.setProjectGroupMaxMembers(getIdentity(), project.getProjectGroup(), maxMembers.getIntValue()); projectGroupManager.setProjectGroupMaxMembers(getIdentity(), project.getProjectGroup(), maxMembers.getIntValue());
projectChanged = true; projectChanged = true;
} }
if (attachmentFileName.getUploadFileName() != null && !attachmentFileName.getUploadFileName().equals("")) { if (StringHelper.containsNonWhitespace(attachmentFileName.getUploadFileName())) {
// First call uploadFiles than setAttachedFileName because uploadFiles needs old attachment name // First call uploadFiles than setAttachedFileName because uploadFiles needs old attachment name
uploadFiles(attachmentFileName); uploadFiles(attachmentFileName);
project.setAttachedFileName(attachmentFileName.getUploadFileName()); project.setAttachedFileName(attachmentFileName.getUploadFileName());
projectChanged = true; projectChanged = true;
} else if (project.getAttachmentFileName() != null && !project.getAttachmentFileName().equals("")) { } else if (StringHelper.containsNonWhitespace(project.getAttachmentFileName())
&& attachmentFileName.getInitialFile() == null) {
// Attachment file has been removed // Attachment file has been removed
project.setAttachedFileName(""); project.setAttachedFileName("");
projectChanged = true; projectChanged = true;
...@@ -396,7 +398,7 @@ public class ProjectEditDetailsFormController extends FormBasicController { ...@@ -396,7 +398,7 @@ public class ProjectEditDetailsFormController extends FormBasicController {
projectBrokerManager.updateProject(project); projectBrokerManager.updateProject(project);
projectBrokerMailer.sendProjectChangedEmailToParticipants(ureq.getIdentity(), project, this.getTranslator()); projectBrokerMailer.sendProjectChangedEmailToParticipants(ureq.getIdentity(), project, this.getTranslator());
} else { } else {
this.showInfo("info.project.nolonger.exist", project.getTitle()); showInfo("info.project.nolonger.exist", project.getTitle());
} }
} }
fireEvent(ureq, Event.DONE_EVENT); fireEvent(ureq, Event.DONE_EVENT);
......
...@@ -1172,7 +1172,7 @@ public class WikiMainController extends BasicController implements CloneableCont ...@@ -1172,7 +1172,7 @@ public class WikiMainController extends BasicController implements CloneableCont
} }
private void clearPortfolioLink(){ private void clearPortfolioLink(){
content.put("portfolio-link", new Panel("empty")); navigationContent.put("portfolio-link", new Panel("empty"));
} }
private Wiki getWiki(){ private Wiki getWiki(){
......
...@@ -22,6 +22,7 @@ package org.olat.portfolio.ui.structel.edit; ...@@ -22,6 +22,7 @@ package org.olat.portfolio.ui.structel.edit;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Locale; import java.util.Locale;
import java.util.concurrent.atomic.AtomicLong;
import org.olat.core.CoreSpringFactory; import org.olat.core.CoreSpringFactory;
import org.olat.core.gui.UserRequest; import org.olat.core.gui.UserRequest;
...@@ -49,11 +50,13 @@ import org.olat.portfolio.ui.filter.PortfolioFilterController; ...@@ -49,11 +50,13 @@ import org.olat.portfolio.ui.filter.PortfolioFilterController;
public class EPCollectRestrictionResultController extends BasicController { public class EPCollectRestrictionResultController extends BasicController {
private final VelocityContainer mainVc; private final VelocityContainer mainVc;
private static final AtomicLong restrictionsCounter = new AtomicLong(1l);
public EPCollectRestrictionResultController(UserRequest ureq, WindowControl wControl) { public EPCollectRestrictionResultController(UserRequest ureq, WindowControl wControl) {
super(ureq, wControl); super(ureq, wControl);
mainVc = createVelocityContainer("restrictions_msg"); mainVc = createVelocityContainer("restrictions_msg");
mainVc.contextPut("restrictionId", Long.toString(restrictionsCounter.getAndIncrement()));
putInitialPanel(mainVc); putInitialPanel(mainVc);
} }
......
#if($messages) #if($messages)
<div class="panel-group" id="o_ep_restrictions"> <div class="panel-group" id="o_ep_restrictions_$restrictionId">
<div class="panel #if($restrictionsPassed) panel-success #else panel-warning #end"> <div class="panel #if($restrictionsPassed) panel-success #else panel-warning #end">
<div class="panel-heading"> <div class="panel-heading">
<h4 class="panel-title"> <h4 class="panel-title">
<a data-toggle="collapse" data-parent="#o_ep_restrictions" href="#collapseMessages">$r.translate("collect.restriction")</a> <a data-toggle="collapse" data-parent="#o_ep_restrictions_$restrictionId" href="#collapseMessages_$restrictionId">$r.translate("collect.restriction")</a>
</h4> </h4>
</div> </div>
<div id="collapseMessages" class="panel-collapse collapse"> <div id="collapseMessages_$restrictionId" class="panel-collapse collapse">
<div class="panel-body"> <div class="panel-body">
#foreach($message in $messages) #foreach($message in $messages)
<p>$message</p> <p>$message</p>
......
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