WeBWorK Problems

Attach file with a student submission

Attach file with a student submission

by James Morski -
Number of replies: 8
I would like for students to be able to upload a file to accompany their work. This might be useful if a question asks for a student to show work to receive full credit. Is this possible in WW? Is anybody out there doing something like this?

I came across this thread from 2011 that seemed promising, but I got lost along the way:

http://webwork.maa.org/moodle/mod/forum/discuss.php?d=2622
In reply to James Morski

Re: Attach file with a student submission

by Trevor Saunderson -

I would like to bump this up.  Has there been any progress?

In reply to Trevor Saunderson

Re: Attach file with a student submission

by Alex Jordan -

Very recently, Paul Pearson contributed some work in this direction:

https://github.com/openwebwork/pg/pull/479

So there has been progress and it's on people's minds right now. Nothing is in the current release though.

In reply to Trevor Saunderson

Re: Attach file with a student submission

by Michael Gage -

Yes. But it's not ready for prime time yet. Paul Pearson at Hope College has submitted recent work on it.

collected here:   https://github.com/mgage/pg/tree/test_develop+upload

Unfortunately the current storage mechanism is rapidly overwhelmed if you store more than one image.

Needs more thought. @paultpearson


In reply to Michael Gage

Re: Attach file with a student submission

by Trevor Saunderson -

Thanks for the quick replies!   I'm a long time user of WeBWorK for homework, assignments, etc..  With everything that is going on in the world, I'm sure I'm not alone in saying that it would be nice to have this feature within WeBWorK too so that students can submit some of their hand-written work.

My current work around is embedding 'upload and submit' buttons within WW problems that are actually just links to our LMS Dropbox.  It works, but it is clunky and for Gateway Quizzes that have staggered start times we can't easily sync the corresponding start/end time in our LMS Dropbox folders. 

Thanks again for the update!

In reply to Trevor Saunderson

Re: Attach file with a student submission

by Joel Trussell -

This is something our faculty has been wanting for years - our ECE dept currently uses Webwork in 9 different courses. Last semester with everything online several instructors allowed students to submit the solution method by scanning their work. Also 3-4 asked essay or derivation questions which were scanned and submitted. It is hard to enter equations via the essay Webwork format.

In reply to Joel Trussell

Re: Attach file with a student submission

by Joseph Maher -

Yes - this would be really great - though I would prefer the students to be able to upload pdfs...

Joseph

In reply to Joseph Maher

Re: Attach file with a student submission

by Joseph Maher -
I had a quick look at Paul's code - from something like:

'''<input type="file" name="file" accept="application/pdf" onchange="uploadFile()" />'''

I can access the file from javascript with:

document.querySelector('input[name="file"]').files[0];

How would I access the file in perl?

Joseph
In reply to Joseph Maher

Re: Attach file with a student submission

by Joseph Maher -
I wrote some proof of concept code to do this, available here:

https://github.com/josephmaher/pg/tree/upload

- I broke the security model by adding a helper module UploadPDF.pm which actually writes files to disk...

- be nice if a grown up wrote a version for the main tree :)

Joseph