diff --git a/src/components/teach/assignments/TeachPage.scss b/src/components/teach/assignments/TeachPage.scss index 15342a1b7d..b9bb99ae73 100644 --- a/src/components/teach/assignments/TeachPage.scss +++ b/src/components/teach/assignments/TeachPage.scss @@ -421,10 +421,6 @@ } .empty-filter-content { - padding-top: calc(30vh); - padding-left: 2vw; - padding-right: 2vw; - font-size: 1.3vw; text-align: center; @@ -435,42 +431,46 @@ } position: relative; - .top-row-v5 { - position: absolute; - top: 0; - left: 0; - padding-left: 2vw; - display: flex; - width: 100%; - padding-top: 4vh; - padding-bottom: 4vh; - border-bottom: 2px solid rgba(222,222,222, 0.2); + } - .text { - margin-bottom: 0; - } + .top-row-v5 { + padding-left: 2vw; + display: flex; + width: 100%; + padding-top: 2vh; + padding-bottom: 2vh; + border-bottom: 2px solid rgba(222,222,222, 0.2); - .btn-orange { - cursor: pointer; - display: flex; - align-items: center; - font-size: 1vw; - margin-left: 7vw; - color: white; - border-radius: 3vw; - padding-top: 0.3vw; - padding-bottom: 0.3vw; - padding-left: 1vw; - padding-right: 1vw; - background: var(--theme-orange); + .text { + display: flex; + align-items: center; + margin-bottom: 0; + } - &:hover { - background: white; - color: var(--theme-dark-blue); - } + .btn-orange { + cursor: pointer; + display: flex; + align-items: center; + font-size: 1vw; + margin-left: 7vw; + color: white; + border-radius: 3vw; + padding-top: 0.3vw; + padding-bottom: 0.3vw; + padding-left: 1vw; + padding-right: 1vw; + background: var(--theme-orange); + + &:hover { + background: white; + color: var(--theme-dark-blue); } } } + + .typed-textbox-v9 { + padding-top: 20vh; + } } .tab-content { @@ -593,9 +593,6 @@ font-family: $font-family-regular; padding-left: 1.4vw; - color: var(--white); - background: var(--theme-orange) !important; - &.m-view-all-d31 { display: flex; } @@ -638,7 +635,7 @@ } .one-classroom-assignments { background: white; - height: calc(100vh - 7.834vw - 2vh - 6.6vh - 2.6vw); + height: calc(100vh - 5.834vw - 2vh); } .name-and-edit-btn { display: flex; diff --git a/src/components/teach/assignments/TeachPage.tsx b/src/components/teach/assignments/TeachPage.tsx index 59e7b82691..6bfc8a9b19 100644 --- a/src/components/teach/assignments/TeachPage.tsx +++ b/src/components/teach/assignments/TeachPage.tsx @@ -617,16 +617,6 @@ class TeachPage extends Component { return (
-
- -
-
- Nothing Selected -
-
-
Select a class from the panel on the left to
-
start managing classes and learners
-
); @@ -646,7 +636,6 @@ class TeachPage extends Component { if (!this.state.isLoaded) { return ( - this.setState({ isAssignOpen: true })} assignmentsEnabled={true} />
@@ -705,7 +694,6 @@ class TeachPage extends Component { activeStudent={this.state.activeStudent} activeClassroom={this.state.activeClassroom} hideIntro={() => this.setState({ isNewTeacher: false })} - isArchive={isArchive} setActiveClassroom={this.setActiveClassroom.bind(this)} loadClass={classId => this.loadClass(classId)} setActiveStudent={this.setActiveStudent.bind(this)} diff --git a/src/components/teach/assignments/components/ClassroomList.scss b/src/components/teach/assignments/components/ClassroomList.scss index ed69a3357f..00e96b5038 100644 --- a/src/components/teach/assignments/components/ClassroomList.scss +++ b/src/components/teach/assignments/components/ClassroomList.scss @@ -1,20 +1,8 @@ .one-classroom-assignments { padding-top: 4vh !important; - .fixed-classname { - position: absolute; - left: 0vw; - top: 8vh; - z-index: 1; - width: 100%; - height: calc(calc( 100vh - 5.834vw - 2vw - 5.2vw - 2.1vh - 0.5vh - 6vh)/6.35 - 2vh); - - .classroom-title { - height: 100%; - } - - .name-subject-display { - padding-left: 2.2vw; - } + .sub-title-v8 { + padding-left: 2vw; + color: var(--theme-dark-blue); } .deadline-e33 { diff --git a/src/components/teach/assignments/components/ClassroomList.tsx b/src/components/teach/assignments/components/ClassroomList.tsx index 051e0a4382..8ea1802802 100644 --- a/src/components/teach/assignments/components/ClassroomList.tsx +++ b/src/components/teach/assignments/components/ClassroomList.tsx @@ -159,24 +159,8 @@ class ClassroomList extends Component { render() { return (
-
- {this.renderClassname()} -
- -
+
All My Classes
{this.renderContent()}
diff --git a/src/components/teach/assignments/components/TeachFilterSidebar.scss b/src/components/teach/assignments/components/TeachFilterSidebar.scss index b8033e5b68..fb0cb8cdd8 100644 --- a/src/components/teach/assignments/components/TeachFilterSidebar.scss +++ b/src/components/teach/assignments/components/TeachFilterSidebar.scss @@ -73,6 +73,10 @@ justify-content: flex-start; .label-34rerf { width: 88%; + + .MuiRadio-colorSecondary { + color: var(--white) !important; + } } .sort-v4y4 { position: relative; @@ -137,9 +141,6 @@ } .teach-sort-box { - .subject-scrollable { - max-height: calc(28.2vh); - } .classrooms-header { margin-top: 1vh; margin-bottom: 1vh; diff --git a/src/components/teach/assignments/components/TeachFilterSidebar.tsx b/src/components/teach/assignments/components/TeachFilterSidebar.tsx index 82e7e2d563..5f7e7b3804 100644 --- a/src/components/teach/assignments/components/TeachFilterSidebar.tsx +++ b/src/components/teach/assignments/components/TeachFilterSidebar.tsx @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { Grid } from "@material-ui/core"; +import { FormControlLabel, Grid, Radio } from "@material-ui/core"; // @ts-ignore import { Steps } from 'intro.js-react'; @@ -30,7 +30,6 @@ interface FilterSidebarProps { classrooms: TeachClassroom[]; activeStudent: TeachStudent | null; activeClassroom: TeachClassroom | null; - isArchive: boolean; setActiveStudent(s: TeachStudent): void; setActiveClassroom(id: number | null): void; filterChanged(filters: TeachFilters): void; @@ -99,6 +98,12 @@ class TeachFilterSidebar extends Component< } } + unselectClassroom(e: any) { + e.stopPropagation(); + e.preventDefault(); + this.props.setActiveClassroom(-1); + } + renderStudent(s: TeachStudent, key: number) { let className = "student-row"; @@ -219,9 +224,7 @@ class TeachFilterSidebar extends Component< renderClassesBox() { let finalClasses = []; - let finalArchivedClasses = []; let classrooms = this.props.classrooms.filter(c => c.status == ClassroomStatus.Active); - let archivedClassrooms = this.props.classrooms.filter(c => c.status == ClassroomStatus.Archived); for (const cls of classrooms) { const finalClass = Object.assign({}, cls) as any; @@ -243,35 +246,13 @@ class TeachFilterSidebar extends Component< }); } - for (const cls of archivedClassrooms) { - const finalClass = Object.assign({}, cls) as any; - finalClass.assigned = getClassAssignedCount(cls); - finalArchivedClasses.push(finalClass); - } - - if (sort === SortClassroom.Date) { - finalArchivedClasses = finalArchivedClasses.sort((a, b) => new Date(b.updated).getTime() - new Date(a.updated).getTime()); - } else if (sort === SortClassroom.Assignment) { - finalArchivedClasses = finalArchivedClasses.sort((a, b) => b.assignmentsCount - a.assignmentsCount); - } else if (sort === SortClassroom.Name) { - finalArchivedClasses = finalArchivedClasses.sort((a, b) => { - const al = a.name.toUpperCase(); - const bl = b.name.toUpperCase(); - if (al < bl) { return -1; } - if (al > bl) { return 1; } - return 0; - }); - } - return (
-
-
- My Classes -
-
this.setState({ createClassOpen: true })}> - Create Class +
+
CLASSES
+
this.setState({ createClassOpen: true })}> + Create Class
- Current ({finalClasses.length}) + this.unselectClassroom(e)} + control={ + + } + label={`All Classes (${finalClasses.length}`} + /> + )
{ this.setState({ sort: SortClassroom.Name }); @@ -297,30 +290,6 @@ class TeachFilterSidebar extends Component< {finalClasses.map(this.renderClassroom.bind(this))}
-
-
-
- Archived ({finalArchivedClasses.length}) -
- { - this.setState({ sort: SortClassroom.Name }); - }} sortByDate={() => { - this.setState({ sort: SortClassroom.Date }); - }} sortByAssignmets={() => { - this.setState({ sort: SortClassroom.Assignment }); - }} /> -
-
-
-
- {finalArchivedClasses.map(this.renderClassroom.bind(this))} -
-
{(this.props.user.subscriptionState === 0 || !this.props.user.subscriptionState) && this.renderPremiumBoxCondition()}
); @@ -333,6 +302,7 @@ class TeachFilterSidebar extends Component< if (this.props.isLoaded && this.props.classrooms.length === 0) { return this.setState({ createClassOpen: true })} />; } + return this.renderClassesBox(); } @@ -355,18 +325,18 @@ class TeachFilterSidebar extends Component< {this.renderContent()}
{this.state.createClassOpen && - { - this.props.loadClass(classroomId); - this.setState({ createClassOpen: false }); - }} - close={() => { - this.setState({ createClassOpen: false }); - }} - />} + { + this.props.loadClass(classroomId); + this.setState({ createClassOpen: false }); + }} + close={() => { + this.setState({ createClassOpen: false }); + }} + />} {this.props.isNewTeacher && {
CLASSES
Create Class
- this.setState({secondStarted: true})} - /> - this.setState({thirdStarted: true})} - /> - this.setState({fourthStarted: true})} - /> - +
+ this.setState({ secondStarted: true })} + /> + this.setState({ thirdStarted: true })} + /> + this.setState({ fourthStarted: true })} + /> + +
); } diff --git a/src/components/teach/manageClassrooms/components/CreateClassDialog.tsx b/src/components/teach/manageClassrooms/components/CreateClassDialog.tsx index 5328b6ec2d..4038c708ad 100644 --- a/src/components/teach/manageClassrooms/components/CreateClassDialog.tsx +++ b/src/components/teach/manageClassrooms/components/CreateClassDialog.tsx @@ -326,7 +326,7 @@ const CreateClassDialog: React.FC = (props) => { if (i === selectedBricks.length - 1) { additionalClass = ''; } - return (
+ return (
{stripHtml(b.title)} { const filteredBricks = selectedBricks.filter(bs => bs.id !== b.id); diff --git a/src/components/viewAllPage/ViewAll.tsx b/src/components/viewAllPage/ViewAll.tsx index 19ff388233..ae4fc5177f 100644 --- a/src/components/viewAllPage/ViewAll.tsx +++ b/src/components/viewAllPage/ViewAll.tsx @@ -273,6 +273,9 @@ class ViewAllPage extends Component { } } this.addWheelListener(); + + // check if back button pressed + // refresh page data } onBricksWheel(e: any) { @@ -413,6 +416,10 @@ class ViewAllPage extends Component { const {state} = this; if (state.isAllSubjects == false) { subjectIds = this.props.user.subjects.map(s => s.id); + let checked = subjects?.filter(s => s.checked); + if (checked && checked.length > 0) { + subjectIds = checked.map(s => s.id); + } } else { let checked = subjects?.filter(s => s.checked); subjectIds = checked ? checked.map(s => s.id) : [];