Skip to content

Commit

Permalink
Merge pull request #183 from makeopensource/133-Create-a-scoreboard-a…
Browse files Browse the repository at this point in the history
…nd-implement-design-on-frontend

133 create a scoreboard and implement design on frontend
  • Loading branch information
jessehartloff authored Nov 6, 2024
2 parents 029a633 + 45360da commit 0869164
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import ErrorPage from '../errorPage/errorPage'
import LoadingOverlay from 'components/shared/loaders/loadingOverlay'
import {useActionless, useAppSelector} from 'redux/hooks'
import {SET_ALERT} from 'redux/types/active.types'

import Card from '@mui/material/Card'
import CardContent from '@mui/material/CardContent'
import {Accordion, AccordionDetails, CardActionArea, TextField, Typography} from '@mui/material'
Expand Down Expand Up @@ -39,7 +38,7 @@ const AssignmentDetailPage = () => {
const [assignment, setAssignment] = useState<Assignment>()

// const [containerAutograder, setContainerAutograder] = useState<ContainerAutoGrader | null>()
// const containerAutograder = false; //TODO: Use the above commented out code to get the container autograder
// const contaierAutograder = false; //TODO: Use the above commented out code to get the container autograder
// const [ setNonContainerAutograders] = useState(new Array <NonContainerAutoGrader>())
const [showScoreboard, setShowScoreboard] = useState(false);
const location = useLocation();
Expand Down Expand Up @@ -69,7 +68,7 @@ const AssignmentDetailPage = () => {

// const submissionProblemScoresPromises = submissionsReq.map(s => {
// return RequestService.get<SubmissionProblemScore[]>(`/api/submission-problem-scores/${s.id}`)
// })
//
// const submissionProblemScoresReq = (await Promise.all(submissionProblemScoresPromises)).reduce((a, b) => a.concat(b), [])
// setSubmissionProblemScores(submissionProblemScoresReq)

Expand Down Expand Up @@ -192,10 +191,6 @@ const AssignmentDetailPage = () => {

}>Scoreboard</button>
}




</div>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
.buttons-container {
display: flex;
flex-wrap: wrap;
//flex-direction: row;

justify-content: space-around;
width:100%;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import ListItem from '@mui/material/ListItem'
import ListItemButton from '@mui/material/ListItemButton'
import ListItemText from '@mui/material/ListItemText'
//import Button from '@mui/material/Button'
//import Stack from '@mui/material/Stack'



import styles from './courseDetailPage.scss'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type RowProps = {
assignments: Assignment[]
assignmentScores: AssignmentScore[]
}

//table for style
const TableRow = ({index, user, userCourse, assignments, assignmentScores}: RowProps) => {
return (
<tr>
Expand Down
7 changes: 7 additions & 0 deletions devU-client/src/components/pages/homePage/homePage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
margin-bottom: 30px;

}
// h1 {
// align-items:left;
// margin-left 20px;
// font-size: 30px;
// font-weight: 550;
// margin-bottom: 30px;
// }


.no_courses {
Expand Down
3 changes: 2 additions & 1 deletion devU-client/src/components/pages/homePage/homePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const HomePage = () => {
})
const assignmentResults_instructor = await Promise.all(assignmentPromises_instructor)
assignmentResults_instructor.forEach(([course, assignments]) => assignmentMap.set(course, assignments))

//set
setAssignments(assignmentMap)
setPastCourses(pastCourses)
setEnrollCourses(enrolledCourses)
Expand Down Expand Up @@ -147,6 +147,7 @@ const HomePage = () => {
<UserCourseListItem course={course} assignments={assignments.get(course)} key={course.id}/>
</div>
))}

{upcomingCourses.length === 0 && <h4 className={styles.no_courses}>No upcoming Courses</h4>}
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import styles from './Submissionspage.scss';
import TextField from "../../shared/inputs/textField";



//tableprops
interface TableProps {

users: User[];
Expand All @@ -37,7 +37,7 @@ interface TableProps {

}


//row

interface RowProps {

Expand Down

0 comments on commit 0869164

Please sign in to comment.