No commit activity in last 3 years
No release in over 3 years
Downloads Quizzes from Moodle as PDF
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 0
~> 0
~> 0

Runtime

~> 0.1.0
>= 1.6.21, ~> 1.6
>= 1.0.4, ~> 1.0
>= 2.7.3, ~> 2.7
~> 0.6.2
 Project Readme

MoodleQuizDownloader

Automatically downloads all attempts of a Moodle Quiz and stores them as PDF or HTML.

Installation

The moodleQuizDownloader is a ruby gem - you'll need to install Ruby first.

$ gem install moodleQuizDownloader

What it does

This script downloads all attempts of a moodle quiz and saves them in pdfs named with the student names. For this it logs into moodle via the http/html web site, goes to the quiz and scrapes all information like student names etc. from the html it finds.

To get started, you first need the moodle id of the quiz you want to download. E.g. if the url shown in the browser was

https://moodle.htw-berlin.de/mod/quiz/report.php?id=4711&mode=overview

If you view the quiz's attempts in the browser,

 4711

is the id.

Usage

for example, run

$ moodleQuizDownloader.rb -e 4711 -u drblinken -s http://moodle2.htw-berlin.de/ -p geheim --verbose

to see a list of all attempts in exam 4711 on the specified server, and

$ moodleQuizDownloader.rb -e 4711 -u drblinken -s http://moodle.someschool.de/ -p geheim --verbose download

to download them.

to see all options:

$ moodleQuizDownloader.rb help

try it out in irb

e.g.:

 irb
 load 'lib/moodleQuizDownloader.rb'

 arguments = "-o /Users/kleinen/Documents/ss2013/exam-     ckup/info3/pz1/exam_a/raw -e 23843".split(" ")
 options = OptionHandler.new(arguments).parse
 q = QuizDownloader.new
 agent = Mechanize.new
 q.smoketest(options.moodle_server)
 q.attemptlist(options,agent)
 page = q.smoketest(options.moodle_server)
 username_input = page.search('#username')

Todos / New Features

  • Add an option to be prompted for the password ( or just do it automatically if it is not provided)

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request