Download text file

This extension provides a function download_link(filename,content,link_text), which creates an HTML link tag with the given link tag. When the student clicks on the link, a file with the given filename and content is downloaded.

There's a demo question showing how to use this extension.

download_link(filename,content,link_text)

Creates an HTML link tag which downloads a file with the given filename and text content. If you don't give link_text, the link reads "Download filename".

csv(data,headers)

Format a set of data as a CSV file.