I believe that's a user error (or an affordance error?) Even so, for a
given server serving both preview and live, settings.SITE_NAME should now
be the live host not the preview; so, this special handling would only be
needed in installations which have separate preview and live servers. Even
then, I think they may be able to set the SITE_NAME to the live host on
both.


On Thu, Nov 14, 2013 at 10:16 AM, Adam <notifications@github.com> wrote:

> In lms/djangoapps/instructor/enrollment.py:
>
> > @@ -141,3 +174,82 @@ def _reset_module_attempts(studentmodule):
> >      # save
> >      studentmodule.state = json.dumps(problem_state)
> >      studentmodule.save()
> > +
> > +
> > +def get_email_params(course, auto_enroll):
> > +    """
> > +    Generate parameters used when parsing email templates.
> > +
> > +    `auto_enroll` is a flag for auto enrolling non-registered students: (a `boolean`)
> > +    Returns a dict of parameters
> > +    """
> > +
> > +    stripped_site_name = _remove_preview(settings.SITE_NAME)
>
> I added that because course teams were previewing their courses, then
> enrolling people in their courses, so students would get emails to enroll
> in preview.courses.edx.org/....
>
> If something changed that would keep that kind of error from happening,
> I'm all for dropping *remove*preview.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/edx/edx-platform/pull/1643/files#r7661512>
> .
>