Merge remote-tracking branch 'upstream/master'

This commit is contained in:
tahmidshahriar 2015-07-01 10:54:37 -07:00
commit 62b050f6d8
9 changed files with 104 additions and 27 deletions

View file

@ -1212,6 +1212,7 @@
variables: "Variables"
vectors: "Vectors"
while_loops: "While Loops"
recursion: "Recursion"
delta:
added: "Added"

View file

@ -34,6 +34,7 @@ defaultTasks = [
'Write the guide.'
'Write a loading tip, if needed.'
'Click the Populate i18n button.'
'Add programming concepts covered.'
'Mark whether it requires a subscription.'
'Release to everyone via MailChimp.'

View file

@ -255,4 +255,5 @@ me.concept = me.shortString enum: [
'variables'
'vectors'
'while_loops'
'recursion'
]

View file

@ -5,3 +5,8 @@
.select-language
width: 200px
display: inline
.select-session
width: 300px
display: inline

View file

@ -9,3 +9,6 @@
.enroll-container
margin: 5% 20%
width: 60%
.session-name
width: 300px

View file

@ -8,24 +8,43 @@ block content
span *UNDER CONSTRUCTION, send feedback to
a.spl(href='mailto:team@codecombat.com') team@codecombat.com
div
input(type='checkbox')
input.student-view-checkbox(type='checkbox')
span.spl Student view
div TODO: edit button for class name
div TODO: description field
div TODO: fix ugly tabs
div TODO: add student progress monitoring
div TODO: level concepts, status, working play button
div TODO: select course session
div TODO: no unlock code or capacity limit for first course
div TODO: student view
div(style='border-bottom: 1px solid black')
div(style='border-bottom: 1px solid black;')
h1= course.title
p Class name: #{instance.name}
p= course.description
p
strong Concepts:
ul
each topic in course.topics
li= topic
strong= course.duration
p Select programming languages available to students.
h3 Your Class
.form-group
select.form-control.select-language
select.form-control.select-session
each instance in instances
option= instance.name
span.spl
button.btn.btn-xs.edit-class-name-btn edit class name
p
if instance.description
span= instance.description
span.spl
button.btn.btn-xs.edit-description-btn edit class description
else
div
button.btn.btn-xs.edit-description-btn add class description
.form-group
span Class programming language:
select.spl.form-control.select-language
option(value="Python") Python
option(value="JavaScript") JavaScript
option(value="All Languages") All Languages
@ -56,6 +75,7 @@ block content
.tab-pane#invite(role='tabpanel')
p Invite students to join this class.
if course.title !== 'Introduction to Computer Science'
p Student unlock code: #{instance.code}
p Class capacity: 34/50

View file

@ -64,7 +64,10 @@ block content
span Up to 500 students $2999
else
span Up to 500 students $799
h3 3. Finish Purchase
h3 3. Pick a name for your class
p Displayed on the course page for you and your students.
input.session-name(type='text', placeholder="Mrs. Smith's 4th Period")
h3 4. Finish Purchase
p After purchase you will be able to invite your students to enroll in the selected course.
p.center
button.btn.btn-info.btn-lg.btn-buy Buy #{selectedCourseTitle} for $#{price}

View file

@ -2,12 +2,15 @@ app = require 'core/application'
RootView = require 'views/core/RootView'
template = require 'templates/courses/mock1/course-details'
# TODO: show invite tab and no students tab if no students
module.exports = class CourseDetailsView extends RootView
id: 'course-details-view'
template: template
events:
'click .edit-class-name-btn': 'onClickEditClassName'
'click .edit-description-btn': 'onClickEditClassDescription'
'change .select-session': 'onChangeSession'
constructor: (options, @courseID) ->
super options
@initData()
@ -15,10 +18,25 @@ module.exports = class CourseDetailsView extends RootView
getRenderData: ->
context = super()
context.course = @course ? {}
context.instance = @instance ? {}
context.instance = @instances?[@currentInstanceIndex] ? {}
context.instances = @instances ? []
context
initData: ->
mockData = require 'views/courses/mock1/CoursesMockData'
@course = mockData.courses[@courseID]
@instance = mockData.instances[_.random(0, mockData.instances.length - 1)]
# @instance = mockData.instances[_.random(0, mockData.instances.length - 1)]
@currentInstanceIndex = 0
@instances = mockData.instances
onChangeSession: (e) ->
newSessionValue = $(e.target).val()
for val, index in @instances when val.name is newSessionValue
@currentInstanceIndex = index
@render?()
onClickEditClassName: (e) ->
alert 'TODO: Popup for editing name for this course session'
onClickEditClassDescription: (e) ->
alert 'TODO: Popup for editing description for this course session'

View file

@ -1,66 +1,87 @@
data = {}
data.concepts = [
'Advanced Strings'
'Algorithms'
'Arithmetic'
'Arrays'
'Basic Syntax'
'Boolean Logic'
'Break Statements'
'Classes'
'For Loops'
'Functions'
'If Statements'
'Input Handling'
'Math Operations'
'Object Literals'
'Strings'
'Variables'
'Vectors'
'While Loops'
]
data.courses = [
{
title: 'Introduction to Computer Science'
description: 'Learn basic syntax, method calls, and the CodeCombat learning environment.'
topics: ['Basic syntax', 'Method calls', 'String constants', 'while loops', 'Game mechanic: movement', 'Game mechanic: combat']
description: 'Learn basic syntax, while loops, and the CodeCombat learning environment.'
topics: ['Basic syntax', 'Strings', 'While Loops']
duration: '1 hour of material'
levels: ['Dungeons of Kithgard', 'Gems in the Deep', 'Shadow Guard', 'Kounter Kithwise', 'Crawlways of Kithgard', 'Enemy Mine', 'Illusory Interruption', 'Forgetful Gemsmith', 'Signs and Portents', 'Favorable Odds', 'True Names', 'The Prisoner', 'Banefire', 'The Raised Sword', 'Haunted Kithmaze', 'Riddling Kithmaze', 'Descending Further', 'The Second Kithmaze', 'Dread Door', 'Cupboards of Kithgard', 'Hack and Dash']
},
{
title: 'Computer Science 102'
description: 'Add parameters, if statements, and some other stuff.'
topics: ['Parameters', 'Variables', 'Booleans', 'if statement', 'Arithmetic', 'Game mechanic: building']
topics: ['Variables', 'Booleans', 'If Statements', 'Arithmetic']
duration: '5 hours of material'
levels: ['Known Enemy', 'Master of Names', 'Lowly Kithmen', 'Closing the Distance', 'Tactical Strike', 'The Final Kithmaze', 'The Gauntlet', 'Radiant Aura', 'Kithgard Gates', 'Destroying Angel', 'Deadly Dungeon Rescue', 'Kithgard Brawl', 'Cavern Survival', 'Breakout', 'Attack Wisely!', 'Kithgard Mastery', 'Kithgard Apprentice', 'Long Kithmaze', 'Boom! and Bust', 'Defense of Plainswood', 'Winding Trail', 'Thumb Biter', 'Gems or Death', 'Backwoods Ambush', 'Patrol Buster', 'Endangered Burl', 'Village Guard', 'Thornbush Farm', 'Back to Back', 'Ogre Encampment', 'Woodland Cleaver', 'Shield Rush', 'Peasant Protection', 'Munchkin Swarm']
},
{
title: 'Computer Science 103'
description: 'Learn how to handle input.'
topics: ['Handling input', 'Game mechanic: gathering']
topics: ['If Statements', 'Arithmetic', 'Input Handling']
duration: '5 hours of material'
levels: ['Munchkin Harvest', 'Swift Dagger', 'Shrapnel', 'Arcane Ally', 'Touch of Death', 'Bonemender', 'Coinucopia', 'Copper Meadows', 'Drop the Flag', 'Deadly Pursuit', 'Rich Forager', 'Siege of Stonehold', 'Multiplayer Treasure Grove', 'Dueling Grounds', 'Backwoods Brawl', 'Backwoods Treasure', 'Range Finder', 'Stillness in Motion', 'The Agrippa Defense', 'Storming the Towers of Areth', 'Hold the Forest Pass', 'Hold for Reinforcements', 'Storming the Farmhouse', 'Wild Horses', 'Boulder Woods', 'Unfair Support', 'Tactical Timing', 'Apocalypse', 'Doom Glade', 'Defend the Garrison', 'Lost Viking', 'Forest Flower Grove', 'The Dunes', 'The Mighty Sand Yak', 'Oasis', 'Sarven Road', 'Sarven Gaps', 'Thunderhooves', 'Medical Attention', 'The Great Yak Stampede', 'Minesweeper', 'Sarven Sentry', 'Keeping Time']
},
{
title: 'Computer Science 104'
description: 'Time to tackle arrays and some pvp stuff.'
topics: ['Arrays', 'break statement', 'Game mechanic: multiplayer']
topics: ['Arrays', 'Break Statements']
duration: '5 hours of material'
levels: ['Hoarding Gold', 'Decoy Drill', 'Yakstraction', 'Sarven Brawl', 'Desert Combat', 'Dust', 'Sarven Rescue', 'Sacred Statue', 'Mirage Maker', 'Sarven Savior', 'Odd Sandstorm', 'Lurkers', 'Preferential Treatment', 'Sarven Shepherd', 'Shine Getter', 'The Trials', 'Mad Maxer', 'Mad Maxer Strikes Back', 'Mad Maxer Sells Out', 'Mad Maxer Gets Greedy', 'Mad Maxer: Redemption', 'Sarven Treasure', 'Harrowland', 'Sarven Siege', 'Clash of Clones', 'Sand Snakes', 'Crag Tag']
},
{
title: 'Computer Science 105'
description: 'Time to tackle arrays and some PVP.'
topics: ['Object literals', 'Practice levels']
topics: ['Arrays', 'Break Statements', 'Object Literals']
duration: '5 hours of material'
levels: ['Slalom', 'Black Diamond', 'Treasure Cave', 'Ogre Gorge Gouger', 'Dance-Off', 'Alpine Rally', 'Cloudrip Commander', 'Mountain Mercenaries']
},
{
title: 'Computer Science 106'
description: 'For loops!'
topics: ['for loops', 'Practice levels']
topics: ['Break Statements', 'Object Literals', 'For loops']
duration: '5 hours of material'
levels: ['Timber Guard', 'Hunting Party', 'Zoo Keeper', 'Cloudrip Brawl', 'Cloudrip Treasure', 'Cloudrip Siege', 'Noble Sacrifice', 'Zero Sum', 'Borrowed Sword', 'Protect and Serve']
},
{
title: 'Computer Science 107'
description: 'Functions!'
topics: ['Functions', 'Practice levels']
topics: ['Object Literals', 'For loops', 'Functions']
duration: '5 hours of material'
levels: ['Vital Powers', 'Timber Turncoat', 'Restless Dead', 'Ring Bearer', 'The Two Flowers', 'The Geometry of Flowers', 'Mountain Flower Grove', 'Hunters and Prey', 'Library Tactician']
},
{
title: 'Computer Science 108'
description: 'Maths.'
topics: ['Modulo', 'Math operations', 'Practice levels']
topics: ['For loops', 'Functions', 'Math Operations']
duration: '5 hours of material'
levels: ['Steelclaw Gap', 'Pesky Yaks', 'Mixed Unit Tactics', 'Sowing Fire', 'Reaping Fire', 'Toil and Trouble', 'What in Carnation', 'Misty Island Mine', 'Raiders of the Long Dark', 'Grim Determination', 'Deadly Discs', "Summit's Gate"]
},
{
title: 'Computer Science 109'
description: 'Vectors and strings.'
topics: ['Vectors', 'String manipulation', 'Practice levels']
topics: ['Vectors', 'Advanced Strings']
duration: '5 hours of material'
levels: ['Circle Walking', 'Skating Away', 'Kelvintaph Crusader', 'Kelvintaph Burgler', 'Ice Soccer', 'Razorfray']
}
@ -73,16 +94,19 @@ getStudents = ->
data.instances = [
{
name: "Mr. Smith's First Period"
description: "Homework due on Friday."
code: 'b2KF7'
students: getStudents()
},
{
name: "Mr. Smith's Second Period"
description: "Test class description"
code: 'b2KF7'
students: getStudents()
},
{
name: "Mrs. Anderson's Third Period"
name: "Summer Camp 2015"
description: "You should have received an email with extra credit homework."
code: 'b2KF7'
students: getStudents()
},
@ -93,6 +117,7 @@ data.instances = [
},
{
name: "Test class name one"
description: "Test class description"
code: 'b2KF7'
students: getStudents()
}