UNPKG

2.81 kBMarkdownView Raw
1# CodeGradXvmauthor
2
3CodeGradX is a grading infrastructure
4- where students submit programs to solve exercises and these programs
5 are mechanically graded,
6- where authors deploy exercises and propose them to students,
7- where teachers may follow the progress of a cohort of students.
8
9The [CodeGradX](http://paracamplus.com/spip/spip.php?rubrique2)
10infrastructure is operated via REST protocols. To ease its use,
11CodeGradXlib is a Javascript Library that provides a programmatic API
12to operate the CodeGradX infrastructure. This library is contained in
13the `codegradxlib` Node module and can be operated from a browser.
14
15CodeGradX may also be operated from command line using the
16`codegradxagent` Node module. By default, `codegradxlib` is configured
17to use the real constellation of CodeGradX servers howwver authors may
18use a virtual machine, named [VMauthor
19](http://paracamplus.com/CodeGradX/VM/CodeGradX-VMauthor-latest.img.bz2),
20to write and check their exercises with their own computing resources.
21The new `codegradxvmauthor` Node module reconfigures `codegradxlib` to
22use this virtual machine.
23
24To sum up: this module is the configuration of CodeGradXagent for VMauthor.
25See also a more detailed [documentation of codegradxagent
26](https://www.npmjs.com/package/codegradxagent) Node module.
27
28## Installation
29
30```javascript
31npm install codegradxvmauthor
32```
33
34When VMauthor runs, you should memorize the IP number attributed to
35that VM, this is required to access the VM. You may alternatively
36enrich your `/etc/hosts` file and add a line defining
37`vmauthor.codegradx.org` to be that IP number. Something like
38
39```
40192.168.133.201 vmauthor vmauthor.codegradx.org
41```
42
43If this hostname is not defined, you should use the
44`--ip=192.168.133.201` option in your invocations of the
45`codegradxvmauthor` script.
46
47## Use
48
49You may access the VMauthor virtual machine when browsing
50`http://vmauthor/`, interactively submit new exercises and test them
51as a student. However you may also prefer to script these interactions
52in which case, your script requires some credentials to access VMauthor.
53
54### Credentials
55
56Credentials are JSON files that may be fetched from VMauthor. These
57files define a user name and a cookie (valid a few hours):
58
59```shell
60wget -O fw4ex-author.json http://vmauthor/fw4exjson/0
61wget -O fw4ex-student1.json http://vmauthor/fw4exjson/1
62```
63
64After getting these credentials you may use them with the
65`--credentials=fw4ex-author.json` or
66`--credentials=fw4ex-student1.json` option. Credentials are limited in
67time so you may additionally specify `--update-credentials` to refresh
68your credentials.
69
70### Actions
71
72Students may submit answers to exercises. Only authors may create new
73exercises and mark batches of students' answers. See directory
74`shtests/` for examples of use.
75
76
77
78
79
80
81
82
83
84