mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Do something slightly better for loged in students.
This commit is contained in:
parent
dfdfbf620c
commit
e40b952ef2
3 changed files with 5 additions and 3 deletions
|
@ -94,6 +94,7 @@
|
|||
goto_classes: "Go to my Classes"
|
||||
educator_wiki: "Educator wiki"
|
||||
view_profile: "View My Profile"
|
||||
view_progress: "View Progress"
|
||||
login_switch: "Have an account?"
|
||||
check_out_wiki: "Check out our new educator Wiki"
|
||||
want_coco: "Want CodeCombat at your school?"
|
||||
|
|
|
@ -87,16 +87,16 @@ mixin box
|
|||
|
||||
else if view.justPlaysCourses()
|
||||
div
|
||||
button.teacher-btn.btn.btn-forest.btn-lg.btn-block(data-i18n="new_home.goto_classes")
|
||||
a.btn.btn-forest.btn-lg.btn-block(href='/play/', data-i18n="courses.continue_playing")
|
||||
div
|
||||
a.btn.btn-primary.btn-lg.btn-block(href="https://sites.google.com/a/codecombat.com/teacher-guides/course-guides", data-i18n="new_home.educator_wiki")
|
||||
|
||||
a.btn.btn-primary.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="new_home.view_progress")
|
||||
else
|
||||
div
|
||||
a.btn.btn-forest.btn-lg.btn-block.play-btn(href=view.playURL, data-i18n="courses.continue_playing")
|
||||
div
|
||||
a.btn.btn-primary.btn-lg.btn-block(href="/user/#{me.getSlugOrID()}", data-i18n="new_home.view_profile")
|
||||
|
||||
|
||||
p.small
|
||||
span(data-i18n="courses.not_you")
|
||||
span
|
||||
|
|
|
@ -108,6 +108,7 @@ module.exports = class NewHomeView extends RootView
|
|||
|
||||
justPlaysCourses: ->
|
||||
# This heuristic could be better, but currently we don't add to me.get('courseInstances') for single-player anonymous intro courses, so they have to beat a level without choosing a hero.
|
||||
return true if me.get('role') is 'student'
|
||||
return me.get('stats')?.gamesCompleted and not me.get('heroConfig')
|
||||
|
||||
isNewPlayer: ->
|
||||
|
|
Loading…
Reference in a new issue