Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple upload support #712

Open
flbulgarelli opened this issue Nov 29, 2016 · 11 comments
Open

Multiple upload support #712

flbulgarelli opened this issue Nov 29, 2016 · 11 comments

Comments

@flbulgarelli
Copy link
Member

It would be nice that the solution upload support also one the following use cases:

  • Directory upload
  • Multiple files upload
  • A zip file upload
@faloi
Copy link
Contributor

faloi commented Jul 14, 2017

A quick solution for this could be a multiuploader that just concatenates all the files using some kind of separator. For instance:

/**** A.java ****/
public class A {
  private int field;

  public int getField() {
    return this.field;
  }
}

/**** B.java ****/
public class B {
  public String shout(String something) {
    return something.toUpperCase();
  }
}

@flbulgarelli
Copy link
Member Author

Yeah, I was actually thinking the same 😄

@flbulgarelli
Copy link
Member Author

Related to mumuki/mumuki-java-runner#5

@faloi
Copy link
Contributor

faloi commented Jul 14, 2017

Ok. Any suggestions about the separators?

@flbulgarelli
Copy link
Member Author

I'd try to use something that can not lead to ambiguities and that is very unlikely to be entered by a user.

/*@@@ B.java @@@*/

We could use mumukit-directives components to get the proper language-specific comment separator.

"#{open_comment}@@@ #{filename}.#{extension} @@@#{close_comment}

@faloi
Copy link
Contributor

faloi commented Jul 14, 2017

Agree. Should this feature be configurable or automatically available for every exercise with upload editor type?

@flbulgarelli
Copy link
Member Author

I am not sure. I think we could enable this feature to every exercise, not only upload exercises. Or perhaps we could flag some exercises as multi-editable, to enable this behavior. See #711.

This is a rough spec:

  1. If the exercise is of type editor, the student can click on a plus sign in the editor in order to create an additional editor. The student should be able to change the editor title. When the student sends a solution with more than one editor, a single content solution is built in laboratory, separated as previously discussed.
  2. If the exercise is of type upload, and the uploaded file is a zip file, the file is unzipped and uploaded as a previously discussed. This could be done in the client.

@faloi
Copy link
Contributor

faloi commented Jul 14, 2017

Seems nice, but right now I only have time to develop part 2, the one related to the upload editor; and I really want to use this feature in about a month, on exercises with manual correction.

Can we proceed with that and let the multi-editor discussion for another time?

@flbulgarelli
Copy link
Member Author

Sure!

@faloi
Copy link
Contributor

faloi commented Jul 14, 2017

Great. Do you think the zip file is necessary? Any advantages over a plain old <input type="file" multiple>?

@flbulgarelli
Copy link
Member Author

I think that using a file is easier if you want to provide a small script to upload it automatically to the web, like course does. But your proposal works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants