CAT-SOOP is a flexible, programmable learning management system based on the Python programming language. 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.
 
 
 

74 lines
2.5 KiB

  1. <python>
  2. # This file is part of CAT-SOOP
  3. # Copyright (c) 2011-2020 by The CAT-SOOP Developers <catsoop-dev@mit.edu>
  4. #
  5. # This program is free software: you can redistribute it and/or modify it under
  6. # the terms of the GNU Affero General Public License as published by the Free
  7. # Software Foundation, either version 3 of the License, or (at your option) any
  8. # later version.
  9. #
  10. # This program is distributed in the hope that it will be useful, but WITHOUT
  11. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. # FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
  13. # details.
  14. #
  15. # You should have received a copy of the GNU Affero General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. def link(url, text=None):
  18. text = text or url
  19. return '<a href="%s" target="_blank">%s</a>' % (url, text)
  20. </python>
  21. <pre class="catsooplogo">
  22. \
  23. / /\__/\
  24. \__=( o_O )=
  25. (__________)
  26. |_ |_ |_ |_
  27. </pre>
  28. <center>
  29. @{link("https://catsoop.mit.edu")}
  30. </center>
  31. <python>
  32. if cs_main_page_text:
  33. print(cs_main_page_text)
  34. </python>
  35. ## About CAT-SOOP
  36. CAT-SOOP is a tool for automatic collection and assessment of online exercises.
  37. CAT-SOOP is @{link("https://www.fsf.org/about/what-is-free-software", "free software")},
  38. available under the terms of the
  39. @{link("BASE/_util/license", "GNU Affero General Public License, version 3+")}.
  40. In accordance with the terms of this license, the source code of the base
  41. system that generated this page is available @{link("BASE/_util/source.zip",
  42. "here")} as a zip archive.
  43. Please note that these terms apply only to the CAT-SOOP system itself and
  44. not to any third-party software included with CAT-SOOP, nor to any course
  45. material hosted on a CAT-SOOP instance, unless explicitly stated otherwise.
  46. ## Courses
  47. <python>
  48. courses = csm_tutor.available_courses()
  49. if len(courses) == 0:
  50. print("There are currently no courses hosted on this system.")
  51. else:
  52. print("""
  53. The following courses are hosted on this system:
  54. """)
  55. for course_id, title in sorted(courses):
  56. if title is not None:
  57. title = title.replace('<br>', ' ').replace('<br/>', ' ').replace('</br>', ' ').replace('<br />', ' ')
  58. if title is None:
  59. print('* <font color="red">Error loading course: %s</font>' % course_id)
  60. elif title == course_id:
  61. print('* [%s](BASE/%s/)' % (course_id, course_id))
  62. else:
  63. print('* [%s](BASE/%s/): %s' % (course_id, course_id, title))
  64. </python>