diff --git a/README.rst b/README.rst index 269b6f0dc4dc227b23eaa6fdcb282678b5d01df3..5d821a77b529772dda0328545c84b793292f6a00 100644 --- a/README.rst +++ b/README.rst @@ -1,23 +1,25 @@ -CourseFlow -========== +RELATE +====== + +A Resource Environment for Learning and TEaching (formerly known as CourseFlow) *"I just want to ask my students some quiz questions online. How hard could it possibly be?"* -CourseFlow is a `Django `_-based courseware +RELATE is a `Django `_-based courseware package that lets students participate in online activities. Each such activity is called a "flow". It flows over a couple of pages, each of which can be, say, a video, a quiz question, a page of text, or, within the confines of HTML, something completely different. -CourseFlow is set apart by the following features: +RELATE is set apart by the following features: * Emphasizes ease of authoring, using `YAML `_, `Markdown `_ and Python. - See `example content `_. + See `example content `_. * Versioning of content through deep integration with `git `_. Instructors can preview newly-authored content while students work with - prior versions, all from the same instance of CourseFlow. + prior versions, all from the same instance of RELATE. * Code questions: * Allow students to write Python code into a text box (with syntax highlighting) @@ -37,13 +39,13 @@ CourseFlow is set apart by the following features: More information around the web: -* `See it in action `_ -* `Documentation `_ +* `See it in action `_ +* `Documentation `_ Installation ------------ -See the `installation guide `_. +See the `installation guide `_. License ------- diff --git a/bin/cf-validate b/bin/relate-validate similarity index 100% rename from bin/cf-validate rename to bin/relate-validate diff --git a/course/auth.py b/course/auth.py index 46d6a9b306ff3f24cc7d82fc322b8651f222b3cd..c0371322c9b2d5b390660a4cffc35f1ccaae670c 100644 --- a/course/auth.py +++ b/course/auth.py @@ -43,7 +43,7 @@ from course.models import ( Participation, participation_role, participation_status, ) -from courseflow.utils import StyledForm, StyledModelForm +from relate.utils import StyledForm, StyledModelForm # {{{ impersonation @@ -53,7 +53,7 @@ class ImpersonateMiddleware(object): if request.user.is_staff and 'impersonate_id' in request.session: imp_id = request.session['impersonate_id'] - request.courseflow_impersonate_original_user = request.user + request.relate_impersonate_original_user = request.user if imp_id is not None: try: request.user = User.objects.get(id=imp_id) @@ -117,7 +117,7 @@ class StopImpersonatingForm(forms.Form): def stop_impersonating(request): - if not hasattr(request, "courseflow_impersonate_original_user"): + if not hasattr(request, "relate_impersonate_original_user"): messages.add_message(request, messages.ERROR, "Not currently impersonating anyone.") return redirect("course.views.home") @@ -143,7 +143,7 @@ def stop_impersonating(request): def impersonation_context_processor(request): return { "currently_impersonating": - hasattr(request, "courseflow_impersonate_original_user"), + hasattr(request, "relate_impersonate_original_user"), } # }}} @@ -236,7 +236,7 @@ def sign_in_by_email(request): "home_uri": request.build_absolute_uri(reverse("course.views.home")) }) from django.core.mail import send_mail - send_mail("Your CourseFlow sign-in link", message, + send_mail("Your RELATE sign-in link", message, settings.ROBOT_EMAIL_FROM, recipient_list=[email]) messages.add_message(request, messages.INFO, diff --git a/course/calendar.py b/course/calendar.py index 8540adb220119d6f7fce431d7f2b0f6cd94310bf..d83130f99b26770936eb0153312f658135d0a907 100644 --- a/course/calendar.py +++ b/course/calendar.py @@ -36,7 +36,7 @@ from crispy_forms.layout import Submit from bootstrap3_datetime.widgets import DateTimePicker -from courseflow.utils import StyledForm +from relate.utils import StyledForm from course.models import (participation_role, Event) diff --git a/course/content.py b/course/content.py index 2ffee076bfadccdc0134b44f3c019b6fa2608694..35c5a9fa8a309b2f4cbebd14623ca98b5f9ce6b5 100644 --- a/course/content.py +++ b/course/content.py @@ -40,7 +40,7 @@ from HTMLParser import HTMLParser from jinja2 import BaseLoader as BaseTemplateLoader, TemplateNotFound -from courseflow.utils import dict_to_struct +from relate.utils import dict_to_struct import threading @@ -164,7 +164,7 @@ def get_yaml_from_repo(repo, full_name, commit_sha, cached=True): """Return decoded, struct-ified YAML data structure from the given file in *repo* at *commit_sha*. - See :class:`courseflow.utils.Struct` for more on + See :class:`relate.utils.Struct` for more on struct-ification. """ @@ -336,7 +336,7 @@ class LinkFixerExtension(Extension): self.reverse_func = reverse_func def extendMarkdown(self, md, md_globals): - md.treeprocessors["courseflow_link_fixer"] = \ + md.treeprocessors["relate_link_fixer"] = \ LinkFixerTreeprocessor(md, self.course, self.commit_sha, reverse_func=self.reverse_func) diff --git a/course/enrollment.py b/course/enrollment.py index e5527e41c2b96f145aa52724fecc87a7e907bf23..c2b2f505a7d601d304b15e87789d327bec1fd454 100644 --- a/course/enrollment.py +++ b/course/enrollment.py @@ -46,7 +46,7 @@ from course.models import ( from course.views import get_role_and_participation from course.utils import course_view, render_course_page -from courseflow.utils import StyledForm +from relate.utils import StyledForm # {{{ enrollment diff --git a/course/flow.py b/course/flow.py index 170f36c66ea4a01640f5f8a86dbde93df5334304..11377e1885bb123f91eb50025779c3a661468643 100644 --- a/course/flow.py +++ b/course/flow.py @@ -35,7 +35,7 @@ from django.utils.safestring import mark_safe from django import forms from django import http -from courseflow.utils import StyledForm, local_now, as_local_time +from relate.utils import StyledForm, local_now, as_local_time from crispy_forms.layout import Submit from course.constants import ( diff --git a/course/grades.py b/course/grades.py index 2198ec1f0ba17955dd32ea21e168fe7ae26074bf..1c4175682c82b247a828c10209660f717af0926a 100644 --- a/course/grades.py +++ b/course/grades.py @@ -36,7 +36,7 @@ from django.db import transaction from django.utils.timezone import now from django import http -from courseflow.utils import StyledForm +from relate.utils import StyledForm from crispy_forms.layout import Submit from course.utils import course_view, render_course_page diff --git a/course/migrations/0001_initial.py b/course/migrations/0001_initial.py index 1d56cf6a456a2215b29d2ff9e5c8eddf69a3085b..58d1fa085815d691a948519fb276d990bb2e0776 100644 --- a/course/migrations/0001_initial.py +++ b/course/migrations/0001_initial.py @@ -21,12 +21,12 @@ class Migration(migrations.Migration): ('identifier', models.CharField(help_text=b"A course identifier. Alphanumeric with dashes, no spaces. This is visible in URLs and determines the location on your file system where the course's git repository lives.", unique=True, max_length=200, db_index=True)), ('hidden', models.BooleanField(default=True, help_text=b'Is the course only visible to course staff?')), ('valid', models.BooleanField(default=True, help_text=b'Whether the course content has passed validation.')), - ('git_source', models.CharField(help_text=b"A Git URL from which to pull course updates. If you're just starting out, enter git://github.com/inducer/courseflow-sample to get some sample content.", max_length=200, blank=True)), + ('git_source', models.CharField(help_text=b"A Git URL from which to pull course updates. If you're just starting out, enter git://github.com/inducer/relate-sample to get some sample content.", max_length=200, blank=True)), ('ssh_private_key', models.TextField(help_text=b'An SSH private key to use for Git authentication', blank=True)), ('course_file', models.CharField(default=b'course.yml', help_text=b'Name of a YAML file in the git repository that contains the root course descriptor.', max_length=200)), ('enrollment_approval_required', models.BooleanField(default=False, help_text=b'If set, each enrolling student must be individually approved.')), ('enrollment_required_email_suffix', models.CharField(help_text=b"Enrollee's email addresses must end in the specified suffix, such as '@illinois.edu'.", max_length=200, null=True, blank=True)), - ('email', models.EmailField(help_text=b"This email address will be used in the 'From' line of automated emails sent by CourseFlow. It will also receive notifications about required approvals.", max_length=75)), + ('email', models.EmailField(help_text=b"This email address will be used in the 'From' line of automated emails sent by RELATE. It will also receive notifications about required approvals.", max_length=75)), ('course_xmpp_id', models.CharField(max_length=200, blank=True)), ('course_xmpp_password', models.CharField(max_length=200, blank=True)), ('active_git_commit_sha', models.CharField(max_length=200)), diff --git a/course/models.py b/course/models.py index b6dfefd0c21e9aa00a3b8648bd45c1a69f5c8dc6..d40a22e1964ee959f2e9635acbd0640e45df6351 100644 --- a/course/models.py +++ b/course/models.py @@ -97,7 +97,7 @@ class Course(models.Model): git_source = models.CharField(max_length=200, blank=True, help_text="A Git URL from which to pull course updates. " "If you're just starting out, enter " - "git://github.com/inducer/courseflow-sample " + "git://github.com/inducer/relate-sample " "to get some sample content.") ssh_private_key = models.TextField(blank=True, help_text="An SSH private key to use for Git authentication. " @@ -123,7 +123,7 @@ class Course(models.Model): email = models.EmailField( help_text="This email address will be used in the 'From' line " - "of automated emails sent by CourseFlow. It will also receive " + "of automated emails sent by RELATE. It will also receive " "notifications about required approvals.") # {{{ XMPP @@ -612,7 +612,7 @@ class FlowRuleException(models.Model): get_course_commit_sha, get_flow_desc) - from courseflow.utils import dict_to_struct + from relate.utils import dict_to_struct rule = dict_to_struct(self.rule) repo = get_course_repo(self.participation.course) diff --git a/course/page/base.py b/course/page/base.py index 0c79787c7c2a43538ed0f7a08a0a79ac1ed994b8..64eddd38832a6dc5e878d94fdaccec3772a569c9 100644 --- a/course/page/base.py +++ b/course/page/base.py @@ -30,7 +30,7 @@ import re from course.validation import validate_struct, ValidationError from course.constants import MAX_EXTRA_CREDIT_FACTOR -from courseflow.utils import StyledForm, Struct +from relate.utils import StyledForm, Struct from django.forms import ValidationError as FormValidationError from django.utils.safestring import mark_safe @@ -546,8 +546,8 @@ class HumanTextFeedbackForm(StyledForm): required=False, help_text=mark_safe("Feedback to be shown to student, using " "" - "CourseFlow-flavored Markdown")) + "relate/content.html#courseflow-markup'>" + "RELATE-flavored Markdown")) self.fields["notify"] = forms.BooleanField( initial=False, required=False, help_text="Checking this box and submitting the form " diff --git a/course/page/choice.py b/course/page/choice.py index a1f8782ccb61d88dd8237bb67a2c1a21b0127758..55d1acaf281b7d0cbedc03f4f5a19874a8cbc76d 100644 --- a/course/page/choice.py +++ b/course/page/choice.py @@ -28,7 +28,7 @@ THE SOFTWARE. import django.forms as forms from django.utils.safestring import mark_safe -from courseflow.utils import StyledForm +from relate.utils import StyledForm from course.page.base import ( AnswerFeedback, PageBaseWithTitle, PageBaseWithValue, markup_to_html) from course.content import remove_prefix diff --git a/course/page/code.py b/course/page/code.py index 95e5801ce13f58834e703eb760b01e0b97f80921..a19c47f7c948e2d32745cf138492b7612611068c 100644 --- a/course/page/code.py +++ b/course/page/code.py @@ -30,7 +30,7 @@ import django.forms as forms from django.core.exceptions import ObjectDoesNotExist from django.utils.html import escape -from courseflow.utils import StyledForm +from relate.utils import StyledForm from course.page.base import ( PageBaseWithTitle, markup_to_html, PageBaseWithValue, PageBaseWithHumanTextFeedback, @@ -579,7 +579,7 @@ class PythonCodeQuestion(PageBaseWithTitle, PageBaseWithValue): # }}} - from courseflow.utils import dict_to_struct + from relate.utils import dict_to_struct response = dict_to_struct(response_dict) feedback_bits = [] diff --git a/course/page/text.py b/course/page/text.py index cbc2c83d0c7058d4d1ea28828ce036d4a69a6ffe..8b13a46c479e6492ecc9b3f400eed1f399e07e9a 100644 --- a/course/page/text.py +++ b/course/page/text.py @@ -29,7 +29,7 @@ from course.validation import validate_struct, ValidationError import django.forms as forms from django.utils.html import escape -from courseflow.utils import StyledForm, Struct +from relate.utils import StyledForm, Struct from course.page.base import ( AnswerFeedback, PageBaseWithTitle, PageBaseWithValue, markup_to_html, PageBaseWithHumanTextFeedback, PageBaseWithCorrectAnswer) @@ -518,7 +518,7 @@ class TextQuestion(PageBaseWithTitle, PageBaseWithValue): # {{{ validators -class CourseFlowPageValidator(object): +class RELATEPageValidator(object): type = "cfpage" def __init__(self, vctx, location, validator_desc): @@ -537,7 +537,7 @@ class CourseFlowPageValidator(object): ) def validate(self, new_page_source): - from courseflow.utils import dict_to_struct + from relate.utils import dict_to_struct import yaml try: @@ -564,7 +564,7 @@ class CourseFlowPageValidator(object): TEXT_ANSWER_VALIDATOR_CLASSES = [ - CourseFlowPageValidator, + RELATEPageValidator, ] diff --git a/course/page/upload.py b/course/page/upload.py index f820f833055ac1630df2845ed5c422d6da5d2055..a38c7763fd69c30ea8bce9dd2f9d4df8f268b045 100644 --- a/course/page/upload.py +++ b/course/page/upload.py @@ -33,7 +33,7 @@ from course.page.base import ( markup_to_html) from course.validation import ValidationError -from courseflow.utils import StyledForm +from relate.utils import StyledForm # {{{ upload question diff --git a/course/sandbox.py b/course/sandbox.py index 2c88f234c7f68eda6a81a6afbe41df8d4d022825..d410fb791d4434eb08d89ab2e2f853e9f9bf9a88 100644 --- a/course/sandbox.py +++ b/course/sandbox.py @@ -115,8 +115,8 @@ def view_markup_sandbox(pctx): def make_form(data=None): help_text = ("Enter " - "CourseFlow markup.") + "relate/content.html#courseflow-markup\">" + "RELATE markup.") return SandboxForm( None, "markdown", vim_mode, help_text, @@ -161,7 +161,7 @@ def view_markup_sandbox(pctx): @course_view def view_page_sandbox(pctx): - from courseflow.utils import dict_to_struct + from relate.utils import dict_to_struct import yaml PAGE_SESSION_KEY = "cf_validated_sandbox_page:" + pctx.course.identifier diff --git a/course/templates/course/analytics-flow.html b/course/templates/course/analytics-flow.html index b4c66ea21f6711cb05b04f81c0507f132c8b92f5..86c86b4caee100a997c25248156cd355436b4775 100644 --- a/course/templates/course/analytics-flow.html +++ b/course/templates/course/analytics-flow.html @@ -1,7 +1,7 @@ {% extends "course/course-base.html" %} {% block title %} - Analytics - CourseFlow + Analytics - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/analytics-flows.html b/course/templates/course/analytics-flows.html index e92fcaa87d74ca8f246dadb8c87bba10eb4f87be..6499e2bace6c1d3b9626751f628733205ce118aa 100644 --- a/course/templates/course/analytics-flows.html +++ b/course/templates/course/analytics-flows.html @@ -1,7 +1,7 @@ {% extends "course/course-base.html" %} {% block title %} - Analytics - CourseFlow + Analytics - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/analytics-page.html b/course/templates/course/analytics-page.html index 314cb5f564b7aed46a5a34fb101a2fc94fe0e0d6..6fba52ed8511e6ab4064d55e60817fd9461628a6 100644 --- a/course/templates/course/analytics-page.html +++ b/course/templates/course/analytics-page.html @@ -1,7 +1,7 @@ {% extends "course/course-base.html" %} {% block title %} - Analytics - CourseFlow + Analytics - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/broken-code-question-email.txt b/course/templates/course/broken-code-question-email.txt index 06e7e3e9065b914c6ed4fc8df3e92ab67c59f227..30f79e657388876a4be18ae749ead5036c649367 100644 --- a/course/templates/course/broken-code-question-email.txt +++ b/course/templates/course/broken-code-question-email.txt @@ -6,6 +6,6 @@ Details of the problem are below: {{ error_message|safe }} -- CourseFlow +- RELATE diff --git a/course/templates/course/calendar.html b/course/templates/course/calendar.html index bd4e8b1d7806c6826d4299c2f5737389bb08b190..3e2445ee2d895fcfb01e38ff78f5f4616e8f80aa 100644 --- a/course/templates/course/calendar.html +++ b/course/templates/course/calendar.html @@ -4,7 +4,7 @@ {% block title %} {{ course_desc.number}} - Calendar - CourseFlow + Calendar - RELATE {% endblock %} {%block header_extra %} diff --git a/course/templates/course/course-base.html b/course/templates/course/course-base.html index 882713024a7c4c055f1268cb0b686f3c4eb4ccea..60c6282ddfe5a868b51877f91811c24a9ed59da3 100644 --- a/course/templates/course/course-base.html +++ b/course/templates/course/course-base.html @@ -4,7 +4,7 @@ {{ course_desc.number}}: {{ course_desc.name}} - - CourseFlow + RELATE {% endblock %} {% block brand %} diff --git a/course/templates/course/enrollment-decision-email.txt b/course/templates/course/enrollment-decision-email.txt index fcdf731a31431a2d1d656da9d81f597c5d707946..aa3a6c5b912dcd202e9e2cb727a289c4321935cc 100644 --- a/course/templates/course/enrollment-decision-email.txt +++ b/course/templates/course/enrollment-decision-email.txt @@ -19,4 +19,4 @@ One common reason for this may be that you may have used your personal email to sign in. If that is the case, please use the official account and try again. {% endif %} -- CourseFlow staff +- RELATE staff diff --git a/course/templates/course/enrollment-request-email.txt b/course/templates/course/enrollment-request-email.txt index 973858c25a6bd94054e56befc2b57a63786cb044..f1d3c9dcfdada86c84e93266f0c1cc6acc2b2d49 100644 --- a/course/templates/course/enrollment-request-email.txt +++ b/course/templates/course/enrollment-request-email.txt @@ -9,4 +9,4 @@ to approve or deny the request. To do so, select the course participations in question and use the "Approve enrollment" or "Deny enrollment" admin actions. -- CourseFlow staff +- RELATE staff diff --git a/course/templates/course/flow-completion-grade.html b/course/templates/course/flow-completion-grade.html index ac7fe5128853e19b26e57cc74dec36bed71a3454..885b1c431db873e68762783127e2bbb99c3684cf 100644 --- a/course/templates/course/flow-completion-grade.html +++ b/course/templates/course/flow-completion-grade.html @@ -1,7 +1,7 @@ {% extends "course/course-base.html" %} {% block title %} - {{flow_desc.title}} - CourseFlow + {{flow_desc.title}} - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/flow-completion.html b/course/templates/course/flow-completion.html index a9c663ef77709b22d1aebd2136c862acc22bf235..19c3aaa76e357b7f58db5111bf0d9be988df8d48 100644 --- a/course/templates/course/flow-completion.html +++ b/course/templates/course/flow-completion.html @@ -1,7 +1,7 @@ {% extends "course/course-base.html" %} {% block title %} - {{flow_desc.title}} - CourseFlow + {{flow_desc.title}} - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/flow-confirm-completion.html b/course/templates/course/flow-confirm-completion.html index 3fa3d7a2316c9423f0dcfec1efffa63e006b3119..0e786b6f655a687a1753a72af66d1834eb59edd7 100644 --- a/course/templates/course/flow-confirm-completion.html +++ b/course/templates/course/flow-confirm-completion.html @@ -1,7 +1,7 @@ {% extends "course/course-base.html" %} {% block title %} - {{flow_desc.title}} - CourseFlow + {{flow_desc.title}} - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/flow-page.html b/course/templates/course/flow-page.html index b01469a97cc91f3db1298d635182c52a7c53e606..68b2e2294501d174667f0e7b7e62e82bcbc00203 100644 --- a/course/templates/course/flow-page.html +++ b/course/templates/course/flow-page.html @@ -5,7 +5,7 @@ {% block title %} [{{ page_data.next_ordinal }}/{{ flow_session.page_count }}] - {{title}} - {{ flow_desc.title}} - CourseFlow + {{title}} - {{ flow_desc.title}} - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/flow-start.html b/course/templates/course/flow-start.html index b8ffe1f8faa6e1e93596b81e39028b320ab2bf4d..aeada346501ba02272e42139ad654c3d27bf6378 100644 --- a/course/templates/course/flow-start.html +++ b/course/templates/course/flow-start.html @@ -1,7 +1,7 @@ {% extends "course/course-base.html" %} {% block title %} - {{flow_desc.title}} - CourseFlow + {{flow_desc.title}} - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/grade-flow-page.html b/course/templates/course/grade-flow-page.html index 6d602557388ce079dc588939ec401dee0864a63f..2e4613d57ae862c82b58265e35b2d3984d7027fc 100644 --- a/course/templates/course/grade-flow-page.html +++ b/course/templates/course/grade-flow-page.html @@ -3,7 +3,7 @@ {% load crispy_forms_tags %} {% block title %} - {{ page_data.group_id }}/{{ page_data.page_id }} - {{ flow_identifier}} - Grading - CourseFlow + {{ page_data.group_id }}/{{ page_data.page_id }} - {{ flow_identifier}} - Grading - RELATE {% endblock %} {% block content %} diff --git a/course/templates/course/grade-notify.txt b/course/templates/course/grade-notify.txt index f0adc6d0c95da0e6f87b659b8011c2f452bf4177..7545338df720875abc813d26b0c39a8741b93627 100644 --- a/course/templates/course/grade-notify.txt +++ b/course/templates/course/grade-notify.txt @@ -12,4 +12,4 @@ full text of the feedback follows. {{ feedback_text|safe }} ------------------------------------------------------------------- -- CourseFlow staff +- RELATE staff diff --git a/course/templates/course/home.html b/course/templates/course/home.html index 1528b589b29380ed4eafdbae6fada08bb35c7790..3929449076daa1a533d34d65f9859176a8d18b66 100644 --- a/course/templates/course/home.html +++ b/course/templates/course/home.html @@ -2,11 +2,10 @@ {% block content %}
-

Welcome to CourseFlow!

-

CourseFlow is open-source courseware that is with you all the way - through a course.

+

Welcome to RELATE

+

RELATE is a Resource Environment for Learning and TEaching

- Learn more » + Learn more »

@@ -26,7 +25,7 @@ {% endfor %} {% else %} - There are no courses hosted on this CourseFlow site. + There are no courses hosted on this RELATE site. {% if not user.is_authenticated %} Sign in to get started. {% endif %} diff --git a/course/templates/course/sandbox-page.html b/course/templates/course/sandbox-page.html index 57ce47798ef0d8774ae2f42b9b61f47270186b68..f80131dc456a38929c5e991e5516412c24990fcd 100644 --- a/course/templates/course/sandbox-page.html +++ b/course/templates/course/sandbox-page.html @@ -14,7 +14,7 @@ Page Sandbox {% endif %} - - CourseFlow + RELATE {% endblock %} {% block root_container %} diff --git a/course/templates/course/session-mismatch.txt b/course/templates/course/session-mismatch.txt index 037412a0159a4b8e3d85beb0556f9c1c0731ac4e..4849cc727926e87cc810cd206c1b1cbcd6c42c21 100644 --- a/course/templates/course/session-mismatch.txt +++ b/course/templates/course/session-mismatch.txt @@ -20,4 +20,4 @@ for help. One possible recovery is to enable sticky versioning for the flow, another is to delete their flow session (and lose all their input so far in this flow). -- CourseFlow staff +- RELATE staff diff --git a/course/templates/course/sign-in-email.txt b/course/templates/course/sign-in-email.txt index c1be08c01d2d8121ad8b43d81c29ad98c33c412a..942c1f90313ce78563b475a4210bab57e7aa9aa4 100644 --- a/course/templates/course/sign-in-email.txt +++ b/course/templates/course/sign-in-email.txt @@ -1,15 +1,15 @@ {% if user.first_name %}Dear {{user.first_name}}, {% else %}Dear {{user.email}}, {% endif %} -Welcome to CourseFlow! Please click this link to sign in: +Welcome to RELATE! Please click this link to sign in: {{ sign_in_uri }} You have received this email because someone (maybe you) entered your email -address into the CourseFlow web site at +address into the RELATE web site at {{ home_uri }} If this was not you, it is safe to disregard this email. -- CourseFlow staff +- RELATE staff diff --git a/course/utils.py b/course/utils.py index b1a6940674ad10eee03666ee8a6567f30b5a1e28..594145a8a78c990c48cd26d6e07655528b498a4a 100644 --- a/course/utils.py +++ b/course/utils.py @@ -119,7 +119,7 @@ def get_flow_rules(flow_desc, kind, participation, flow_id, now_datetime, if exc.expiration is not None and now_datetime > exc.expiration: continue - from courseflow.utils import dict_to_struct + from relate.utils import dict_to_struct rules.insert(0, dict_to_struct(exc.rule)) return rules diff --git a/course/validation.py b/course/validation.py index 3cc584ab224d56e73688fd93a4b0f8288675ce9e..9b3721bf362020c3310416751c93dd2f1d0baa07 100644 --- a/course/validation.py +++ b/course/validation.py @@ -33,7 +33,7 @@ from django.core.exceptions import ObjectDoesNotExist from django.utils.html import escape from course.content import get_repo_blob -from courseflow.utils import Struct +from relate.utils import Struct # {{{ validation tools diff --git a/course/versioning.py b/course/versioning.py index e093a5851b702abf16e743cf7dfdb374cc33f0d0..249ca51754452c4734b30accee9826393b5f1a0b 100644 --- a/course/versioning.py +++ b/course/versioning.py @@ -35,7 +35,7 @@ from django.utils.safestring import mark_safe from django.db import transaction -from courseflow.utils import StyledForm, StyledModelForm +from relate.utils import StyledForm, StyledModelForm from crispy_forms.layout import Submit from course.models import ( diff --git a/course/views.py b/course/views.py index c49c9a30b73ca77dbc6eeab9471d3714244cb156..fc1f036338196dc9d95a5473c41a36c03dc4adc9 100644 --- a/course/views.py +++ b/course/views.py @@ -39,7 +39,7 @@ from django.views.decorators.cache import cache_control from crispy_forms.layout import Submit -from courseflow.utils import StyledForm +from relate.utils import StyledForm from bootstrap3_datetime.widgets import DateTimePicker from course.auth import get_role_and_participation @@ -173,7 +173,7 @@ class FakeTimeForm(StyledForm): def get_fake_time(request): - if "courseflow_fake_time" in request.session: + if "relate_fake_time" in request.session: import datetime from django.conf import settings @@ -181,7 +181,7 @@ def get_fake_time(request): tz = timezone(settings.TIME_ZONE) return tz.localize( datetime.datetime.fromtimestamp( - request.session["courseflow_fake_time"])) + request.session["relate_fake_time"])) else: return None @@ -206,13 +206,13 @@ def set_fake_time(request): fake_time = form.cleaned_data["time"] if do_set: import time - request.session["courseflow_fake_time"] = \ + request.session["relate_fake_time"] = \ time.mktime(fake_time.timetuple()) else: - request.session.pop("courseflow_fake_time", None) + request.session.pop("relate_fake_time", None) else: - if "courseflow_fake_time" in request.session: + if "relate_fake_time" in request.session: form = FakeTimeForm({ "time": get_fake_time(request) }) @@ -368,7 +368,7 @@ def grant_exception(pctx): def strify_session_for_exception(session): - from courseflow.utils import as_local_time + from relate.utils import as_local_time result = ("started at %s" % as_local_time(session.start_time) .strftime('%b %d %Y - %I:%M %p')) diff --git a/doc/Makefile b/doc/Makefile index 02207b693c255ac1b08fc8aa77934740d263b03c..54ca9573e0e5ede999519825508e1801f7e529fb 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -85,17 +85,17 @@ qthelp: @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/courseflow.qhcp" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/relate.qhcp" @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/courseflow.qhc" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/relate.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/courseflow" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/courseflow" + @echo "# mkdir -p $$HOME/.local/share/devhelp/relate" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/relate" @echo "# devhelp" epub: diff --git a/doc/conf.py b/doc/conf.py index da7ad25216caa75c7fdc1c1152a8a8d7f90b9ef1..176575a3116012c571f1777c1ba968066a25cd71 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# courseflow documentation build configuration file, created by +# relate documentation build configuration file, created by # sphinx-quickstart on Thu Jun 26 18:41:17 2014. # # This file is execfile()d with the current directory set to its @@ -45,7 +45,7 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'CourseFlow' +project = u'RELATE' copyright = u'2014, Andreas Kloeckner' # The version info for the project you're documenting, acts as replacement for @@ -195,7 +195,7 @@ html_static_path = ['_static'] #html_file_suffix = None # Output file base name for HTML help builder. -htmlhelp_basename = 'courseflowdoc' +htmlhelp_basename = 'relatedoc' # -- Options for LaTeX output --------------------------------------------- @@ -215,7 +215,7 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'courseflow.tex', u'courseflow Documentation', + ('index', 'relate.tex', u'courseflow Documentation', u'Andreas Kloeckner', 'manual'), ] @@ -245,7 +245,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'courseflow', u'courseflow Documentation', + ('index', 'relate', u'courseflow Documentation', [u'Andreas Kloeckner'], 1) ] @@ -259,8 +259,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'courseflow', u'courseflow Documentation', - u'Andreas Kloeckner', 'courseflow', 'One line description of project.', + ('index', 'relate', u'courseflow Documentation', + u'Andreas Kloeckner', 'relate', 'One line description of project.', 'Miscellaneous'), ] diff --git a/doc/content.rst b/doc/content.rst index 59b00b851c072e2a5c4bc19b5459970d0c87b6f9..1c1ddb427be50be594681caff7b740bfec8f5b72 100644 --- a/doc/content.rst +++ b/doc/content.rst @@ -1,4 +1,4 @@ -Writing content for CourseFlow +Writing content for RELATE ============================== .. _git-repo: @@ -6,10 +6,10 @@ Writing content for CourseFlow Git repository -------------- -In CourseFlow, one course corresponds to one Git repository. +In RELATE, one course corresponds to one Git repository. -Data for a course in CourseFlow is contained in a `git `_ -repository. CourseFlow understands the structure of a repository and makes use +Data for a course in RELATE is contained in a `git `_ +repository. RELATE understands the structure of a repository and makes use of the version history present. For example, you could be previewing and testing some newly developed course content, while the students continue to work with a prior version until you make the new version explicitly available. @@ -20,7 +20,7 @@ sufficient privileges) may be previewing a different version of their choosing. .. note:: - When editing CourseFlow git repositories on Windows, make sure that the + When editing RELATE git repositories on Windows, make sure that the ``core.autocrlf`` option is set `appropriately `_ (namely, so that line endings are represented in the 'UNIX' convention, @@ -76,8 +76,8 @@ TODO: Macro expansion in YAML On system lock-in ----------------- -One key feature of CourseFlow is that the content you write for it is versatile -and easy to repurpose. To start, everything you write for CourseFlow is just +One key feature of RELATE is that the content you write for it is versatile +and easy to repurpose. To start, everything you write for RELATE is just a readable, plain text file, so there are no retrieval or interpretation issues. Next, the `pandoc `_ tool can be used to @@ -86,15 +86,15 @@ including LaTeX, HTML, MediaWiki, Microsoft Word, and many more. Further, YAML files are quite easy to read and traverse in most programming languages, facilitating automated coversion. `This example Python script -`_ -provided as part of CourseFlow takes a flow and converts it to a paper-based +`_ +provided as part of RELATE takes a flow and converts it to a paper-based worksheet. To do so, it makes use of `pypandoc `_ and `PyYAML `_. Validation ---------- -While YAML lets you define *arbitrary* structures, CourseFlow imposes a number of rules +While YAML lets you define *arbitrary* structures, RELATE imposes a number of rules on what your YAML documents should look like to be acceptable as course content. These rules are automatically checked as part of setting a new revision of the @@ -103,29 +103,29 @@ These rules are automatically checked as part of setting a new revision of the This helps avoid mistakes and ensures that the students always see a working site. -CourseFlow validation is also available as a stand-alone script :command:`cf-validate`. +RELATE validation is also available as a stand-alone script :command:`cf-validate`. This runs independently of git and the web site on the content developer's computer and provides validation feedback without having to commit and -upload the content to a CourseFlow site. This script can be installed by running:: +upload the content to a RELATE site. This script can be installed by running:: sudo pip install -r requirements.txt sudo python setup.py install -in the root directory of the CourseFlow distribution. +in the root directory of the RELATE distribution. .. _markup: -CourseFlow markup +RELATE markup ----------------- -All bulk text in CourseFlow is written in `Markdown +All bulk text in RELATE is written in `Markdown `_, with a few extensions. The linked page provides a (mostly) complete definition of the language. A 10-minute `tutorial `_ is available to provide a quick, approachable overview of Markdown. -To allow easy experimentation with markup, CourseFlow has a "markup sandbox" in -the "Teaching tools" menu where the rendered form of any CourseFlow markup can +To allow easy experimentation with markup, RELATE has a "markup sandbox" in +the "Teaching tools" menu where the rendered form of any RELATE markup can be previewed. In addition to standard Markdown, the following extensions are @@ -135,7 +135,7 @@ Custom URLs ^^^^^^^^^^^ A few custom URL schemas are provided to facilitate easy linking around -a CourseFlow site: +a RELATE site: * The URL schema ``flow:flow-name`` provides a link to the start page of a flow. @@ -176,7 +176,7 @@ in ``$$...$$``:: Symbols and Icons ^^^^^^^^^^^^^^^^^ -CourseFlow includes `FontAwesome `_, +RELATE includes `FontAwesome `_, a comprehensive symbol set by Dave Gandy. Symbols from `that set `_ can be included as follows:: @@ -194,13 +194,13 @@ creates a box with a recessed appearance around the content:: Exam 2 takes place **next week**. Make sure to [prepare early](flow:exam2-prep). -The attribute ``markdown="1"`` instructs CourseFlow to continue looking +The attribute ``markdown="1"`` instructs RELATE to continue looking for Markdown formatting inside the HTML element. Video ^^^^^ -CourseFlow includes `VideoJS `_ +RELATE includes `VideoJS `_ which lets you easily include HTML5 video in your course content. The following snippet shows an interactive video viewer:: @@ -231,7 +231,7 @@ of your :ref:`git-repo` containing the following text:: {%- endmacro %} -This could then be used from wherever CourseFlow markup is allowed:: +This could then be used from wherever RELATE markup is allowed:: [JINJA] @@ -309,11 +309,11 @@ Course Page Chunks Calendar and Events ------------------- -To allow course content to be reused easily from year to year, CourseFlow can +To allow course content to be reused easily from year to year, RELATE can assign symbolic names to particular dates in your course. For example, instead of writing ``2014-10-13``, you could write ``lecture 13`` or ``hw_due 5``. -To achieve this, each course in CourseFlow can store a list of events in its +To achieve this, each course in RELATE can store a list of events in its database. This data serves two purposes: * It provides data for the course calendar, available from the "Student" menu. @@ -348,10 +348,10 @@ sequence of steps: .. _datespec: -Specifying dates in CourseFlow +Specifying dates in RELATE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -In various places around its :ref:`YAML documents `, CourseFlow +In various places around its :ref:`YAML documents `, RELATE allows dates to be specified. The following formats are supported: * ``symbolic_name ordinal`` (e.g. ``lecture 13``) to refer to :ref:`calendear diff --git a/doc/flow.rst b/doc/flow.rst index aee75527d5552eb2b2f900cb5a5ae039d269b82c..a1d38b9a8bf156b61d87f7653449b3d57b5392bd 100644 --- a/doc/flow.rst +++ b/doc/flow.rst @@ -1,7 +1,7 @@ Flows ===== -All interactive content in CourseFlow is part of a *flow*. +All interactive content in RELATE is part of a *flow*. .. _flow-access-rules: @@ -14,7 +14,7 @@ Access rules Permissions ----------- -CourseFlow currently supports the following permissions: +RELATE currently supports the following permissions: .. currentmodule:: course.constants diff --git a/doc/index.rst b/doc/index.rst index b3f0150679900279b2ba9375463a74737ecd96ca..43d38080b85cd021469704dc10d879793afea939 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -1,10 +1,10 @@ -Welcome to CourseFlow's documentation! +Welcome to RELATE's documentation! ====================================== *"I just want to ask my students some quiz questions online. How hard could it possibly be?"* -CourseFlow is a `Django `_-based courseware +RELATE is a `Django `_-based courseware package that lets students participate in online activities. Each such activity is called a "flow". It flows over a couple of pages, each of which can be, say, a video, a quiz question, a page of text, or, within the confines of HTML, diff --git a/doc/misc.rst b/doc/misc.rst index 7853e96feeee503f9e0cc5dabc76967080f3bda4..45c300069d7b9c0e8bf3787efc01d40486f62b74 100644 --- a/doc/misc.rst +++ b/doc/misc.rst @@ -1,7 +1,7 @@ Installation ============ -CourseFlow currently works with Python 2.7. (This is because `dulwich +RELATE currently works with Python 2.7. (This is because `dulwich `_, a dependency, does not yet support Python 3.) @@ -10,16 +10,16 @@ web page. (Optional) Make a virtualenv to install to:: - virtualenv --system-site-packages my-courseflow-env - source my-courseflow-env/bin/activate + virtualenv --system-site-packages my-relate-env + source my-relate-env/bin/activate To install, clone the repository:: - git clone git://github.com/inducer/courseflow + git clone git://github.com/inducer/relate -Enter the courseflow directory:: +Enter the relate directory:: - cd courseflow + cd relate Install the dependencies:: @@ -77,7 +77,7 @@ First public release. License ======= -CourseFlow is licensed to you under the MIT/X Consortium license: +RELATE is licensed to you under the MIT/X Consortium license: Copyright (c) 2014 Andreas Klöckner and Contributors. diff --git a/doc/upload-docs.sh b/doc/upload-docs.sh index 9beb4889c4e37ff864ffd7b10806ef62f52ba7c0..e2ff98c910697215eb47d9bdcdbb73af2c6a82dd 100755 --- a/doc/upload-docs.sh +++ b/doc/upload-docs.sh @@ -1,3 +1,3 @@ #! /bin/sh -rsync --progress --verbose --archive --delete _build/html/* doc-upload:doc/courseflow +rsync --progress --verbose --archive --delete _build/html/* doc-upload:doc/relate diff --git a/find-user-from-session-key b/find-user-from-session-key index 8cff78b695c401acc31a859cf80b68b56bb0780e..a3bd73ae3244c1dc2f13377b21a95d7ce407b944 100755 --- a/find-user-from-session-key +++ b/find-user-from-session-key @@ -1,6 +1,6 @@ #! /usr/bin/env python import os -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "courseflow.settings") +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "relate.settings") import django django.setup() diff --git a/local_settings.py.example b/local_settings.py.example index af6180a57a50a59595557804d92e77b6038075d3..643048c616818fa37c042e899763706626f00889 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -3,7 +3,7 @@ SECRET_KEY = '' ALLOWED_HOSTS = [ - "courseflow.example.com", + "relate.example.com", ] # Uncomment this to use a real database. If left commented out, a local SQLite3 @@ -12,8 +12,8 @@ ALLOWED_HOSTS = [ # DATABASES = { # 'default': { # 'ENGINE':'django.db.backends.postgresql_psycopg2', -# 'NAME': 'courseflow', -# 'USER': 'courseflow', +# 'NAME': 'relate', +# 'USER': 'relate', # 'PASSWORD': '', # 'HOST': '127.0.0.1', # 'PORT': '5432', @@ -36,7 +36,7 @@ TEMPLATE_DEBUG = DEBUG # Your course git repositories will be stored under this directory. # Make sure it's writable by your web user. # -# The default below makes them sit side-by-side with your courseflow checkout, +# The default below makes them sit side-by-side with your relate checkout, # which makes sense for development, but you probably want to change this # in production. # diff --git a/manage.py b/manage.py index 7009131ee25a40a0912373a0dbc1c126f54a7fa4..6a1d3624223a6cb76f838a19b944d21574499522 100755 --- a/manage.py +++ b/manage.py @@ -3,7 +3,7 @@ import os import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "courseflow.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "relate.settings") from django.core.management import execute_from_command_line diff --git a/courseflow/__init__.py b/relate/__init__.py similarity index 100% rename from courseflow/__init__.py rename to relate/__init__.py diff --git a/courseflow/settings.py b/relate/settings.py similarity index 90% rename from courseflow/settings.py rename to relate/settings.py index 5f3a11340ebcb297977ec1409fd6b9ae12a9e40a..d247b8ae83168b0f53fc23bfca947e3b83cf9413 100644 --- a/courseflow/settings.py +++ b/relate/settings.py @@ -1,5 +1,5 @@ """ -Django settings for courseflow project. +Django settings for relate project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ @@ -67,7 +67,7 @@ AUTHENTICATION_BACKENDS = ( TEMPLATE_CONTEXT_PROCESSORS = ( TEMPLATE_CONTEXT_PROCESSORS + ( - "courseflow.utils.settings_context_processor", + "relate.utils.settings_context_processor", "course.auth.impersonation_context_processor", "course.views.fake_time_context_processor", ) @@ -98,14 +98,14 @@ CODEMIRROR_PATH = "codemirror" # }}} -ROOT_URLCONF = 'courseflow.urls' +ROOT_URLCONF = 'relate.urls' -WSGI_APPLICATION = 'courseflow.wsgi.application' +WSGI_APPLICATION = 'relate.wsgi.application' CRISPY_TEMPLATE_PACK = "bootstrap3" TEMPLATE_DIRS = ( - join(BASE_DIR, "courseflow", "templates"), + join(BASE_DIR, "relate", "templates"), ) @@ -137,14 +137,14 @@ LOGIN_REDIRECT_URL = "/" # https://docs.djangoproject.com/en/dev/howto/static-files/ STATICFILES_DIRS = ( - join(BASE_DIR, "courseflow", "static"), + join(BASE_DIR, "relate", "static"), ) STATIC_URL = '/static/' STATIC_ROOT = join(BASE_DIR, "static") -SESSION_COOKIE_NAME = 'courseflow_sessionid' +SESSION_COOKIE_NAME = 'relate_sessionid' SESSION_COOKIE_AGE = 12096000 # 20 weeks for name, val in local_settings.items(): diff --git a/courseflow/static/css/style.css b/relate/static/css/style.css similarity index 100% rename from courseflow/static/css/style.css rename to relate/static/css/style.css diff --git a/courseflow/static/images/busy.gif b/relate/static/images/busy.gif similarity index 100% rename from courseflow/static/images/busy.gif rename to relate/static/images/busy.gif diff --git a/courseflow/templates/403.html b/relate/templates/403.html similarity index 100% rename from courseflow/templates/403.html rename to relate/templates/403.html diff --git a/courseflow/templates/404.html b/relate/templates/404.html similarity index 100% rename from courseflow/templates/404.html rename to relate/templates/404.html diff --git a/courseflow/templates/500.html b/relate/templates/500.html similarity index 100% rename from courseflow/templates/500.html rename to relate/templates/500.html diff --git a/courseflow/templates/admin/base_site.html b/relate/templates/admin/base_site.html similarity index 57% rename from courseflow/templates/admin/base_site.html rename to relate/templates/admin/base_site.html index baab34094779b2b48de0eb052c17652f788f2b6b..255d165d93f2fd92f0b3c84dd64b306411b6311b 100644 --- a/courseflow/templates/admin/base_site.html +++ b/relate/templates/admin/base_site.html @@ -1,5 +1,5 @@ {% extends "admin/base.html" %} {% block branding %} -

CourseFlow Administration

+

RELATE Administration

{% endblock %} diff --git a/courseflow/templates/base.html b/relate/templates/base.html similarity index 98% rename from courseflow/templates/base.html rename to relate/templates/base.html index 9c8a2fd124e60ea4e09a450eba7c3c71db9b4874..50771fb61485ea89978f39d9fa18f81dc67ab297 100644 --- a/courseflow/templates/base.html +++ b/relate/templates/base.html @@ -11,7 +11,7 @@ - {%block title %}CourseFlow{% endblock %} + {%block title %}Relate{% endblock %} @@ -54,7 +54,7 @@ - {%block brand %}CourseFlow{% endblock %} + {%block brand %}Relate{% endblock %}