Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-5266

Task: upload button remains disabled when deleting a document

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 15.3.9
    • Fix Version/s: 15.3.10, 15.4.2
    • Component/s: Task
    • Labels:
      None

      Description

      Steps to reproduce: set max=min for the number of documents which can be created or uploaded. When max is reached delete a document and the button for uploading or creating a new document remains disabled.

      Perhaps there is a more elegant way, but this patch fixes that:

      diff --git a/src/main/java/org/olat/course/nodes/gta/ui/SubmitDocumentsController.java b/src/main/java/org/olat/course/nodes/gta/ui/SubmitDocumentsController.java
      index e592d98..d3d8d72 100644
      --- a/src/main/java/org/olat/course/nodes/gta/ui/SubmitDocumentsController.java
      +++ b/src/main/java/org/olat/course/nodes/gta/ui/SubmitDocumentsController.java
      @@ -234,6 +234,12 @@
       	private void updateWarnings() {
       		if(minDocs > 0 && model.getRowCount() < minDocs) {
       			String msg = translate("error.min.documents", new String[]{ Integer.toString(minDocs) });
      +			if(uploadDocButton != null) {
      +				uploadDocButton.setEnabled(true);
      +			}
      +			if(createDocButton != null) {
      +				createDocButton.setEnabled(true);
      +			}
       			flc.contextPut("minDocsWarning", msg);
       			flc.contextRemove("maxDocsWarning");
       		} else if(maxDocs > 0 && model.getRowCount() >= maxDocs) {
      

        Figma for Jira By 42nd

          Attachments

            Activity

              People

              Assignee:
              srosse Stéphane Rossé
              Reporter:
              stephan Stephan Clemenz
              Tester:
              Mandy Menzel
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: