CAT-SOOP is a tool for automatic collection and assessment of online exercises https://catsoop.mit.edu
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

preload.py 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import os
  2. import subprocess
  3. from datetime import datetime
  4. cs_long_name = 'Documentation'
  5. docs_loc = os.path.join(cs_data_root, 'courses', cs_course, 'docs')
  6. cs_title = 'Documentation | CAT-SOOP'
  7. cs_top_menu = [{'text': 'Navigation', 'link': [
  8. {'link': "COURSE", 'text': 'CAT-SOOP Home'},
  9. {'link': "COURSE/docs", 'text': 'Docs Home'},
  10. {'link': "COURSE/docs/about", 'text': 'About'},
  11. {'link': "COURSE/docs/installing", 'text': 'Installing'},
  12. {'link': "COURSE/docs/authoring", 'text': 'Authoring'},
  13. {'link': "COURSE/docs/extending", 'text': 'Extending'},
  14. {'link': "COURSE/docs/contributing", 'text': 'Contributing'},
  15. {'link': "COURSE/docs/api/catsoop", 'text': 'API'},
  16. ]}]
  17. def callout(note, header, style):
  18. return """<div class="callout callout-%s">
  19. <h4>%s</h4>
  20. %s
  21. </div>""" % (style, header, csm_language._md_format_string(globals(), note))
  22. def note(x):
  23. cs_print(callout(x, "Note", "info"))
  24. return ''
  25. def warning(x):
  26. cs_print(callout(x, "Warning", "danger"))
  27. return ''
  28. def doublecheck(x):
  29. cs_print(callout(x, "Double Check", "warning"))
  30. return ''
  31. def aside(x):
  32. cs_print(callout(x, "Aside", "warning"))
  33. return ''
  34. todo = '''<div class="callout callout-danger">
  35. <p>
  36. <b>This Page Needs Attention</b>
  37. </p>
  38. <p>
  39. Contributions to documentation are more than welcome!
  40. You can e-mail contributions (or questions) to
  41. <code>~adqm/catsoop-dev@lists.sr.ht</code>.
  42. </p>
  43. </div>'''