2016-07-28 16:39:58 -04:00
|
|
|
module.exports =
|
|
|
|
playDevLevel: ({level, session, course}) ->
|
|
|
|
shareURL = "#{window.location.origin}/play/#{level.get('type')}-level/#{level.get('slug')}/#{session.id}"
|
|
|
|
shareURL += "?course=#{course.id}" if course
|
|
|
|
return shareURL
|
2016-08-19 18:48:45 -04:00
|
|
|
|
|
|
|
courseArenaLadder: ({level, courseInstance}) ->
|
|
|
|
"/play/ladder/#{level.get('slug')}/course/#{courseInstance.id}"
|
|
|
|
|
2016-09-01 19:20:00 -04:00
|
|
|
courseLevel: ({level, courseInstance}) ->
|
|
|
|
url = "/play/level/#{level.get('slug')}?course=#{courseInstance.get('courseID')}&course-instance=#{courseInstance.id}"
|
|
|
|
url += "&codeLanguage=#{level.get('primerLanguage')}" if level.get('primerLanguage')
|
|
|
|
url
|