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

Task: some enhancements for the collect workflow

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.5
    • Fix Version/s: 12.5.5
    • Component/s: Task
    • Labels:
      None

      Description

      There are some problems concerning the automatical collection of tasks with a due date:

      When a coach selects a student the task is automatically collected, even if there are no documents uploaded by the student. Also a notification is sent which can confuse the coach in this case. The preferable behaviour is that a coach can collect tasks manually at any time.

      When a student selects a task with an exceeded due date, the task is collected automatically and the student gets an info message that the task is beeing collected.

      Right now the coach does not know if a student has uploaded a solution. It would be better if the coach is informed that the student has uploaded a document but not yet submitted.

      This patch implements that:

      diff --git a/src/main/java/org/olat/course/nodes/gta/ui/GTAAbstractController.java b/src/main/java/org/olat/course/nodes/gta/ui/GTAAbstractController.java
      --- a/src/main/java/org/olat/course/nodes/gta/ui/GTAAbstractController.java
      +++ b/src/main/java/org/olat/course/nodes/gta/ui/GTAAbstractController.java
      @@ -364,8 +364,11 @@
       						&& date.compareTo(new Date()) < 0) {
       					//push to the next step
       					int numOfDocs = getNumberOfSubmittedDocuments();
      -					assignedTask = gtaManager.submitTask(assignedTask, gtaNode, numOfDocs, Role.auto);
      -					doUpdateAttempts();
      +					if (numOfDocs > 0 || getDoer() != Role.coach) {
      +						assignedTask = gtaManager.submitTask(assignedTask, gtaNode, numOfDocs, Role.auto);
      +						doUpdateAttempts();
      +						if (numOfDocs > 0) this.showInfo(translate("info.task.collected"), "");
      +					}
       				}
       			} else if(dueDate.getMessageKey() != null) {
       				mainVC.contextPut("submitDueDateMsg", translate(dueDate.getMessageKey(), dueDate.getMessageArg()));
      diff --git a/src/main/java/org/olat/course/nodes/gta/ui/GTACoachController.java b/src/main/java/org/olat/course/nodes/gta/ui/GTACoachController.java
      --- a/src/main/java/org/olat/course/nodes/gta/ui/GTACoachController.java
      +++ b/src/main/java/org/olat/course/nodes/gta/ui/GTACoachController.java
      @@ -248,6 +248,16 @@
       				TextFactory.createTextComponentFromI18nKey("submittedDocs", "coach.submitted.nofiles", getTranslator(), null, true, mainVC);			
       			}
       		}
      +		else {
      +			File documentsDir;
      +			if(GTAType.group.name().equals(config.getStringValue(GTACourseNode.GTASK_TYPE))) {
      +				documentsDir = gtaManager.getSubmitDirectory(courseEnv, gtaNode, assessedGroup);
      +			} else {
      +				documentsDir = gtaManager.getSubmitDirectory(courseEnv, gtaNode, assessedIdentity);
      +			}
      +			boolean hasDocuments = TaskHelper.hasDocuments(documentsDir);
      +			mainVC.contextPut("hasUploadedDocs", hasDocuments);
      +		}
       		return assignedTask;
       	}
       	
      @@ -263,8 +273,9 @@
       	}
       	
       	private void collect(Task assignedTask) {
      +		Date now = new Date();
       		DueDate dueDate = getSubmissionDueDate(assignedTask);
      -		if(!coachCourseEnv.isCourseReadOnly() && (dueDate == null || dueDate.getDueDate() == null)) {
      +		if(!coachCourseEnv.isCourseReadOnly()) {
       			collectSubmissionsLink = LinkFactory.createButton("coach.collect.task", mainVC, this);
       			collectSubmissionsLink.setUserObject(assignedTask);
       		}
      diff --git a/src/main/java/org/olat/course/nodes/gta/ui/_content/coach.html b/src/main/java/org/olat/course/nodes/gta/ui/_content/coach.html
      --- a/src/main/java/org/olat/course/nodes/gta/ui/_content/coach.html
      +++ b/src/main/java/org/olat/course/nodes/gta/ui/_content/coach.html
      @@ -54,7 +54,11 @@
       		#else
       			<b>$r.translate("coach.waiting.submitted.documents")</b>
       			<br />
      -			$r.translate("coach.waiting.submitted.documents.description")
      +			#if($hasUploadedDocs)
      +				$r.translate("coach.waiting.submitted.documents.ready.description")
      +			#else 
      +				$r.translate("coach.waiting.submitted.documents.description")
      +			#end
       		#end
       		#if($r.available("coach.collect.task") && $r.visible("coach.collect.task"))
       			<h5>$r.translate("coach.collect.confirm.title")</h5>
      diff --git a/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_de.properties
      --- a/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_de.properties
      +++ b/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_de.properties
      @@ -63,6 +63,7 @@
       coach.waiting.assignment.description=Die Aufgabe wurde noch nicht zugewiesen. Die Abgabe und Korrektur kann erst beginnen wenn eine Aufgabe zugewiesen wurde. 
       coach.waiting.submitted.documents=Warten auf Abgabe L\u00F6sung
       coach.waiting.submitted.documents.description=Es wurden noch keine Dokumente abgegeben. Die R\u00FCckgabe und Korrektur kann erst beginnen wenn die gel\u00F6ste Aufgabe abgegeben wurde. 
      +coach.waiting.submitted.documents.ready.description=Es wurden Dokumente hochgeladen, aber noch nicht abgegeben. Die R\u00FCckgabe und Korrektur kann erst beginnen wenn die gel\u00F6ste Aufgabe abgegeben wurde. 
       comment=Kommentar
       condition.accessibility.title=Zugang
       confirm.delete.solution.description=Wollen Sie wirklich die L\u00F6sung "{0}" l\u00F6schen?
      @@ -120,6 +121,7 @@
       group.score=Gruppe Punkte
       group.title=Leistungs\u00FCbersicht
       highscore.forminfo=Die HighScore Funktionalit\u00E4t bezieht sich auf die einzelnen Mitglieder einer Gruppe. Ein Vergleich auf Ebene der Gruppen ist nicht m\u00F6glich.
      +info.task.collected=Die hochgeladenen Dokumente wurden automatisch eingezogen.
       info.task.reset.allowed=Die Aufgabe wurde zur\u00FCckgesetzt. Der Teilnehmer kann dies nun best\u00E4tigen.
       info.title=$org.olat.course.nodes.ms\:info.title
       lastmodified=am {0}
      @@ -154,7 +156,7 @@
       notifications.solution.task=F\u00FCr die Aufgabe "{0}" im Kurs "{1}" steht die folgende Musterl\u00F6sung zum Download bereit\: "{2}".
       notifications.submission.group=Die Aufgabe "{0}" im Kurs "{1}" wurde f\u00FCr Gruppe "{2}" abgegeben.
       notifications.submission.group.doc=F\u00FCr die Aufgabe "{0}" im Kurs "{1}" wurde ein neues Dokument "{2}" von "{3}" f\u00FCr Gruppe "{4}" hochgeladen.
      -notifications.submission.individual=Die Aufgabe "{0}" im Kurs "{1}" wurde von "{2}" abgegeben.
      +notifications.submission.individual=Die Aufgabe "{0}" im Kurs "{1}" wurde von "{2}" ohne L\u00F6sung abgegeben.
       notifications.submission.individual.doc=F\u00FCr die Aufgabe "{0}" im Kurs "{1}" wurde ein neues Dokument "{2}" von "{3}" hochgeladen.
       open.group=Gruppe \u00F6ffnen
       pane.tab.accessibility=Zugang
      diff --git a/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_en.properties
      --- a/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_en.properties
      +++ b/src/main/java/org/olat/course/nodes/gta/ui/_i18n/LocalStrings_en.properties
      @@ -63,6 +63,7 @@
       coach.waiting.assignment.description=The task has not been assigned yet. The submission and reviewing process can only be started when the task has been assigned first. 
       coach.waiting.submitted.documents=Waiting for documents
       coach.waiting.submitted.documents.description=No documents have been submitted so far. The reviewing can only be started when a final submission has been made. 
      +coach.waiting.submitted.documents.ready.description=There are uploaded documents which have not been submitted so far. The reviewing can only be started when a final submission has been made. 
       comment=Comments
       condition.accessibility.title=Access
       confirm.delete.solution.description=Do you want to delete the solution "{0}"?
      @@ -120,6 +121,7 @@
       group.score=Group score
       group.title=Score summary
       highscore.forminfo=The high-score feature refers to the members of a group. A comparison on group level is not available. 
      +info.task.collected=The uploaded documents have been collected automatically.
       info.task.reset.allowed=The task has been reset. The participant can confirm it now.
       info.title=$org.olat.course.nodes.ms\:info.title
       lastmodified=at {0}
      @@ -154,7 +156,7 @@
       notifications.solution.task=For the task "{0}" in the course "{1}" the following sample solution is available for download\: "{2}".
       notifications.submission.group=The task "{0}" in course "{1}" was submitted for the group "{2}".
       notifications.submission.group.doc=\=For the task "{0}" in course "{1}" was a new document "{2}" submitted by "{3}" for the group "{4}".
      -notifications.submission.individual=The task "{0}" in course "{1}" was submitted by "{2}".
      +notifications.submission.individual=The task "{0}" in course "{1}" was submitted by "{2}" without a document.
       notifications.submission.individual.doc=For the task "{0}" in course "{1}" was a new document "{2}" submitted by "{3}".
       open.group=Open group
       pane.tab.accessibility=Access
      

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 20 minutes
                1h 20m