starteam / starcellbio_html

2 stars 7 forks source link

Add assignment text and multiple files upload. #776

Closed jmclaus closed 6 years ago

jmclaus commented 6 years ago

This PR lets an instructor add these optional features to the opening page of an assignment:

  1. Text displayed at the top, just below the title. For the time being, no formatting at all is displayed.
  2. Files of any type that can be downloaded by the student. They are displayed in a list of clickable anchors.

student

On the instructor side, on initial assignment setup, a text area with a placeholder and an 'Add files' button have been appended. The latter gives the instructor the possibility to add multiple files to the assignment that will only be submitted to the server when the [Save and Continue] button is clicked.

instructor-initial-setup

Once this is done, the assignment setup can still be modified. This time, green trash buttons appear next to each file anchors, giving the possibility to delete them. Additional files can also be added. This list will also be uploaded to the server only if [Save] or [Save and Continue] are clicked.

instructor-modify-setup

In the JS file, I aligned myself to the rather unusual convention for naming variables (using underscores) instead of the more common camelcase.

jmclaus commented 6 years ago

@annagav Indeed, you have a point, thanks. I changed the color of the links to the same blue used in the header text but not in strong. Left the light gray hover color. Don't think we should add a color to the palette just for that.

jmclaus commented 6 years ago

@annagav @idegtiarov I rebased this branch on develop and checked that it didn't break anything with @idegtiarov recent merge.

annagav commented 6 years ago

👍