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