Procházet zdrojové kódy

website updates

pull/66/head
adam j hartz před 1 měsícem
rodič
revize
efcb06dc87
18 změnil soubory, kde provedl 349 přidání a 83 odebrání
  1. +3
    -3
      README.md
  2. +1
    -1
      catsoop/__QTYPES__/pythoncode/__SANDBOXES__/remote.py
  3. +4
    -4
      catsoop/__QTYPES__/richtext/formatting.html/content.xml
  4. +1
    -1
      catsoop/__STATIC__/mainpage.catsoop
  5. +2
    -2
      catsoop/__STATIC__/templates/main.template
  6. +1
    -1
      catsoop/__UTIL__/source.zip/preload.py
  7. +1
    -1
      setup.py
  8. +15
    -14
      website/content.catsoop
  9. +40
    -1
      website/docs/about/content.catsoop
  10. +1
    -1
      website/docs/content.catsoop
  11. +15
    -19
      website/docs/contributing/content.catsoop
  12. binární
      website/docs/contributing/hacking/__STATIC__/knight-vs-catsoop.jpg
  13. +225
    -9
      website/docs/contributing/hacking/content.catsoop
  14. +1
    -1
      website/docs/contributing/hacking/preload.py
  15. +10
    -0
      website/docs/extending/content.catsoop
  16. +6
    -5
      website/docs/installing/content.catsoop
  17. +17
    -17
      website/docs/installing/server_configuration/content.catsoop
  18. +6
    -3
      website/preload.py

+ 3
- 3
README.md Zobrazit soubor

@@ -8,7 +8,7 @@

## CAT-SOOP

* Web Site: <https://catsoop.org>
* Web Site: <https://catsoop.mit.edu>
* IRC: `#catsoop` on OFTC (`irc.oftc.net`)
* Mailing List: [catsoop-users@mit.edu](mailto:catsoop-users@mit.edu)
(subscribe at <http://mailman.mit.edu/mailman/listinfo/catsoop-users>)
@@ -44,7 +44,7 @@ $ catsoop configure

If you are setting up a public-facing copy of CAT-SOOP (as opposed to a local
copy for debugging purposes), see the instructions at
<https://catsoop.org/website/docs/installing/server_configuration>
<https://catsoop.mit.edu/website/docs/installing/server_configuration>

To start the server, run:
```nohighlight
@@ -59,7 +59,7 @@ $ python3 setup.py test

### HACKING

See <https://catsoop.org/website/docs/contributing/hacking>
See <https://catsoop.mit.edu/website/docs/contributing/hacking>


### INCLUDED SOFTWARE


+ 1
- 1
catsoop/__QTYPES__/pythoncode/__SANDBOXES__/remote.py Zobrazit soubor

@@ -17,7 +17,7 @@
import json
import urllib.request, urllib.parse, urllib.error

SANDBOX_URL = "https://catsoop.org/python_sandbox_v2019.9/"
SANDBOX_URL = "https://catsoop.mit.edu/python_sandbox_v2019.9/"


def run_code(


+ 4
- 4
catsoop/__QTYPES__/richtext/formatting.html/content.xml Zobrazit soubor

@@ -114,13 +114,13 @@ def foo(x):
</tr>

<tr>
<td><pre>[Link to CAT-SOOP](https://catsoop.org)</pre></td>
<td><p><a href="https://catsoop.org">Link to CAT-SOOP</a></p></td>
<td><pre>[Link to CAT-SOOP](https://catsoop.mit.edu)</pre></td>
<td><p><a href="https://catsoop.mit.edu">Link to CAT-SOOP</a></p></td>
</tr>

<tr>
<td><pre>![Image](https://catsoop.org/_static/_base/images/logo.svg)</pre></td>
<td><p><img alt="Image" src="https://catsoop.org/_static/_base/images/logo.svg" /></p></td>
<td><pre>![Image](https://catsoop.mit.edu/_static/_base/images/logo.svg)</pre></td>
<td><p><img alt="Image" src="https://catsoop.mit.edu/_static/_base/images/logo.svg" /></p></td>
</tr>

</table>


+ 1
- 1
catsoop/__STATIC__/mainpage.catsoop Zobrazit soubor

@@ -29,7 +29,7 @@ def link(url, text=None):
</pre>

<center>
@{link("https://catsoop.org")}
@{link("https://catsoop.mit.edu")}
</center>

<python>


+ 2
- 2
catsoop/__STATIC__/templates/main.template Zobrazit soubor

@@ -88,8 +88,8 @@
<div class="cs_footer">
{cs_footer}
<pre class="catsooplogo" style="font-size:50%;">{cs_base_logo_text}</pre>
Powered by <a target='_blank' href='https://catsoop.org'>CAT-SOOP</a> v{cs_version} ({cs_version_codename}).<br/>
CAT-SOOP is <a href="https://www.gnu.org/philosophy/free-sw.en.html" target="_blank">Free/Libre Software</a>, available under the terms<br/>of the <a href="BASE/_util/license" target="_blank">GNU Affero General Public License, version 3</a>.<br/>
Powered by <a target='_blank' href='https://catsoop.mit.edu'>CAT-SOOP</a> v{cs_version} ({cs_version_codename}).<br/>
CAT-SOOP is <a href="https://www.fsf.org/about/what-is-free-software" target="_blank">Free/Libre Software</a>, available under the terms<br/>of the <a href="BASE/_util/license" target="_blank">GNU Affero General Public License, version 3</a>.<br/>
<a href="BASE/_util/source.zip" download target="_blank">Download Source Code</a><br/>
<a href="BASE/_util/jslicense.html" rel="jslicense" target="_blank">Javascript License Information</a>
</div>


+ 1
- 1
catsoop/__UTIL__/source.zip/preload.py Zobrazit soubor

@@ -3,4 +3,4 @@ SOURCE_README = """This archive contains the source code for the CAT-SOOP instan
The (potentially modified) source of the base system is located in the "catsoop" directory.

CAT-SOOP
https://catsoop.org"""
https://catsoop.mit.edu"""

+ 1
- 1
setup.py Zobrazit soubor

@@ -150,7 +150,7 @@ def main():
"catsoop.scripts",
],
scripts=[],
url="https://catsoop.org",
url="https://catsoop.mit.edu",
license="AGPLv3+",
description="CAT-SOOP is a tool for automatic collection and assessment of online exercises.",
long_description=readme,


+ 15
- 14
website/content.catsoop Zobrazit soubor

@@ -10,30 +10,30 @@
</div>

<center>
<a class="btn btn-catsoop" href="/hg/catsoop/archive/current_release.zip">Download</a>
<a class="btn btn-catsoop" href="COURSE/docs">Documentation</a>
<a class="btn btn-catsoop" target="_blank" href="/hg">Code</a>
<a class="btn btn-catsoop" target="_blank" href="/bugs">Issue Tracker</a>
<a class="btn btn-catsoop" href="/forum/">Forum</a>
<a class="btn btn-catsoop" target="_blank" href="/git/catsoop/catsoop">Code</a>
<a class="btn btn-catsoop" target="_blank" href="/git/catsoop/catsoop/issues">Issue Tracker</a>
</center>


## WHAT IS IT?

CAT-SOOP is a tool for automatic collection and assessment of online exercises,
originally developed primarily for use in MIT's 6.01 (_Introduction to
Electrical Engineering and Computer Science via Robotics_). It has since been
used in several courses at MIT and at Olin College.
CAT-SOOP is a flexible, programmable learning management system based on the
Python programming language. It was originally developed primarily for use in
MIT's 6.01 (_Introduction to Electrical Engineering and Computer Science via
Robotics_), and it has since been used in several courses at MIT. Read more
about CAT-SOOP at [this page](COURSE/docs/about).

**More information:**
**Information:**

* Web Site:
* <https://catsoop.org>
* Tor onion service: <http://6ddrxqky42dq4yqyunroejbnrj37gj4ydtyqmijkt2q3yhua2bfzvwid.onion>
* <https://catsoop.mit.edu>
* Tor onion service: <http://wjglyvalrulqaelaptda3pni6lcap46exxsnbiijocrk2guz3nr7dxqd.onion>

* Repository:
* Clone (with Mercurial): `@{TOR_STRING('hg')} clone @{cs_url_root}/hg/catsoop`
* Clone (Git mirror): `@{TOR_STRING('git')} clone git://@{cs_url_root.split('/',2)[-1]}/catsoop.git`
* Web Access: <@{cs_url_root}/hg/>
* <@{cs_url_root.split(':',1)[0]}://@{cs_url_root.split('/',2)[-1]}/git/catsoop/catsoop>
* `@{TOR_STRING('git')} clone @{cs_url_root.split(':',1)[0]}://@{cs_url_root.split('/',2)[-1]}/git/catsoop/catsoop.git`

* IRC: `#catsoop` on OFTC (`irc.oftc.net`)

@@ -51,7 +51,8 @@ Please note that the terms of this license apply to the CAT-SOOP system itself,
but not to any course material hosted on a CAT-SOOP instance, unless explicitly
stated otherwise.

See the [documentation](COURSE/docs) for more information.
Although the [documentation](COURSE/docs) is a bit sparse, I am working on
it!

## IS IT ANY GOOD?



+ 40
- 1
website/docs/about/content.catsoop Zobrazit soubor

@@ -4,7 +4,46 @@ cs_content_header = cs_long_name

@{todo}

# Courses Using CAT-SOOP
<tableofcontents/>

<section>About CAT-SOOP</section>

CAT-SOOP is a flexible, programmable learning management system based on the
Python programming language. During the 2018-2019 academic year, CAT-SOOP was
used in 12 subjects at MIT, and total enrollment in these subjects was around
3000 students. While CAT-SOOP's core functionality is the collection and
assessment of online exercises, it has been extended to support a variety of
different features including, among others:

* content presentation (via text, video, interactive simulations, etc)
* grade reports and analytics (including fine-grained control over grading, due dates, extensions, and lateness penalties)
* queueing system for managing requests for help in an in-class lab environment or office hours
* real-time analytics for synchronous lab assignments
* timed quizzes
* a variety of subject-specific question types
* group exercises (with randomly-assigned or self-selected groups)
* finely-grained control over release/due dates (by section, or for individuals)
* an interface for online grading of paper exams

<subsection>Design Goals</subsection>

<subsection>History</subsection>

CAT-SOOP is a descendent of a system written by Tom&aacute;s
Lozano-P&eacute;rez in the early-to-mid 1990's, referred to around MIT as "the
tutor." The tutor was widely used at MIT and other universities. In 2011,
CAT-SOOP and another system (Ike Chuang's `tutor2`, which I understand
eventually grew into [Open edX](https://open.edx.org)) were both developed in
parallel as potential replacements for the tutor in MIT's 6.01 (Introduction to
Electrical Engineering and Computer Science via Robotics). Despite having been
designed for 6.01, CAT-SOOP was actually first used in the fall 2011 offering
of 6.003 (Signals and Systems), while `tutor2` was used in 6.01. CAT-SOOP was
first used in 6.01 in the spring 2013 semester, and it began to see use in other
subjects in later semesters.



<section>Courses Using CAT-SOOP</section>

The following are some of the courses I know of that use (or have used) CAT-SOOP:



+ 1
- 1
website/docs/content.catsoop Zobrazit soubor

@@ -1,5 +1,5 @@
<python>
cs_content_header = "CAT-SOOP v14.x Documentation"
cs_content_header = "CAT-SOOP Documentation (v%s)" % ('.'.join(i.lstrip('0') for i in cs_version.split('.')[:2]))
</python>

<center>


+ 15
- 19
website/docs/contributing/content.catsoop Zobrazit soubor

@@ -3,10 +3,9 @@ cs_content_header = cs_long_name
</python>

The easiest and best way to contribute to CAT-SOOP is to use it, to report any
issues you find, and to tell your colleagues if you like it!

Please see below for some guidelines about contributing more directly to
CAT-SOOP, and please don't hesitate to reach out if you have questions.
issues you find, and to tell your colleagues if you like it! Please see below
for some guidelines about contributing more directly to CAT-SOOP, and please
don't hesitate to reach out if you have questions.

### Do you have a question about using CAT-SOOP?

@@ -22,29 +21,26 @@ that case, please instead send e-mail directly to Adam (`hz@mit.edu`),
optionally encrypting your message with [his public
key](https://hz.mit.edu/hz_pubkey.asc).

For other issues, as a first step, please ensure that they were not already
reported by looking through the [issue
tracker](/bugs). If you're unable to
find an open issue addressing the problem, feel free to report your issue by
e-mailing `catsoop-dev@mit.edu` or dropping by the IRC room.

Regardless of how you report the issue, please be as descriptive as you can,
and please try to include an example that demonstrates the issue if possible.
For other issues, feel free to [open an issue](/git/catsoop/catsoop/issues) on
the Gitea page, or to report your issue by e-mailing `catsoop-dev@mit.edu` or
dropping by the IRC room. Regardless of how you report the issue, please be as
descriptive as you can, and please try to include an example that demonstrates
the issue if possible.

### Do you intend to add a new feature, change an existing behavior, or fix a bug?

A good place to start is to suggest your change in the `catsoop-dev@mit.edu`
mailing list or in the IRC room, and to read through the [hacker's
mailing list, in the IRC room, or as an [issue on
Gitea](/git/catsoop/catsoop/issues); and to read through the [hacker's
guide](CURRENT/hacking) for information on the process for contributing code,
as well as information about coding style, tests, etc.

#### Do you want to contribute to the documentation?

We really appreciate it!
I really appreciate it!

If you are comfortable doing so, the best way to submit documentation changes
is by the same process as above, as described in the [hacker's
guide](CURRENT/hacking).

But we'll accept documentation changes in any format! Feel free just to e-mail
your changes/suggestions (in any format) to `catsoop-dev@mit.edu`.
is by the same process used for code, as described in the [hacker's
guide](CURRENT/hacking). But documentation changes in any format are more than
welcome! Feel free just to e-mail your changes/suggestions (in any format) to
`catsoop-dev@mit.edu`.

binární
website/docs/contributing/hacking/__STATIC__/knight-vs-catsoop.jpg Zobrazit soubor

Před Za
Šířka: 978  |  Výška: 333  |  Velikost: 100 KiB

+ 225
- 9
website/docs/contributing/hacking/content.catsoop Zobrazit soubor

@@ -1,15 +1,231 @@
<python>
cs_content_header = cs_long_name
cs_content_header = "CAT-SOOP Hacker's Guide"
</python>

<center>
<img src="CURRENT/knight-vs-catsoop.jpg" width="500" style="max-width:100%"/>
</center>
Welcome to the CAT-SOOP hacker's guide! This page is aimed primarily at people
who are interested in helping to continue to evolve CAT-SOOP as a platform in a
direct way, by working on the code of CAT-SOOP itself. It is intended to give
you a brief overview of the CAT-SOOP code base and surrounding infrastructure,
as well as the process for setting up a local testing copy and for contributing
changes back to CAT-SOOP.

<p>&nbsp;</p>
<tableofcontents/>

Welcome to the CAT-SOOP hacker's guide! This document is intended to give you
a brief overview of the CAT-SOOP code base, as well as the process for setting
up a local testing copy, and for contributing changes back to CAT-SOOP.
<section>Getting Set Up</section>

Once I write it, it will be great.
If you intend to make changes that you will eventually push upstream, a good
first step is to make yourself an account on the [CAT-SOOP Gitea
Instance](/git/catsoop/catsoop), which is the main hub for CAT-SOOP development
and discussion. You should also add an SSH public key to your account.

You may also want to make an account on the [forum](/forum/), though that is
less necessary.

<subsection>Cloning the Repository</subsection>

After you have set up an account on the Gitea instance and added an SSH key,
you should "fork" the [main repository](/git/catsoop/catsoop) by navigating to
it and clicking the "fork" button. This will create a copy of the repository
associated with your username.
Then you can clone that repository:

```nohighlight
$ git clone git@catsoop.mit.edu:catsoop/catsoop
```

You may also want to add your fork as a secondary remote, so that you
can push to it, with a command like the following:

```nohighlight
$ git remote add mine git@catsoop.mit.edu:USERNAME/catsoop
```

<subsection>Installing CAT-SOOP</subsection>

The recommended setup for CAT-SOOP involves setting up a development
environment inside of a Python virtualenv, which can be created with the
following command (assuming virtualenv is installed):

```nohighlight
$ python3 -m virtualenv -p `which python3` ENV_PATH
```

where `ENV_PATH` is the location on disk where you want to create your new
virtual environment. Then, you can activate the virtual environment so that
`python3` and `pip3` refer to the virtual environment, rather than to your
system-wide Python installation:

```nohighlight
$ source ENV_PATH/bin/activate
```

Once you have activated the virtual environment, you can install CAT-SOOP by
navigating to your clone of the repository and running:

```
$ python3 setup.py develop
```

Once it has been installed, you should configure it:

```
$ catsoop configure
```

and then you can start the server with:

```
$ catsoop start
```

and navigate your browser to `http://localhost:6010`.

In order for this page to be interesting, you will want to put a course in the
CAT-SOOP data root (default: `~/.local/share/catsoop`). You may wish to clone
the sample course if you do not already have another course to work with, using
the following command:

```nohighlight
$ git clone git@catsoop.mit.edu:catsoop/sample_course ~/.local/share/catsoop/courses/sample_course
```

(if you want, you can also fork the `sample_course` repository and clone your own copy)

<subsection>Making a First Change</subsection>

As a test to make sure everything is set up, make a small change. For example,
try adding `print('HOORAY!')` to the top of the `main` function in
`catsoop/scripts/start_catsoop.py`. After doing so, `HOORAY!` should be
printed to the terminal alongside all the usual output when running `catsoop
start`.

<subsection>Next Steps</subsection>

<ref overview><a href="{link}">Section {number}</a></ref> provides an overview
of the codebase, which you may wish to read as a starting point. Additionally,
issues in hive that are labeled as "beginner-friendly" might be other good
opportunities to jump into the codebase. You can view these issues
[here](/git/catsoop/catsoop/issues?q=&type=all&state=open&labels=8&milestone=0&assignee=0),
or by manually searching for them from the catsoop issue tracker.

<section label="overview">Brief Overview of Codebase</section>

TODO

<subsection>Anatomy of a Page Load</subsection>

TODO

<section>Rules to Write/Commit By</section>

1. User-facing APIs should be as generic and robust as possible.

1. In most cases, if a sacrifice needs to be made, efficiency should be the
first thing to go. Flexibility and ease of use should be given top
priority.

1. All substantial new public-facing functions should have docstrings. These
docstrings should be formatted using CAT-SOOP Markdown, as the [API
Documentation](COURSE/docs/api) is automatically generated from them. In
cases of adding new functionality or changing existing functionality, the
documentation should also be updated.

1. Substantial new functionality should have associated unit tests where
appropriate. Code related to user interaction / user interface is
difficult to test, but it should still be tested where it's feasible to do
so.

1. Functions and dictionaries are preferable to classes.

1. To ensure consistency across the codebase, CAT-SOOP uses the
[black](https://black.readthedocs.io/en/stable/) code formatting tool.
Please run your changes through `black`.

1. Logically separate changes should have separate commits in the repository.

1. Commit messages should be as descriptive as possible. Where it makes sense
to do so, it is fine to squash/strip/rebase commits to make the history
cleaner. That is, if you use multiple small commits when working locally,
these should ideally be broken down into logical commits with descriptive
commit messages before they are merged into CAT-SOOP proper.

<section>Sending Changes Upstream</section>

Once you've made some changes, we'd appreciate you sending them our way so that
we can include them in CAT-SOOP (if you're comfortable doing so)! This section
provides some guidance on doing just that.

<subsection>Licensing</subsection>

CAT-SOOP (including its documentation) is available under the terms of the [GNU
Affero General Public License, version
3+](https://www.gnu.org/licenses/agpl-3.0.html). By sending your contributions
as described below, you are licensing them to us under those same terms, and
you are asserting that you have the right to license your contributions under
those terms.

<subsection>Checklist</subsection>

Before sending your changes, please:

1. Make sure that new features are documented/tested as described above.
1. Run `black` on the entire codebase, and make sure that no files change.
1. Run `python3 setup.py test` and make sure that all tests pass (including new
tests you've written).
1. Add an appropriate entry to `CHANGELOG.md`, and, if you wish, add your name to
the `CONTRIBUTORS.md` file.

<subsection>Sending</subsection>

We prefer using Gitea's "pull request" feature for managing contributed changes
to catsoop. In order to start the process, you should push your changes to a
new branch on your fork of the main repository. When pushing, you should see a
link for creating a new pull request. You can follow this link, fill out a
little bit of information about the changes, and submit your pull request.

Alternatively, if you prefer it, feel free to send patches via e-mail to
`catsoop-dev@mit.edu` using `git format-patch` or `git send-email`.

<subsection>Feedback</subsection>

After you've sent your changes, you should receive a response (hopefully in a
day or two) in one of the following flavors:

1. Thanks! We'll add these to CAT-SOOP!
1. Thanks! I'm hosed right now but will take a detailed look when I get a chance.
1. Thanks! Here are some questions / thoughts / suggested changes.

If you don't hear back right away, feel free to send a follow-up message. And
in any case, feel free to continue the conversation, to make changes, etc.

<section>Versioning and Releases</section>

In general, the goal is to release a new version of CAT-SOOP once every
semester. As MIT's semesters start in September and February, respectively,
the goal is to release a new major version just before the start of each
semester. These releases will be versioned by date, with version `20YY.9`
referring to the September release, and `20YY.2` referring to the February
release.

Beyond this, additional "minor" version numbers may also be used, usually for
bug fixes. In general, version `20YY.M.V` refers to the `V`<sup>th</sup>
release of version `20YY.M`. `V` starts from `0`, so the initial release of
each major version is `20YY.M.0`. Unlike major version bumps, these minor
versions will not happen on a fixed schedule, but, rather, will be released as
necessary, or as interesting new features are added.

Most major versions will only be supported for one semester (until the next
version's release) and may contain backwards-incompatible changes, but,
starting with `2019.9`, the September releases in odd-numbered years will be
tagged as **long-term support** (LTS) releases and will continue to be
supported for two full years. These versions will receive no
backwards-incompatible changes during that time (except in the case where such
a change is necessary for security reasons). Each LTS version will have a
separate branch in the repository, named like `lts-20YY.M`, where bugfixes
will be backported from the `default` branch.

Each new release (including minor releases) will be accompanied by an e-mail to
`catsoop-users@mit.edu`. These e-mails will include information about what
changed from the previous version, as well as an indication of steps that need
to be taken when upgrading.

+ 1
- 1
website/docs/contributing/hacking/preload.py Zobrazit soubor

@@ -1,2 +1,2 @@
cs_long_name = "CAT-SOOP Hacker's Guide"
cs_long_name = "Hacker's Guide"
cs_title = "Hacking | %s" % (cs_title,)

+ 10
- 0
website/docs/extending/content.catsoop Zobrazit soubor

@@ -3,3 +3,13 @@ cs_content_header = cs_long_name
</python>

@{todo}

Through writing Python code in preload/content files, it is theoretically
possible to make CAT-SOOP pages do anything. Beyond this, CAT-SOOP provides
methods to easily customize particular aspects of CAT-SOOP through implementing
custom question types, custom handlers, and plugins. This page provides a
brief overview of each of these means of customization.

<tableofcontents/>

<section>Custom Question Types</section>

+ 6
- 5
website/docs/installing/content.catsoop Zobrazit soubor

@@ -48,7 +48,7 @@ else:

<section>Download CAT-SOOP</section>

There are several ways you can install CAT-SOOP (as of version 14.0).
There are several ways you can install CAT-SOOP.

<subsection>Installation via pip</subsection>

@@ -60,15 +60,16 @@ $ sudo pip3 install catsoop

<subsection>Manual Installation</subsection>

Alternatively, you can clone the Mercurial repository (or the Git mirror):
Alternatively, you can clone the Git repository:

* Mercurial: `@{TOR_STRING('hg')} clone @{cs_url_root}/hg/catsoop`
* Git: `@{TOR_STRING('git')} clone git://@{cs_url_root.split('/',2)[-1]}/catsoop.git`
```
$ @{TOR_STRING('git')} clone git://@{cs_url_root.split('/',2)[-1]}/catsoop.git
```

After you have a local copy, you can then run:

```
$ sudo python3 setup.py install
$ sudo pip3 install .
```

from the source directory. You can also run the unit tests by running:


+ 17
- 17
website/docs/installing/server_configuration/content.catsoop Zobrazit soubor

@@ -207,7 +207,7 @@ CAT-SOOP default page!

All of CAT-SOOP's data are stored in files on disk in a directory called
`__LOGS__` in the `cs_data_root` location specified above (by default,
`~/.local/share/cat-soop`). CAT-SOOP itself will not back these files up, but
`~/.local/share/catsoop`). CAT-SOOP itself will not back these files up, but
there are many strategies for backups using common utilities.

I have used many approaches in the past, but my usual approach involves setting
@@ -218,26 +218,26 @@ locations. This approach has several advantages over simply using `rsync` or
roll back to any past backup while keeping size down by only storing diffs
(instead of storing a complete copy of each file for each backup).

Here, we'll set up a backup using Git (which tends to be more efficient for
this purpose, both in time and in memory, than Mercurial). To set this up,
first move yourself to the `__LOGS__` directory and run `git init`, followed by
`git add -A .` and `git gc --aggressive`. This will set your `__LOGS__`
directory up as a Git repository. You can then set up a cron job to commit all
changes and push these changes to an arbitrary number of backup locations
(local or remote).
Here, we'll set up a backup using Mercurial (which tends to be better than Git
at efficiently storing the binary logs without manual intervention). To set
this up, first move yourself to the `__LOGS__` directory and run `hg init`,
followed by `hg add .`. This will set your `__LOGS__` directory up as a
Mercurial repository. You can then set up a cron job to commit all changes and
push these changes to an arbitrary number of backup locations (local or
remote).

The following example script (`/home/catsoop/do_backup.sh`) was used by several
classes in fall 2018. It commits local changes to a Git repository, and it
then pushes those changes to one local location (on a separate disk) and to one
remote location.
classes in fall 2018. It commits local changes to a Mercurial repository, and
it then pushes those changes to one local location (on a separate disk) and to
one remote location.

```bash
#!/bin/bash
cd /home/catsoop/cat-soop-data/__LOGS__;
git add -A;
git commit -m "$(date +'%Y-%m-%d:%H:%M')";
git push /storage2/backup master;
git push catsoop@cat-soop.org:backups/py master;
cd /home/catsoop/.local/share/catsoop/_logs;
hg addremove .;
hg commit -m "$(date +'%Y-%m-%d:%H:%M')";
hg push /storage2/backup;
hg push ssh://catsoop@catsoop.org/backups/py;
```

It can then be configured to run, for example, every hour at xx:05 and xx:35
@@ -251,7 +251,7 @@ with the following crontab entry:

By default, Python code that needs to be sandboxed (for example, student code
from the `pythonic` or `pythoncode` question types) will be sent to
`cat-soop.org` to be run.
`catsoop.org` to be run.

It is fine to leave things this way if you'd like. I will keep that service up
as long as is feasible, and the sandbox doesn't log anything about the code it


+ 6
- 3
website/preload.py Zobrazit soubor

@@ -4,7 +4,10 @@ cs_long_name = "CAT-SOOP Website"
TOR_STRING = lambda n: ("torsocks %s" % n) if "onion" in cs_url_root else n

cs_footer = (
"""<a href="http://creativecommons.org/licenses/by-sa/4.0/" rel="license"><img alt="Creative Commons License" src="COURSE/cc-by-sa.png" style="border-width:0"></a><br/>The contents of this page are Copyright &copy; 2016-2019 by the CAT-SOOP Developers.<br/>They are licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.<br/>The original form of this web site is source code in the CAT-SOOP specification
format.<br/>The source code is available in the Mercurial repository at <a href="/hg/catsoop">%s/hg/catsoop</a>.<br/><hr width="300" style="background-color:#000000;border-color:#000000" />"""
% cs_url_root
"""The content of this page is Copyright &copy; 2016-2020 by the CAT-SOOP Developers.<br/>
This content is licensed under the <a href="BASE/_util/license" target="_blank">GNU Affero General Public License, version 3</a>, as is CAT-SOOP itself.<br/>
The original form of this content is source code in the CAT-SOOP specification format.<br/>
The source code is available in the <code>website</code> directory of the Mercurial repository at the following address:<br/>
<code>git://%s/catsoop.git</code>.<br/><hr width="300" style="background-color:#000000;border-color:#000000" />"""
% (cs_url_root.split('/', 2)[2])
)

Načítá se…
Zrušit
Uložit