Commit b4ceb7fc1d20db61394f2a728298c0cfaf37081f
1 parent
39cd1cfe
Exists in
master
and in
1 other branch
minor change in logger.yaml
Showing
5 changed files
with
16 additions
and
11 deletions
Show diff stats
BUGS.md
README.md
... | ... | @@ -85,8 +85,9 @@ At this point aprendizations is installed in |
85 | 85 | ~/.local/bin # FreeBSD/Linux |
86 | 86 | ``` |
87 | 87 | |
88 | -and can be run with the command `aprendizations` (make sure this directory is | |
89 | -in your `$PATH`). | |
88 | +Make sure this directory is in your `$PATH`. | |
89 | + | |
90 | +The server can be run with the command `aprendizations` from the terminal. | |
90 | 91 | |
91 | 92 | ## Configuration |
92 | 93 | |
... | ... | @@ -121,7 +122,7 @@ have a registered publicly accessible domain name. |
121 | 122 | |
122 | 123 | #### Selfsigned |
123 | 124 | |
124 | -Generate a selfsigned certificate and place it in `aprendizations/certs`. | |
125 | +Generate a selfsigned certificate and place it in `~/.local/share/certs`. | |
125 | 126 | |
126 | 127 | ```sh |
127 | 128 | openssl req -x509 -newkey rsa:4096 -keyout privkey.pem -out cert.pem -days 365 -nodes |
... | ... | @@ -141,7 +142,7 @@ sudo certbot certonly --standalone -d www.example.com |
141 | 142 | sudo service pf start # enable pf firewall |
142 | 143 | ``` |
143 | 144 | |
144 | -Certificates are saved under `/usr/local/etc/letsencrypt/live/www.example.com/`. Copy them to `aprendizations/certs` and change permissions to be readable: | |
145 | +Certificates are saved under `/usr/local/etc/letsencrypt/live/www.example.com/`. Copy them to `~/.local/share/certs` and change permissions to be readable: | |
145 | 146 | |
146 | 147 | ```sh |
147 | 148 | sudo cp /usr/local/etc/letsencrypt/live/www.example.com/cert.pem . |
... | ... | @@ -157,7 +158,7 @@ sudo certbot renew |
157 | 158 | sudo service pf start # start firewall |
158 | 159 | ``` |
159 | 160 | |
160 | -and then copy the `cert.pem` and `privkey.pem` files to `aprendizations/certs` directory. Change permissions and ownership as appropriate. | |
161 | +and then copy the `cert.pem` and `privkey.pem` files to `~/.local/share/certs` directory. Change permissions and ownership as appropriate. | |
161 | 162 | |
162 | 163 | |
163 | 164 | ### Testing |
... | ... | @@ -169,7 +170,8 @@ cd demo |
169 | 170 | aprendizations demo.yaml |
170 | 171 | ``` |
171 | 172 | |
172 | -and open a browser at [https://127.0.0.1:8443](). If it everything looks good, | |
173 | +and open a browser at [https://127.0.0.1:8443](https://127.0.0.1:8443). | |
174 | +If it everything looks good, | |
173 | 175 | check at the correct address `https://www.example.com` (requires port forward |
174 | 176 | in the firewall). The option `--debug` provides more verbose logging and might |
175 | 177 | be useful during testing. The option `--check` generates all the questions once | ... | ... |
aprendizations/learnapp.py
aprendizations/questions.py
... | ... | @@ -28,9 +28,9 @@ class QuestionException(Exception): |
28 | 28 | # =========================================================================== |
29 | 29 | class Question(dict): |
30 | 30 | ''' |
31 | - Classes derived from this base class are meant to instantiate a question | |
32 | - to a student. | |
33 | - Instances can shuffle options, or automatically generate questions. | |
31 | + Classes derived from this base class are meant to instantiate questions | |
32 | + for each student. | |
33 | + Instances can shuffle options or automatically generate questions. | |
34 | 34 | ''' |
35 | 35 | def __init__(self, q: QDict) -> None: |
36 | 36 | super().__init__(q) |
... | ... | @@ -125,7 +125,7 @@ class QuestionRadio(Question): |
125 | 125 | self['correct'] = [float(correct[i]) for i in perm] |
126 | 126 | |
127 | 127 | # ------------------------------------------------------------------------ |
128 | - # can return negative values for wrong answers | |
128 | + # can assign negative grades for wrong answers | |
129 | 129 | def correct(self) -> None: |
130 | 130 | super().correct() |
131 | 131 | ... | ... |
config/logger.yaml