diff --git a/.holo/sources/slate.toml b/.holo/sources/slate.toml index 56aedb742..30e1fbbbc 100644 --- a/.holo/sources/slate.toml +++ b/.holo/sources/slate.toml @@ -1,3 +1,3 @@ [holosource] url = "https://github.com/SlateFoundation/slate" -ref = "refs/tags/v2.16.12" +ref = "refs/tags/v2.17.1" diff --git a/cypress/fixtures/student-competency-calculations.json b/cypress/fixtures/student-competency-calculations.json index d28bf8332..e1031a813 100644 --- a/cypress/fixtures/student-competency-calculations.json +++ b/cypress/fixtures/student-competency-calculations.json @@ -27,6 +27,22 @@ } } }, + "student2":{ + "ELA":{ + "ELA.2":{ + "baseline":"9", + "average":null, + "growth": "0", + "progress":"0" + }, + "ELA.3":{ + "baseline":"9", + "average":"9", + "growth": "0", + "progress":"33" + } + } + }, "student3": { "ELA": { "ELA.1": { @@ -38,7 +54,7 @@ "ELA.2": { "baseline": null, "average": "7.3", - "growth": null, + "growth": "0", "progress": "40" }, "ELA.3": { @@ -56,13 +72,13 @@ "ELA.5": { "baseline": null, "average": "7.4", - "growth": null, + "growth": "0", "progress": "83" }, "ELA.6": { "baseline": null, "average": "8", - "growth": null, + "growth": "0", "progress": "33" }, "ELA.7": { @@ -82,7 +98,7 @@ "SS.2": { "baseline": null, "average": "8", - "growth": null, + "growth": "0", "progress": "50" } }, @@ -102,7 +118,7 @@ "SCI.3": { "baseline": "9.7", "average": "7", - "growth": null, + "growth": "0", "progress": "33" }, "SCI.4": { @@ -116,9 +132,151 @@ "HOS.4": { "baseline": "9", "average": "9.3", - "growth": null, + "growth": "0", "progress": "100" } } + }, + "student4":{ + "ELA":{ + "ELA.1":{ + "baseline":null, + "average":"6", + "growth":"0" , + "progress":"33" + }, + "ELA.2":{ + "baseline":null, + "average":"6", + "growth":"0" , + "progress":"40" + }, + "ELA.3":{ + "baseline":null, + "average":"7", + "growth":"1" , + "progress":"100" + }, + "ELA.4":{ + "baseline":null, + "average":"6.7", + "growth":"1" , + "progress":"100" + }, + "ELA.5":{ + "baseline":null, + "average":"7", + "growth":"1" , + "progress":"83" + }, + "ELA.6":{ + "baseline":null, + "average":"7", + "growth":"0" , + "progress":"33" + }, + "ELA.7":{ + "baseline":null, + "average":"6.4", + "growth":"0", + "progress":"63" + } + }, + "SCI":{ + "SCI.1":{ + "baseline":null, + "average":"6.6", + "growth":"0", + "progress":"38" + }, + "SCI.3":{ + "baseline":null, + "average":null, + "growth":"0", + "progress":"0" + } + }, + "NGE":{ + "NGE.1":{ + "baseline":null, + "average":"9.4", + "growth":"-1.3", + "progress":"35" + } + }, + "HOS":{ + "HOS.1":{ + "baseline":null, + "average":"9.1", + "growth":"0", + "progress":"45" + } + }, + "HW":{ + "HW.1":{ + "baseline":null, + "average":"8", + "growth":"0", + "progress":"33" + }, + "HW.2":{ + "baseline":null, + "average":"8.4", + "growth":"0", + "progress":"42" + }, + "HW.3":{ + "baseline":null, + "average":"9.2", + "growth":"2.5", + "progress":"56" + } + } + }, + "student5":{ + "ELA":{ + "ELA.1":{ + "baseline":"5", + "average":"6.5", + "growth":"1.5", + "progress":"33" + }, + "ELA.2":{ + "baseline":"5", + "average":"7", + "growth":"2", + "progress":"40" + }, + "ELA.3":{ + "baseline":5, + "average":"8.2", + "growth":"3.2", + "progress":"100" + }, + "ELA.4":{ + "baseline":"5", + "average":"7.5", + "growth":"2.5", + "progress":"100" + }, + "ELA.5":{ + "baseline":"5", + "average":"7", + "growth":"2", + "progress":"83" + }, + "ELA.6":{ + "baseline":"5", + "average":"8", + "growth":"3", + "progress":"33" + }, + "ELA.7":{ + "baseline":"5", + "average":"6.2", + "growth":"1.3", + "progress":"63" + } + } } } \ No newline at end of file diff --git a/cypress/integration/api/student-competencies.js b/cypress/integration/api/student-competencies.js index 1319ee738..c2bdb509e 100644 --- a/cypress/integration/api/student-competencies.js +++ b/cypress/integration/api/student-competencies.js @@ -15,17 +15,17 @@ describe('/cbl/student-competencies API', () => { expect(response).property('status').to.eq(200); expect(response).property('body').to.be.an('object'); expect(response.body).property('success').to.be.true; - expect(response.body).property('total').to.eq(635); + expect(response.body).property('total').to.eq(643); expect(response.body).property('limit').to.eq(0); expect(response.body).property('data').to.be.an('array'); - expect(response.body.data).to.have.length(635); + expect(response.body.data).to.have.length(643); expect(response.body.data[0]).to.include({ - ID: 635, + ID: 643, Class: 'Slate\\CBL\\StudentCompetency', - Created: 1628468422, + Created: 1637588605, CreatorID: 2, StudentID: 6, - CompetencyID: 40, + CompetencyID: 32, Level: 9, EnteredVia: 'enrollment', BaselineRating: null diff --git a/cypress/integration/login_admin.js b/cypress/integration/login_admin.js index bb776fef5..9227b550b 100644 --- a/cypress/integration/login_admin.js +++ b/cypress/integration/login_admin.js @@ -1,4 +1,4 @@ -describe.skip('Admin login test', () => { +describe('Admin login test', () => { // load sample database before tests before(() => { @@ -10,7 +10,7 @@ describe.skip('Admin login test', () => { // should be visible after Log In click cy.get('#login-modal').should('not.be.visible'); - cy.contains('Log In').click(); + cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); cy.get('#login-modal').should('be.visible'); // Should be hidden after cancel click @@ -18,7 +18,7 @@ describe.skip('Admin login test', () => { cy.get('#login-modal').should('not.be.visible'); // Should be hidden after X click - cy.contains('Log In').click(); + cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); cy.get('#login-modal').should('be.visible'); cy.get('.modal-close-button').click(); cy.get('#login-modal').should('not.be.visible'); @@ -28,7 +28,7 @@ describe.skip('Admin login test', () => { cy.visit('/'); cy.get('#login-modal').should('not.be.visible'); - cy.contains('Log In').click(); + cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); cy.focused() .should('have.attr', 'name', '_LOGIN[username]') @@ -48,9 +48,9 @@ describe.skip('Admin login test', () => { cy.visit('/'); cy.get('#login-modal').should('not.be.visible'); - cy.contains('Log In').click(); + cy.get('.slate-omnibar.mobile-hidden').contains('Log In').click(); - cy.contains('#login-modal').should('not.have.attr', 'display'); + cy.get('#login-modal').should('not.have.attr', 'display'); cy.focused() .should('have.attr', 'name', '_LOGIN[username]') .type('admin') diff --git a/cypress/integration/student_compentencies.js b/cypress/integration/student_compentencies.js index e6edd542a..85e698043 100644 --- a/cypress/integration/student_compentencies.js +++ b/cypress/integration/student_compentencies.js @@ -1,4 +1,4 @@ -describe.skip('Teacher student competencies test', () => { +describe('Teacher student competencies test', () => { // load sample database before tests before(() => { @@ -44,15 +44,15 @@ describe.skip('Teacher student competencies test', () => { cy.get('#' + studentSelector.el.dom.id) .click() .focused() - .type('ELA'); + .type('EXA'); // verify and click first element of picker dropdown cy.get('#' + studentSelector.getPicker().id + ' .x-boundlist-item') - .contains('ELA-001') + .contains('Example School') .click(); // verify hash updates - cy.location('hash').should('eq', '#ELA/section:ELA-001'); + cy.location('hash').should('eq', '#ELA/group:example_school'); // verify content loads cy.get('.slate-studentcompetencies-admin-grid').contains('Student Slate'); diff --git a/cypress/integration/student_demonstrations_growth.js b/cypress/integration/student_demonstrations_growth.js index 763229a8c..db8fdcae8 100644 --- a/cypress/integration/student_demonstrations_growth.js +++ b/cypress/integration/student_demonstrations_growth.js @@ -1,4 +1,4 @@ -describe.skip('Student competency growth calculation test', () => { +describe('Student competency growth calculation test', () => { // load sample database before tests before(() => { @@ -46,17 +46,16 @@ describe.skip('Student competency growth calculation test', () => { // ensure that API has loaded required data cy.wait('@studentCompetencyData') .its('status') - .should('be', 200) + .should('eq', 200) .then(() => { - const studentCompetencySuffixes = Object.keys(growthCalculationsByStudent[studentUsername][studentContentArea]); - studentCompetencySuffixes.forEach(studentCompetencySuffix => { + const studentCompetencies = Object.keys(growthCalculationsByStudent[studentUsername][studentContentArea]); + studentCompetencies.forEach(studentCompetency => { // ensure competency card elements have rendered cy.get('li.slate-demonstrations-student-competencycard') .then(() => { - const card = extQuerySelector(`slate-demonstrations-student-competencycard{getCompetency().get("Code")=="${studentContentArea}.${studentCompetencySuffix}"}`); - - compareCompetencyValues(`${studentContentArea}.${studentCompetencySuffix}`, card.id, growthCalculationsByStudent[studentUsername][studentContentArea][studentCompetencySuffix]); + const card = extQuerySelector(`slate-demonstrations-student-competencycard{getCompetency().get("Code")=="${studentCompetency}"}`); + compareCompetencyValues(`${studentCompetency}`, card.id, growthCalculationsByStudent[studentUsername][studentContentArea][studentCompetency]); }); }); }); diff --git a/cypress/integration/student_tasks.js b/cypress/integration/student_tasks.js index ad8bca27c..3808e34fc 100644 --- a/cypress/integration/student_tasks.js +++ b/cypress/integration/student_tasks.js @@ -1,4 +1,5 @@ -describe.skip('Student tasks test', () => { +describe.skip('Student Tasks test', () => { + const dayjs = require('dayjs') // load sample database before tests before(() => { @@ -10,28 +11,28 @@ describe.skip('Student tasks test', () => { cy.request('POST', `/cbl/tasks/save?format=json`, { data: [{ Title: 'Test Task (Due Today)', - DueDate: Cypress.moment().format('YYYY-MM-DD'), + DueDate: dayjs().format('YYYY-MM--DD'), SectionID: 2, Assignees: { 'student': true } }, { Title: 'Test Task (Due This Week)', - DueDate: Cypress.moment().add(5, 'days').format('YYYY-MM-DD'), + DueDate: dayjs().add(5, 'day').format('YYYY-MM--DD'), SectionID: 2, Assignees: { 'student': true } }, { Title: 'Test Task (Due Recently)', - DueDate: Cypress.moment().subtract(9, 'days').format('YYYY-MM-DD'), + DueDate: dayjs().subtract(9, 'day').format('YYYY-MM--DD'), SectionID: 2, Assignees: { 'student': true } }, { Title: 'Test Task (Due Next Week)', - DueDate: Cypress.moment().add(8, 'days').format('YYYY-MM-DD'), + DueDate: dayjs().add(8, 'day').format('YYYY-MM--DD'), SectionID: 2, Assignees: { 'student': true @@ -88,7 +89,7 @@ describe.skip('Student tasks test', () => { .should(($todoListSection) => { expect( $todoListSection.length - ).to.equal(3); + ).to.equal(4); }) // get current tasks list @@ -305,7 +306,7 @@ describe.skip('Student tasks test', () => { cy.get('#' + currentTasksTree.id) .should(($tasksTree) => { expect($tasksTree.find('li.slate-tasktree-item').length) - .to.equal(4); + .to.equal(5); }); }); diff --git a/cypress/integration/teacher_demonstrations.js b/cypress/integration/teacher_demonstrations.js index ec42a594c..c620a72c3 100644 --- a/cypress/integration/teacher_demonstrations.js +++ b/cypress/integration/teacher_demonstrations.js @@ -1,4 +1,4 @@ -describe.skip('Teacher demonstrations test', () => { +describe('Teacher demonstrations test', () => { // load sample database before tests before(() => { @@ -11,10 +11,21 @@ describe.skip('Teacher demonstrations test', () => { }); it('View single demonstration rubric as teacher', () => { + // set up XHR monitors + cy.intercept('GET', '/cbl/dashboards/demonstrations/teacher/bootstrap').as('getBootstrapData'); + cy.intercept('GET', '/cbl/content-areas?summary=true').as('getCompetencyAreas'); + cy.intercept('GET', '/people/*student-lists').as('getMyStudentLists'); + cy.intercept('GET', '/people/*student-lists?sections=all').as('getAllStudentLists'); + cy.intercept('GET', '/cbl/student-competencies?*').as('getStudentCompetencies'); + // open student demonstrations dashboard cy.visit('/cbl/dashboards/demonstrations/teacher'); + // ensure bootstrap data is loaded + cy.wait('@getBootstrapData'); + cy.get('@getBootstrapData.all').should('have.length', 1); + // verify teacher redirect cy.location('hash').should('eq', '#_'); cy.get('.slate-appcontainer-bodyWrap .slate-placeholder ') @@ -28,6 +39,10 @@ describe.skip('Teacher demonstrations test', () => { // click the selector cy.get('#' + rubricSelector.el.dom.id).click(); + // ensure competency areas are loaded + cy.wait('@getCompetencyAreas'); + cy.get('@getCompetencyAreas.all').should('have.length', 1); + // verify and click first element of picker dropdown cy.get('#' + rubricSelector.getPicker().id + ' .x-boundlist-item') .contains('English Language Arts') @@ -43,15 +58,23 @@ describe.skip('Teacher demonstrations test', () => { cy.get('#' + studentSelector.el.dom.id) .click() .focused() - .type('ELA'); + .type('Exa'); + + // ensure student lists are loaded + cy.wait('@getMyStudentLists'); + cy.get('@getMyStudentLists.all').should('have.length', 1); // verify and click first element of picker dropdown cy.get('#' + studentSelector.getPicker().id) - .contains('ELA-001') + .contains('Example School') .click(); + // ensure student competencies are loaded + cy.wait('@getStudentCompetencies'); + cy.get('@getStudentCompetencies.all').should('have.length', 1); + // verify hash updates - cy.location('hash').should('eq', '#ELA/section:ELA-001'); + cy.location('hash').should('eq', '#ELA/group:example_school'); // verify content loads cy.get('.cbl-grid-competencies').contains('Reading Critically'); @@ -67,15 +90,24 @@ describe.skip('Teacher demonstrations test', () => { .contains('Show all sections') .scrollIntoView() .closest('button') - .click('center') + .click('center', { force: true }) //scrollIntoView does not appear to be working + + // ensure student lists are loaded + cy.wait('@getAllStudentLists'); + cy.get('@getAllStudentLists.all').should('have.length', 1); // verify and click empty section element of picker dropdown cy.get('#' + studentSelector.getPicker().id) - .contains('ELA-EMPTY') - .click(); + .contains('Jarvus Innovations') + .scrollIntoView() + .click({force: true}); //scrollIntoView does not appear to be working + + // ensure student competencies are loaded + cy.wait('@getStudentCompetencies'); + cy.get('@getStudentCompetencies.all').should('have.length', 2); // verify hash updates - cy.location('hash').should('eq', '#ELA/section:ELA-EMPTY'); + cy.location('hash').should('eq', '#ELA/group:jarvus'); // verify content loads cy.get('.cbl-grid-main').should('be.empty'); diff --git a/fixtures/cbl_demonstration_skills.sql b/fixtures/cbl_demonstration_skills.sql index 251b47a81..42aae2122 100644 --- a/fixtures/cbl_demonstration_skills.sql +++ b/fixtures/cbl_demonstration_skills.sql @@ -2407,6 +2407,38 @@ INSERT INTO `cbl_demonstration_skills` VALUES (2434,'Slate\\CBL\\Demonstrations\ INSERT INTO `cbl_demonstration_skills` VALUES (2435,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-08-09 00:22:59',2,'2021-08-09 00:25:11',2,197,205,9,12,0); INSERT INTO `cbl_demonstration_skills` VALUES (2436,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-08-09 00:24:10',2,NULL,NULL,198,206,9,12,0); INSERT INTO `cbl_demonstration_skills` VALUES (2437,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-08-09 00:35:08',1,NULL,NULL,199,207,9,12,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2438,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:44:05',2,NULL,NULL,200,158,9,5,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2439,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:46:55',2,NULL,NULL,201,163,9,5,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2440,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:47:02',2,NULL,NULL,202,163,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2441,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:47:22',2,NULL,NULL,203,164,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2442,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:47:44',2,NULL,NULL,204,165,9,7,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2443,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:49:39',2,NULL,NULL,205,158,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2444,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:50:11',2,NULL,NULL,206,159,9,6,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2445,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:50:11',2,NULL,NULL,206,160,9,7,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2446,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:50:11',2,NULL,NULL,206,161,9,8,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2447,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 13:50:57',2,NULL,NULL,207,159,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2448,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:03:40',2,NULL,NULL,208,158,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2449,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:03:45',2,NULL,NULL,209,159,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2450,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:03:50',2,NULL,NULL,210,160,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2451,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:03:56',2,NULL,NULL,211,161,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2452,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:04:06',2,NULL,NULL,212,163,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2453,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:04:10',2,NULL,NULL,213,164,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2454,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:04:15',2,NULL,NULL,214,165,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2455,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:13:57',2,NULL,NULL,215,167,9,9,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2456,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:13:57',2,NULL,NULL,215,168,9,9,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2457,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:14:20',2,NULL,NULL,216,167,9,10,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2458,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:27:15',2,NULL,NULL,217,169,9,0,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2459,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:29:17',2,NULL,NULL,218,170,9,7,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2460,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:29:38',2,NULL,NULL,219,170,9,6,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2461,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:35:36',2,NULL,NULL,220,169,9,9,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2462,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:35:36',2,NULL,NULL,220,170,9,10,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2463,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:35:59',2,NULL,NULL,221,169,9,0,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2464,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:35:59',2,NULL,NULL,221,170,9,0,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2465,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:41:50',2,NULL,NULL,222,169,9,NULL,1); +INSERT INTO `cbl_demonstration_skills` VALUES (2466,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:45:02',2,NULL,NULL,223,28,10,10,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2467,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:45:02',2,NULL,NULL,223,29,10,8,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2468,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:45:02',2,NULL,NULL,223,30,10,7,0); +INSERT INTO `cbl_demonstration_skills` VALUES (2469,'Slate\\CBL\\Demonstrations\\DemonstrationSkill','2021-11-22 14:45:16',2,NULL,NULL,224,28,10,NULL,1); CREATE TABLE `history_cbl_demonstration_skills` ( diff --git a/fixtures/cbl_demonstrations.sql b/fixtures/cbl_demonstrations.sql index 0020d6824..c0061f597 100644 --- a/fixtures/cbl_demonstrations.sql +++ b/fixtures/cbl_demonstrations.sql @@ -213,6 +213,31 @@ INSERT INTO `cbl_demonstrations` VALUES (196,'Slate\\CBL\\Demonstrations\\Experi INSERT INTO `cbl_demonstrations` VALUES (197,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-08-09 00:22:58',2,NULL,NULL,6,'2021-08-09 00:22:03',NULL,NULL,'Studio','Testing CBL Archiving','Test'); INSERT INTO `cbl_demonstrations` VALUES (198,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-08-09 00:24:10',2,NULL,NULL,6,'2021-08-09 00:23:14',NULL,NULL,'Studio','Testing CBL Arching','Test'); INSERT INTO `cbl_demonstrations` VALUES (199,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-08-09 00:35:08',1,NULL,NULL,6,'2021-08-09 00:34:31',NULL,NULL,'Studio','Testing CBL Archiving','Test'); +INSERT INTO `cbl_demonstrations` VALUES (200,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 13:44:05',2,NULL,NULL,4,'2021-11-22 13:43:37',NULL,NULL,'Studio','Testing Overrides','Annotated Writing'); +INSERT INTO `cbl_demonstrations` VALUES (201,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 13:46:55',2,NULL,NULL,4,'2021-11-22 13:46:30',NULL,NULL,'Studio','Test overrides','Build/Design Project'); +INSERT INTO `cbl_demonstrations` VALUES (202,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 13:47:02',2,NULL,NULL,4,'2021-11-22 13:46:53',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (203,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 13:47:22',2,NULL,NULL,4,'2021-11-22 13:47:14',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (204,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 13:47:44',2,NULL,NULL,4,'2021-11-22 13:47:21',NULL,NULL,'Studio','Test overrides','Debate'); +INSERT INTO `cbl_demonstrations` VALUES (205,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 13:49:39',2,NULL,NULL,4,'2021-11-22 13:49:27',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (206,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 13:50:11',2,NULL,NULL,4,'2021-11-22 13:49:41',NULL,NULL,'Studio','Test overrides','Debate'); +INSERT INTO `cbl_demonstrations` VALUES (207,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 13:50:57',2,NULL,NULL,4,'2021-11-22 13:50:48',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (208,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:03:40',2,NULL,NULL,6,'2021-11-22 14:03:32',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (209,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:03:45',2,NULL,NULL,6,'2021-11-22 14:03:37',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (210,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:03:50',2,NULL,NULL,6,'2021-11-22 14:03:42',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (211,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:03:56',2,NULL,NULL,6,'2021-11-22 14:03:47',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (212,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:04:06',2,NULL,NULL,6,'2021-11-22 14:03:58',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (213,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:04:10',2,NULL,NULL,6,'2021-11-22 14:04:02',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (214,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:04:15',2,NULL,NULL,6,'2021-11-22 14:04:07',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (215,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:13:57',2,NULL,NULL,4,'2021-11-22 14:13:31',NULL,NULL,'Studio','Test overrides','Build/Design Project'); +INSERT INTO `cbl_demonstrations` VALUES (216,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:14:20',2,NULL,NULL,4,'2021-11-22 14:13:56',NULL,NULL,'Studio','Test overrides','Document-based Questions'); +INSERT INTO `cbl_demonstrations` VALUES (217,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:27:15',2,NULL,NULL,4,'2021-11-22 14:26:49',NULL,NULL,'Studio','Test overrides','Data Analysis Task'); +INSERT INTO `cbl_demonstrations` VALUES (218,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:29:17',2,NULL,NULL,4,'2021-11-22 14:28:52',NULL,NULL,'Studio','Test overrides','Art Project'); +INSERT INTO `cbl_demonstrations` VALUES (219,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:29:38',2,NULL,NULL,4,'2021-11-22 14:29:19',NULL,NULL,'Studio','Test overrides','Annotated Timeline'); +INSERT INTO `cbl_demonstrations` VALUES (220,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:35:36',2,NULL,NULL,6,'2021-11-22 14:35:14',NULL,NULL,'Studio','Test overrides','Document-based Questions'); +INSERT INTO `cbl_demonstrations` VALUES (221,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:35:59',2,NULL,NULL,6,'2021-11-22 14:35:35',NULL,NULL,'Studio','Test overrides','Annotated Timeline'); +INSERT INTO `cbl_demonstrations` VALUES (222,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:41:50',2,NULL,NULL,6,'2021-11-22 14:41:41',NULL,NULL,NULL,NULL,NULL); +INSERT INTO `cbl_demonstrations` VALUES (223,'Slate\\CBL\\Demonstrations\\ExperienceDemonstration','2021-11-22 14:45:02',2,NULL,NULL,6,'2021-11-22 14:44:31',NULL,NULL,'Studio','Testing overrides','Annotated Writing'); +INSERT INTO `cbl_demonstrations` VALUES (224,'Slate\\CBL\\Demonstrations\\OverrideDemonstration','2021-11-22 14:45:16',2,NULL,NULL,6,'2021-11-22 14:45:08',NULL,NULL,NULL,NULL,NULL); CREATE TABLE `history_cbl_demonstrations` ( diff --git a/fixtures/cbl_student_competencies.sql b/fixtures/cbl_student_competencies.sql index adeab72bd..0fd4e5bc5 100644 --- a/fixtures/cbl_student_competencies.sql +++ b/fixtures/cbl_student_competencies.sql @@ -650,3 +650,11 @@ INSERT INTO `cbl_student_competencies` VALUES (632,'Slate\\CBL\\StudentCompetenc INSERT INTO `cbl_student_competencies` VALUES (633,'Slate\\CBL\\StudentCompetency','2021-08-09 00:20:08',2,6,11,9,'enrollment',NULL); INSERT INTO `cbl_student_competencies` VALUES (634,'Slate\\CBL\\StudentCompetency','2021-08-09 00:20:08',2,6,41,9,'enrollment',NULL); INSERT INTO `cbl_student_competencies` VALUES (635,'Slate\\CBL\\StudentCompetency','2021-08-09 00:20:22',2,6,40,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (636,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,4,29,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (637,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,4,30,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (638,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,4,31,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (639,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,4,32,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (640,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,6,29,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (641,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,6,30,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (642,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,6,31,9,'enrollment',NULL); +INSERT INTO `cbl_student_competencies` VALUES (643,'Slate\\CBL\\StudentCompetency','2021-11-22 13:43:25',2,6,32,9,'enrollment',NULL); diff --git a/sencha-workspace/SlateDemonstrationsStudent/app/controller/Dashboard.js b/sencha-workspace/SlateDemonstrationsStudent/app/controller/Dashboard.js index 01cfeea18..53f4ef9b1 100644 --- a/sencha-workspace/SlateDemonstrationsStudent/app/controller/Dashboard.js +++ b/sencha-workspace/SlateDemonstrationsStudent/app/controller/Dashboard.js @@ -238,7 +238,7 @@ Ext.define('SlateDemonstrationsStudent.controller.Dashboard', { competenciesSummary.setConfig({ level: isFinite(lowestLevel) ? lowestLevel : null, - percentComplete: totalRequired ? 100 * totalComplete / totalRequired : null, + percentComplete: totalRequired === 0 ? 100 : 100 * totalComplete / totalRequired, percentMissed: totalRequired ? 100 * totalMissed / totalRequired : null, missed: totalRequired ? totalMissed : null, average: averageValues.length ? Ext.Array.sum(averageValues) / averageValues.length : null, diff --git a/sencha-workspace/SlateDemonstrationsStudent/app/view/CompetencyCard.js b/sencha-workspace/SlateDemonstrationsStudent/app/view/CompetencyCard.js index 977cae0f8..0f736a911 100644 --- a/sencha-workspace/SlateDemonstrationsStudent/app/view/CompetencyCard.js +++ b/sencha-workspace/SlateDemonstrationsStudent/app/view/CompetencyCard.js @@ -226,7 +226,7 @@ Ext.define('SlateDemonstrationsStudent.view.CompetencyCard', { demonstrationsAverage = studentCompetency.get('demonstrationsAverage'); level = studentCompetency.get('Level'); demonstrationsRequired = competency.getTotalDemonstrationsRequired(level); - percentComplete = demonstrationsRequired ? 100 * studentCompetency.get('demonstrationsComplete') / demonstrationsRequired : null; + percentComplete = demonstrationsRequired === 0 ? 100 : 100 * studentCompetency.get('demonstrationsComplete') / demonstrationsRequired; } Ext.suspendLayouts(); diff --git a/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js b/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js index cfb69934c..e9dbc6282 100644 --- a/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js +++ b/sencha-workspace/SlateDemonstrationsTeacher/app/view/ProgressGrid.js @@ -772,7 +772,7 @@ Ext.define('SlateDemonstrationsTeacher.view.ProgressGrid', { demonstrationsRequired = competency.totalDemonstrationsRequired[level] || competency.totalDemonstrationsRequired.default; if (countDirty || averageDirty) { - percentComplete = 100 * (count || 0) / demonstrationsRequired; + percentComplete = demonstrationsRequired === 0 ? 100 : 100 * (count || 0) / demonstrationsRequired; progressCellEl.toggleCls('is-average-low', percentComplete >= 50 && average !== null && average < studentCompetency.get('minimumAverage')); // eslint-disable-line no-extra-parens }