Jump to navigation

Namespace: csv

Numbas.csv

Functions related to the download and interpretation of student results, and interaction with the results page, usually for outside-LTI contexts.

Source:

Methods

(static) create_and_download_file(file)

Parameters:
Name Type Description
file string
Source:

(static) escape_cell(cell) → {string}

Ensures a string will not cause issues within a csv due to commas, quotes, etc.

Parameters:
Name Type Description
cell string
Returns:
Type Description
string
Source:

(static) from_array(rows) → {string}

Escapes each cell of a two-dimensional array of strings such that each will not cause issues within a csv

Parameters:
Name Type Description
rows Array.<Array.<string>>
Returns:
Type Description
string
Source:

(static) make_row(cells) → {string}

Escapes each cell of a list of strings such that each will not cause issues within a csv

Parameters:
Name Type Description
cells Array.<string>
Returns:
Type Description
string
Source:

(static) split_csv_into_cells(csv) → {Array.<Array.<string>>}

Breaks a constructed csv into cells

Parameters:
Name Type Description
csv string
Returns:
Type Description
Array.<Array.<string>>
Source: