File upload fileupload

File upload (fileupload)

The file upload Question is referenced by its Question type in the code, which is fileupload. This Question allows students to upload a file to Learnosity, for review by the teacher.

Attributes

  • is_math boolean

    Set to true to have LaTeX or MathML contents to be rendered with mathjax.

    Default: false

  • metadata object

    Object containing additional information about the question.

  • metadata.distractor_rationale string

    Used to display individual response feedback/rationale to the student.

  • metadata.rubric_reference string

    A unique identifier for the rubric to be used with the question - defaults to course rubric if assigned in activity

  • metadata.sample_answer string

    A sample answer to be displayed on the Learnosity Reports API. HTML is supported.

  • metadata.acknowledgements string

    References for any text passages, documents, images etc. used in the question.

  • stimulus string

    The question stimulus. This can include text, tables, images, resources and LaTeX entered via the Math Editor.

  • stimulus_review string

    HTML/Text content displayed only in review state rendered above the response area. Supports embedded Feature <span> tags. Will override stimulus in review state.

  • instructor_stimulus string

    HTML/Text content displayed when showInstructorStimulus is set to true on the activity. Supports embedded Feature <span> tags.

  • type string

    Type of question being asked, e.g. 'association'

    Default: "fileupload"

  • ui_style object

    Object used to control different aspects of the UI

  • ui_style.fontsize string

    Controls the size of base font for this question. Options are among 'small', 'normal', 'large', 'xlarge' and 'xxlarge'.

    Default: "normal"

  • validation object

    In this section, configure the correct answer(s) for the question.

  • validation.max_score number

    The highest score a marker can award to this question response.

  • validation.min_score_if_attempted number

    Positive value indicating the minimum score if a student attempted the question.

    Default: 0

  • validation.unscored boolean

    When enabled, this option will remove all scoring from the question. This is useful for creating practice questions.

    Default: false

  • photo_capture boolean

    Allow the student to capture and upload a photo using the built-in camera of the device.

    Default: false

  • max_width string

    Max width of the upload area. Define in em, px; or set to 'none' to stretch to full width of container.

  • max_files number

    Select a value from the drop down to indicate the maximum amount of files that the student can upload. This value will be visible to the student.

    Default: 1

  • allow_pdf boolean

    Allow the student to upload .pdf files.

    Default: false

  • allow_jpg boolean

    Allow the student to upload .jpg files.

    Default: false

  • allow_gif boolean

    Allow the student to upload .gif files.

    Default: false

  • allow_png boolean

    Allow the student to upload .png files.

    Default: false

  • allow_csv boolean

    Allow the student to upload .csv files.

    Default: false

  • allow_rtf boolean

    Allow the student to upload .rtf files.

    Default: false

  • allow_txt boolean

    Allow the student to upload .txt files.

    Default: false

  • allow_xps boolean

    Allow the student to upload .xps files.

    Default: false

  • allow_zip boolean

    Allow the student to upload .zip files.

    Default: false

  • allow_ms_word boolean

    Allow the student to upload Microsoft Word file types including: doc, docx, dot, dotx, docm, dotm.

    Default: false

  • allow_ms_excel boolean

    Allow the student to upload Microsoft Excel file types including: xls, xlsx, xlt, xltm, xlsm.

    Default: false

  • allow_ms_powerpoint boolean

    Allow the student to upload Microsoft Powerpoint file types including: ppt, pps, pot, pptx, pptm, potx, potm, ppsx, ppsm.

    Default: false

  • allow_ms_publisher boolean

    Allow the student to upload Microsoft Publisher files.

    Default: false

  • allow_open_office boolean

    Allow the student to upload Open Office file types including: odf, odt, ods, odp.

    Default: false

  • allow_video boolean

    Allow the student to upload video file types including: mov, avi, mp4, webm, wmv. Uploaded videos will be automatically converted to the mp4 format.
    Note: to access and use this file type option, please contact us.

    Default: false

  • allow_matlab boolean

    Allow the student to upload MATLAB file types including: m, fig, mat.

    Default: false

  • allow_altera_quartus boolean

    Allow the student to upload Quartus file types including: bdf, bsf.

    Default: false

  • allow_verilog boolean

    Allow the student to upload Verilog file types including: .sv .

    Default: false

  • allow_c boolean

    Allow the student to upload .c files.

    Default: false

  • allow_h boolean

    Allow the student to upload .h files.

    Default: false

  • allow_s boolean

    Allow the student to upload .s files.

    Default: false

  • allow_v boolean

    Allow the student to upload .v files.

    Default: false

  • allow_cpp boolean

    Allow the student to upload .cpp files.

    Default: false

  • allow_assembly boolean

    Allow the student to upload .asm files.

    Default: false

  • allow_labview boolean

    Allow the student to upload LabVIEW virtual instrument (.vi) files.

    Default: false

Response format

The data returned in the response format for this Question is the name, size, file type and location of the file(s) that the student uploaded.

Response format examples

{
    "value": [
        {
            "name": "YN City 6.png",
            "originalName": "YN City 6.png",
            "extension": "png",
            "size": 6225609,
            "assetPath": "userupload/0034/questionresponse/2019/265/0034_testing_user_0034_testing_user_44__4cbd3128-e3ab-412a-ab8f-aaf2ef96ed0d/244afd18-79c9-4db0-921c-dd937447fff5.png"
        }
    ],
    "type": "array",
    "apiVersion": "v2.173.0",
    "revision": 1
}

Response attributes

  • value array

    name, size, file type and location of the file(s) that the student uploaded.

  • value.name string

    The file name the student chose.

  • value.originalName string

    The original file name from disk.

  • value.extension string

    The three letter file extension from the uploaded file, indicating the type of data contained within.

  • value.size numeric

    The size (in bytes) of the uploaded file.

  • value.assetPath numeric

    A path pointing to the storage location of the file.

  • type string

    Informs the scoring engine about what kind of data to expect in the values entered by the student. For this Question type, you must always supply a string for this attribute with the value "array".

  • apiVersion string

    The version of the Questions API that returned this response.

  • revision numeric

    Keeps track of the number of Question attempt submissions, i.e. how many times the student answered the Question and submitted it.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.