Skip to content

Commit

Permalink
Merge pull request #22069 from code-dot-org/teacher-dashboard-logging
Browse files Browse the repository at this point in the history
Teacher dashboard logging
  • Loading branch information
Erin Peach committed Apr 26, 2018
2 parents 12f1fe3 + f7d0515 commit 7b2aa5c
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 3 deletions.
75 changes: 75 additions & 0 deletions apps/src/sites/code.org/pages/public/teacher-dashboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,18 @@ function main() {

$scope.bulk_import = {editing: false, students: ''};

if ($scope.tab === 'stats') {
$scope.$on('stats-table-rendered', () => {
firehoseClient.putRecord(
{
study: 'teacher-dashboard',
study_group: 'control',
event: 'stats'
}
);
});
}

if ($scope.tab === 'manage') {
$scope.$on('react-sync-oauth-section-rendered', () => {
$scope.section.$promise.then(section =>
Expand All @@ -397,6 +409,13 @@ function main() {

$scope.$on('student-table-react-rendered', () => {
$scope.section.$promise.then(section => renderSectionTable(section.id, section.login_type, section.course_name));
firehoseClient.putRecord(
{
study: 'teacher-dashboard',
study_group: 'control',
event: 'manage'
}
);
});

$scope.$on('$destroy', () => {
Expand Down Expand Up @@ -566,6 +585,7 @@ function main() {
event: 'MovingStudentsController'
}
);

var self = this;

// 'Other Section' selected
Expand Down Expand Up @@ -703,6 +723,13 @@ function main() {
event: 'SectionProjectsController'
}
);
firehoseClient.putRecord(
{
study: 'teacher-dashboard',
study_group: 'control',
event: 'projects'
}
);

$scope.sections = sectionsService.query();
$scope.section = sectionsService.get({id: $routeParams.id});
Expand Down Expand Up @@ -740,6 +767,14 @@ function main() {
}
);

firehoseClient.putRecord(
{
study: 'teacher-dashboard',
study_group: 'control',
event: 'progress-summary'
}
);

$scope.tab = 'progress';
$scope.page = {zoom: false};
$scope.react_progress = false;
Expand All @@ -766,6 +801,30 @@ function main() {
$scope.selectedSection = sections.find(section => section.id.toString() === $routeParams.id);
});

// Logs the request for detailed progress and sets the zoom state
$scope.progressDetailRequest = function () {
$scope.page = {zoom: true};
firehoseClient.putRecord(
{
study: 'teacher-dashboard',
study_group: 'control',
event: 'progress-detailed'
}
);
};

// Logs the request for summarized progress view and sets the zoom state
$scope.progressSummaryRequest = function () {
$scope.page = {zoom: false};
firehoseClient.putRecord(
{
study: 'teacher-dashboard',
study_group: 'control',
event: 'progress-summary'
}
);
};

if (experiments.isEnabled('sectionProgressRedesign')) {
$scope.react_progress = true;
$scope.$on('section-progress-rendered', () => {
Expand Down Expand Up @@ -905,6 +964,14 @@ function main() {
}
);

firehoseClient.putRecord(
{
study: 'teacher-dashboard',
study_group: 'control',
event: 'text-responses'
}
);

$scope.section = sectionsService.get({id: $routeParams.id});
$scope.sections = sectionsService.query();
$scope.tab = 'responses';
Expand Down Expand Up @@ -979,6 +1046,14 @@ function main() {
}
);

firehoseClient.putRecord(
{
study: 'teacher-dashboard',
study_group: 'control',
event: 'assessments'
}
);

// Some strings.
var submission_list = {
submitted: i18n.dashboard_submission_submitted,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ content-type: text/ng-template
%th.studentprogress
%div{style: 'position: absolute'}
%a{href: "", "ng-click" => "order = 'highest_level'"}= I18n.t('dashboard_students_progress')
%a.zoom-control{href: "", "ng-click" => "page.zoom = true", 'ng-hide' => 'page.zoom'}
%a.zoom-control{href: "", "ng-click" => "progressDetailRequest()", 'ng-hide' => 'page.zoom'}
%i.fa.fa-search-plus
%a.zoom-control{href: "", "ng-click" => "page.zoom = false", 'ng-show' => 'page.zoom'}
%a.zoom-control{href: "", "ng-click" => "progressSummaryRequest()", 'ng-show' => 'page.zoom'}
%i.fa.fa-search-minus
 
%tr.progressheader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ theme: none
content-type: text/ng-template
---

#uitest-stats-tab{style: "padding-left:20px"}
#uitest-stats-tab{style: "padding-left:20px", 'ng-init' => '$emit("stats-table-rendered");'}
%table{style: "width:950px; table-layout:fixed;", 'ng-show' => 'section.students.length > 0', "ng-form" => "allForm"}
%colgroup
%col{width: "200"}/
Expand Down

0 comments on commit 7b2aa5c

Please sign in to comment.