auto_scoring
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| auto_scoring [2022/01/25 12:27] – created yves | auto_scoring [2022/01/25 12:52] (current) – yves | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Scoring | + | ===== Retrieving scoring |
| + | For [[https:// | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The formal syntax is: | ||
| + | |||
| + | '' | ||
| + | |||
| + | For convenient parsing, we recommend setting REPORT_TYPE to 2 (CSV, computer-readable, | ||
| + | |||
| + | Note that the above URL cannot be invoked automatically from within any programming environment. [[https:// | ||
| + | |||
| + | The call requires cookie to authenticate properly, because it is a view controller. The php function '' | ||
| + | |||
| + | For this to work properly via php you have to use cUrl with cookies enabled: | ||
| + | |||
| + | <code php> | ||
| + | <?php | ||
| + | function file_get_contents_curl($url) { | ||
| + | $ckfile = tempnam ("/ | ||
| + | |||
| + | $ch = curl_init(); | ||
| + | |||
| + | curl_setopt($ch, | ||
| + | curl_setopt($ch, | ||
| + | curl_setopt($ch, | ||
| + | curl_setopt($ch, | ||
| + | curl_setopt ($ch, CURLOPT_COOKIEJAR, | ||
| + | curl_setopt($ch, | ||
| + | curl_setopt($ch, | ||
| + | curl_setopt($ch, | ||
| + | |||
| + | $data = curl_exec($ch); | ||
| + | curl_close($ch); | ||
| + | |||
| + | return $data; | ||
| + | } | ||
| + | |||
| + | // assume $sessionID already exists and contains a valid PMA.core SessionID | ||
| + | // build URL | ||
| + | |||
| + | $trainingsession = 66 | ||
| + | $url = " | ||
| + | |||
| + | // retrieve data | ||
| + | $tsData = file_get_contents_curl($url); | ||
| + | } | ||
| + | ?> | ||
| + | </ | ||
auto_scoring.1643110057.txt.gz · Last modified: by yves
