From c595183177d98bf56142950ff843b0669aea0dcb Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Fri, 19 Aug 2016 16:47:25 -0700 Subject: [PATCH 1/4] Remove teacher class view progress dot padding --- app/styles/courses/teacher-class-view.sass | 1 - 1 file changed, 1 deletion(-) diff --git a/app/styles/courses/teacher-class-view.sass b/app/styles/courses/teacher-class-view.sass index efd6757e9..7a3a0ce5b 100644 --- a/app/styles/courses/teacher-class-view.sass +++ b/app/styles/courses/teacher-class-view.sass @@ -260,7 +260,6 @@ min-width: 34px height: 34px border-radius: 16px - padding: 0 10px // margin-top: 23px // margin-bottom: 23px background: $gray-light From 0cae331e2fc5e76179ad9e0f55a75ab9ea22779f Mon Sep 17 00:00:00 2001 From: Matt Lott Date: Fri, 19 Aug 2016 16:48:04 -0700 Subject: [PATCH 2/4] Update gd2 and wd2 to released --- scripts/mongodb/updateCourses.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mongodb/updateCourses.js b/scripts/mongodb/updateCourses.js index 0d10d9cd7..bc87db27f 100644 --- a/scripts/mongodb/updateCourses.js +++ b/scripts/mongodb/updateCourses.js @@ -64,7 +64,7 @@ var courses = description: "Learn more advanced game development.", duration: NumberInt(2), free: false, - releasePhase: 'beta' + releasePhase: 'released' }, { name: "Web Development 2", @@ -73,7 +73,7 @@ var courses = description: "Learn more advanced web development, including scripting to make interactive webpages.", duration: NumberInt(2), free: false, - releasePhase: 'beta' + releasePhase: 'released' }, { name: "Computer Science 4", From 611368f7427ce0e13ddac1e00c5424440837bfb0 Mon Sep 17 00:00:00 2001 From: Robin Yang Date: Fri, 19 Aug 2016 14:05:21 -0700 Subject: [PATCH 3/4] Add Resource Hub to teacher dashboard --- app/core/Router.coffee | 2 + app/styles/teachers/ResourceHubView.sass | 20 ++++++++ .../courses/teacher-dashboard-nav.jade | 3 ++ .../teachers/markdown-resource-view.jade | 8 +++ app/templates/teachers/resource-hub-view.jade | 49 +++++++++++++++++++ .../teachers/MarkdownResourceView.coffee | 16 ++++++ app/views/teachers/ResourceHubView.coffee | 5 ++ 7 files changed, 103 insertions(+) create mode 100644 app/styles/teachers/ResourceHubView.sass create mode 100644 app/templates/teachers/markdown-resource-view.jade create mode 100644 app/templates/teachers/resource-hub-view.jade create mode 100644 app/views/teachers/MarkdownResourceView.coffee create mode 100644 app/views/teachers/ResourceHubView.coffee diff --git a/app/core/Router.coffee b/app/core/Router.coffee index f083ae0c4..c083e408d 100644 --- a/app/core/Router.coffee +++ b/app/core/Router.coffee @@ -158,6 +158,8 @@ module.exports = class CocoRouter extends Backbone.Router 'teachers/licenses': go('courses/EnrollmentsView', { teachersOnly: true }) 'teachers/freetrial': go('teachers/RequestQuoteView') 'teachers/quote': redirect('/teachers/demo') + 'teachers/resources': go('teachers/ResourceHubView') + 'teachers/resources/:name': go('teachers/MarkdownResourceView') 'teachers/signup': -> return @routeDirectly('teachers/CreateTeacherAccountView', []) if me.isAnonymous() @navigate('/teachers/update-account', {trigger: true, replace: true}) diff --git a/app/styles/teachers/ResourceHubView.sass b/app/styles/teachers/ResourceHubView.sass new file mode 100644 index 000000000..dae0d105d --- /dev/null +++ b/app/styles/teachers/ResourceHubView.sass @@ -0,0 +1,20 @@ +#resource-hub-view, #markdown-resource-view + + .content + margin: 0 auto 0 auto + // padding: 50px + + .content + + h4 + margin: 20px 0 0 0 + + ul + margin: 0 0 50px 0 + + h4 + .comingsoon + text-align: center + margin: 0 auto 0 auto + color: #666 + margin: 30px 0 0 0 diff --git a/app/templates/courses/teacher-dashboard-nav.jade b/app/templates/courses/teacher-dashboard-nav.jade index 6ee1bb32b..21118822a 100644 --- a/app/templates/courses/teacher-dashboard-nav.jade +++ b/app/templates/courses/teacher-dashboard-nav.jade @@ -21,6 +21,9 @@ li(class= path.indexOf('/teachers/licenses') === 0 ? 'active' : '') a(href='/teachers/licenses') small.label(data-i18n='teacher.enrollments') + li(class= path.indexOf('/teachers/resources') === 0 ? 'active' : '') + a(href='/teachers/resources') + small.label Resource Hub //- li(class= path.indexOf('TODO') === 0 ? 'active' : '') //- a(href='TODO') //- small.label(data-i18n='teacher.resources') diff --git a/app/templates/teachers/markdown-resource-view.jade b/app/templates/teachers/markdown-resource-view.jade new file mode 100644 index 000000000..ab06644ed --- /dev/null +++ b/app/templates/teachers/markdown-resource-view.jade @@ -0,0 +1,8 @@ +extends /templates/base-flat + +block page_nav + include ../courses/teacher-dashboard-nav.jade + +block content + + .container!=view.content diff --git a/app/templates/teachers/resource-hub-view.jade b/app/templates/teachers/resource-hub-view.jade new file mode 100644 index 000000000..fc7808f59 --- /dev/null +++ b/app/templates/teachers/resource-hub-view.jade @@ -0,0 +1,49 @@ +extends /templates/base-flat + +block page_nav + include ../courses/teacher-dashboard-nav.jade + +block content + + .container + + .content + h1 Resource Hub + + + h4 Getting Started + ul + li + a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") Teacher Getting Started Guide [PDF] + p New to CodeCombat? Download this Teacher Getting Started Guide to set up your account, create your first class, and invite students to the first course. + li + a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") Student Quick Start Guide [PDF] + p You can distribute this guide to your students before starting CodeCombat so that they can familiarize themselves with the code editor. This guide can be used for both Python and JavaScript classrooms. + + // + li + a(href="http://example.com") Teacher Debugging Guide (3 types of problems) + + h4 Introduction to Computer Science + ul + + li + a(href="http://files.codecombat.com/docs/resources/Course1PythonSyntaxGuide.pdf" target="blank") Course 1 Python Syntax Guide [PDF] + p Cheatsheet with references to common Python syntax that students will learn in Introduction to Computer Science. + li + a(href="http://files.codecombat.com/docs/resources/Course1JavaScriptSyntaxGuide.pdf" target="blank") Course 1 JavaScript Syntax Guide [PDF] + p Cheatsheet with references to common JavaScript syntax that students will learn in Introduction to Computer Science. + + // + h4 Computer Science 2 + ul + li + a(href="http://example.com") Course 2 Lesson Plans + li + a(href="http://example.com") Course 2 Python Syntax Guide [PDF] + li + a(href="http://example.com") Course 2 JavaScript Syntax Guide [PDF] + + h4 + .comingsoon + i Additional guides coming soon! diff --git a/app/views/teachers/MarkdownResourceView.coffee b/app/views/teachers/MarkdownResourceView.coffee new file mode 100644 index 000000000..8a46fd04d --- /dev/null +++ b/app/views/teachers/MarkdownResourceView.coffee @@ -0,0 +1,16 @@ +RootView = require 'views/core/RootView' + +module.exports = class MarkdownResourceView extends RootView + id: 'markdown-resource-view' + template: require 'templates/teachers/markdown-resource-view' + initialize: (options, @name) -> + super(options) + @content = '' + $.get '/markdown/' + @name + '.md', (data) => + console.log typeof data, data + if data.indexOf('') is -1 + @content = marked(data, sanitize: false) + else + @content = "

Not Found

" + + @render() diff --git a/app/views/teachers/ResourceHubView.coffee b/app/views/teachers/ResourceHubView.coffee new file mode 100644 index 000000000..25c3153be --- /dev/null +++ b/app/views/teachers/ResourceHubView.coffee @@ -0,0 +1,5 @@ +RootView = require 'views/core/RootView' + +module.exports = class ResourceHubView extends RootView + id: 'resource-hub-view' + template: require 'templates/teachers/resource-hub-view' From 2b586420f35a3d6c4b19bd651423e7b60a73b1ff Mon Sep 17 00:00:00 2001 From: Robin Yang Date: Fri, 19 Aug 2016 15:47:15 -0700 Subject: [PATCH 4/4] Add i18n for Resource Hub --- app/locale/en.coffee | 13 +++++ .../courses/teacher-dashboard-nav.jade | 2 +- app/templates/teachers/resource-hub-view.jade | 48 ++++++++----------- .../teachers/MarkdownResourceView.coffee | 1 - 4 files changed, 35 insertions(+), 29 deletions(-) diff --git a/app/locale/en.coffee b/app/locale/en.coffee index edb3c4344..f05c6568e 100644 --- a/app/locale/en.coffee +++ b/app/locale/en.coffee @@ -888,6 +888,7 @@ more_info_3: "is a good place to connect with fellow educators who are using CodeCombat." licenses_needed: "Licenses needed" + teachers_quote: name: "Demo Form" title: "Request a Demo" @@ -1508,6 +1509,18 @@ project: "Project" view_student_project: "View Student Project" view_arena_ladder: "View Arena Ladder" + resource_hub: "Resource Hub" + getting_started: "Getting Started" + teacher_getting_started: "Teacher Getting Started Guide" + teacher_getting_started_desc: "New to CodeCombat? Download this Teacher Getting Started Guide to set up your account, create your first class, and invite students to the first course." + student_getting_started: "Student Quick Start Guide" + student_getting_started_desc: "You can distribute this guide to your students before starting CodeCombat so that they can familiarize themselves with the code editor. This guide can be used for both Python and JavaScript classrooms." + cs1: "Introduction to Computer Science" + cs1_syntax_python: "Course 1 Python Syntax Guide" + cs1_syntax_python_desc: "Cheatsheet with references to common Python syntax that students will learn in Introduction to Computer Science." + cs1_syntax_javascript: "Course 1 JavaScript Syntax Guide" + cs1_syntax_javascript_desc: "Cheatsheet with references to common JavaScript syntax that students will learn in Introduction to Computer Science." + coming_soon: "Additional guides coming soon!" sharing: game: "Game" diff --git a/app/templates/courses/teacher-dashboard-nav.jade b/app/templates/courses/teacher-dashboard-nav.jade index 21118822a..ebc898532 100644 --- a/app/templates/courses/teacher-dashboard-nav.jade +++ b/app/templates/courses/teacher-dashboard-nav.jade @@ -23,7 +23,7 @@ small.label(data-i18n='teacher.enrollments') li(class= path.indexOf('/teachers/resources') === 0 ? 'active' : '') a(href='/teachers/resources') - small.label Resource Hub + small.label(data-i18n='teacher.resource_hub') //- li(class= path.indexOf('TODO') === 0 ? 'active' : '') //- a(href='TODO') //- small.label(data-i18n='teacher.resources') diff --git a/app/templates/teachers/resource-hub-view.jade b/app/templates/teachers/resource-hub-view.jade index fc7808f59..ad5c599fa 100644 --- a/app/templates/teachers/resource-hub-view.jade +++ b/app/templates/teachers/resource-hub-view.jade @@ -8,42 +8,36 @@ block content .container .content - h1 Resource Hub + h1(data-i18n="teacher.resource_hub") - h4 Getting Started + h4(data-i18n="teacher.getting_started") ul li - a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") Teacher Getting Started Guide [PDF] - p New to CodeCombat? Download this Teacher Getting Started Guide to set up your account, create your first class, and invite students to the first course. + a(href="http://files.codecombat.com/docs/resources/TeacherGettingStartedGuide.pdf" target="blank") + span(data-i18n="teacher.teacher_getting_started") + span.spl [PDF] + p(data-i18n="teacher.teacher_getting_started_desc") li - a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") Student Quick Start Guide [PDF] - p You can distribute this guide to your students before starting CodeCombat so that they can familiarize themselves with the code editor. This guide can be used for both Python and JavaScript classrooms. + a(href="http://files.codecombat.com/docs/resources/StudentQuickStartGuide.pdf" target="blank") + span(data-i18n="teacher.student_getting_started") + span.spl [PDF] + p(data-i18n="teacher.student_getting_started_desc") - // - li - a(href="http://example.com") Teacher Debugging Guide (3 types of problems) - - h4 Introduction to Computer Science + h4(data-i18n="teacher.cs1") ul li - a(href="http://files.codecombat.com/docs/resources/Course1PythonSyntaxGuide.pdf" target="blank") Course 1 Python Syntax Guide [PDF] - p Cheatsheet with references to common Python syntax that students will learn in Introduction to Computer Science. + a(href="http://files.codecombat.com/docs/resources/Course1PythonSyntaxGuide.pdf" target="blank") + span(data-i18n="teacher.cs1_syntax_python") + span.spl [PDF] + p(data-i18n="teacher.cs1_syntax_python_desc") li - a(href="http://files.codecombat.com/docs/resources/Course1JavaScriptSyntaxGuide.pdf" target="blank") Course 1 JavaScript Syntax Guide [PDF] - p Cheatsheet with references to common JavaScript syntax that students will learn in Introduction to Computer Science. + a(href="http://files.codecombat.com/docs/resources/Course1JavaScriptSyntaxGuide.pdf" target="blank") + span(data-i18n="teacher.cs1_syntax_javascript") + span.spl [PDF] + p(data-i18n="teacher.cs1_syntax_javascript_desc") - // - h4 Computer Science 2 - ul - li - a(href="http://example.com") Course 2 Lesson Plans - li - a(href="http://example.com") Course 2 Python Syntax Guide [PDF] - li - a(href="http://example.com") Course 2 JavaScript Syntax Guide [PDF] - - h4 + h4 .comingsoon - i Additional guides coming soon! + i(data-i18n="teacher.coming_soon") diff --git a/app/views/teachers/MarkdownResourceView.coffee b/app/views/teachers/MarkdownResourceView.coffee index 8a46fd04d..21f12b974 100644 --- a/app/views/teachers/MarkdownResourceView.coffee +++ b/app/views/teachers/MarkdownResourceView.coffee @@ -7,7 +7,6 @@ module.exports = class MarkdownResourceView extends RootView super(options) @content = '' $.get '/markdown/' + @name + '.md', (data) => - console.log typeof data, data if data.indexOf('') is -1 @content = marked(data, sanitize: false) else