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

Task: upload button remains disabled when deleting a document

    XMLWordPrintable

    Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 15.3.9
    • 15.3.10, 15.4.2
    • Task
    • 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) {
      

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: