Properly compute the name of our tutorial stream server-side.

It's subtle, but the slice was in the wrong place and wasn't
actually truncating the stream name at all, so the client and
server disagreed about where the tutorial messages should go.

(It might be the case that we should accept the tutorial stream
name from the client directly, rather than computing it in two
places.)

(imported from commit 8273223f182e8ad36eaea1cbf75e1426fcfdfbab)
This commit is contained in:
Waseem Daher
2013-04-23 16:04:28 -04:00
parent c05c391c31
commit eab43f28f4
2 changed files with 9 additions and 2 deletions

View File

@@ -269,6 +269,8 @@ exports.is_running = function () {
function make_script() {
my_tutorial_stream = 'tutorial-' + page_params.email.split('@')[0];
// If you change this, you need to change the corresponding
// client-computed version in models.py on the server.
my_tutorial_stream = my_tutorial_stream.substring(0, 30);
script = [