code: def configure_task_directory(self):
          
          self._display_question(
              "Please choose a directory in which to store the course/task files. By default, the tool will put them in the current "
              "directory")
          task_directory = None
          while task_directory is None:
              task_directory = self._ask_with_default("Task directory", ".")
              if not os.path.exists(task_directory):
                  self._display_error("Path does not exists")
                  if self._ask_boolean("Would you like to retry?", True):
                      task_directory = None
  
          if os.path.exists(task_directory):
              self._display_question("Demonstration tasks can be downloaded to let you discover INGInious.")
              if self._ask_boolean("Would you like to download them ?", True):
                  try:
                      filename, _ = urllib.request.urlretrieve(
                          "https://api.github.com/repos/UCL-INGI/INGInious-demo-tasks/tarball")
                      with tarfile.open(filename, mode="r:gz") as thetarfile:
                          members = thetarfile.getmembers()
                          commonpath = os.path.commonpath([tarinfo.name for tarinfo in members])
  
                          for member in members:
                              member.name = member.name[len(commonpath) + 1:]
                              if member.name:
                                  thetarfile.extract(member, task_directory)
  
                      self._display_info("Successfully downloaded and copied demonstration tasks.")
                  except Exception as e:
                      self._display_error("An error occurred while copying the directory: %s" % str(e))
          else:
              self._display_warning("Skipping copying the 'test' course because the task dir does not exists")
  
          return {"tasks_directory": task_directory}
docs: Configure task directory