codecombat/app/templates/admin/admin-classroom-levels.jade

57 lines
1.7 KiB
Text
Raw Normal View History

2016-06-30 11:29:27 -04:00
extends /templates/base
//- DO NOT TRANSLATE
block content
h3 Classroom Levels
2016-06-30 11:29:27 -04:00
if !me.isAdmin()
div You must be logged in as an admin to view this page.
else
p
- var levelsTotal = 0;
table.table.table-striped.table-condensed
tr
th Levels
th Course
each course in view.courses.models
- var campaign = view.campaigns.get(course.get('campaignID'));
if !campaign
- continue;
- var levels = campaign.getLevels().models;
- levelsTotal += levels.length;
tr
td= levels.length
td= course.get('name')
tr
td= levelsTotal
td All
2016-06-30 11:29:27 -04:00
each course in view.courses.models
- var campaign = view.campaigns.get(course.get('campaignID'));
if !campaign
- continue;
2016-06-30 11:29:27 -04:00
- var levels = campaign.getLevels().models;
- levelCounts = levels.length;
strong #{course.get('name')}
.small= course.get('description')
.small Levels last updated #{campaign.get('levelsUpdated')}
table.table.table-striped.table-condensed
tr
th= levels.length
th Slug
th Type
th Practice
th Practice Threshold (m)
th Shareable
th Primer
2016-06-30 11:29:27 -04:00
each level, levelIndex in levels
- var levelNumber = campaign.getLevelNumber(level.get('original'), levelIndex + 1)
tr
td= levelNumber
td= level.get('slug')
td= level.get('type')
td= level.get('practice')
td= level.get('practiceThresholdMinutes')
td= level.get('shareable')
td= level.get('primerLanguage')