Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
147c947
Updated README.md added contributors name
MakarandPundlik Nov 10, 2024
159ca63
Added npm install command
MakarandPundlik Nov 10, 2024
52d4f29
UI enhancements to the TA and Course page
Nov 24, 2024
65421d9
resolved a bug by adding select TA to the final array and removed it …
MakarandPundlik Nov 28, 2024
fbf7ba4
Merge pull request #5 from MakarandPundlik/makarand_features
AnuragGorkar Nov 28, 2024
36e0219
Merge pull request #1 from MakarandPundlik/manage_ta_page
MakarandPundlik Nov 28, 2024
8626591
added unit test cases for columns
MakarandPundlik Nov 30, 2024
104268a
added unit test cases for coursecolumns
MakarandPundlik Nov 30, 2024
d3da1da
added test cases for column button
MakarandPundlik Nov 30, 2024
f81a2ad
Merge pull request #6 from MakarandPundlik/makarand_unit_tests
MakarandPundlik Nov 30, 2024
bd54b4e
Added select feature to Add TA drop down
Nov 30, 2024
d6fc810
Merge pull request #9 from MakarandPundlik/8-add-search-feature-for-s…
AnuragGorkar Nov 30, 2024
57bc5e4
Fetch students as well as TAs in the Add TA page
Rutvik2598 Dec 1, 2024
909c0c3
Merge pull request #10 from MakarandPundlik/3-fetch-all-students-and-…
Rutvik2598 Dec 1, 2024
8108d86
Added permission check before rendering add TA button
Dec 3, 2024
c525ad5
Merge pull request #13 from MakarandPundlik/11-admin-only-access-to-a…
AnuragGorkar Dec 3, 2024
2138f9a
Removed contributor names
MakarandPundlik Dec 7, 2024
59e8b6e
Code cleanup
Dec 7, 2024
e0cf5da
Instructor can also add TA other than Admin
Rutvik2598 Dec 7, 2024
ef6fd6d
Merge pull request #14 from MakarandPundlik/instructor_can_add_ta
AnuragGorkar Dec 7, 2024
3338d11
Setup commit
shubashwetha Mar 18, 2025
b837850
Merge branch 'pr-72_skalyan3' into skalyan3
shubashwetha Mar 18, 2025
ed967bc
create submission table entry component
masonhorne Oct 13, 2024
16b9b4a
create submission list component
masonhorne Oct 13, 2024
6e05f21
create submission view component
masonhorne Oct 13, 2024
0d28496
add route for submission view
masonhorne Oct 13, 2024
a5eba63
fix styling for container
masonhorne Oct 13, 2024
6b26e84
test submission view component
masonhorne Oct 13, 2024
0a0238d
test submission list component
masonhorne Oct 13, 2024
34a9e0a
test submission entry component
masonhorne Oct 13, 2024
6c1d8a5
move existing individual submission view to submissions directory
masonhorne Oct 13, 2024
ce309c9
update view to include 23 mocked users
masonhorne Oct 19, 2024
d86cf1b
submission history view
Oct 28, 2024
5ee8c4a
Revert "submission history view"
Oct 28, 2024
1af3b6f
woops made a mistake, changes without the updated package file
Oct 28, 2024
f2a1cea
submission history tests
Oct 29, 2024
b6d81d8
remove user link
masonhorne Oct 29, 2024
950ec83
test changes
Oct 29, 2024
00273b0
update submissions and links to single column
masonhorne Nov 14, 2024
88ad853
update submissions header to be above table
masonhorne Nov 14, 2024
4b2fc89
update submission history header
masonhorne Nov 14, 2024
d8b5062
text format changes to submissions
mayamei1 Mar 18, 2025
ef357d7
Updating Submission History Table to standard table format.
aryansharma2k2 Mar 18, 2025
a72791c
fixed font size and line height
mayamei1 Mar 18, 2025
3164242
Updating path.
aryansharma2k2 Mar 18, 2025
691ceaf
Implemented OCP and updated interfaces
SurajRKU Nov 1, 2024
f993a21
Added Copying Animator and ISP
SurajRKU Nov 1, 2024
c50c663
Added dialog and updated method adhering to LSP
SurajRKU Nov 1, 2024
444457a
Filtered dropdown by institution and implemented SRP
SurajRKU Nov 1, 2024
ffc5dba
Added Onchnage to filter instructors and implemented an SRP method
SurajRKU Nov 1, 2024
89ad0be
UI Fix for Instructor view and Add Course Button
SurajRKU Dec 1, 2024
ea65b69
UI Fix for Action Icons
SurajRKU Dec 1, 2024
c40b807
UI Fix for text fields prepopulation
SurajRKU Dec 2, 2024
0e49df9
UI fix for copy and delete modals
SurajRKU Dec 4, 2024
730aa79
Finalized Comments
SurajRKU Dec 4, 2024
cc2bb8e
updated date format
mayamei1 Mar 18, 2025
cf649d5
only show pagination if >10 courses
mayamei1 Mar 18, 2025
00bf863
Editing the create button.
aryansharma2k2 Mar 18, 2025
d530d99
Formatting action buttons.
aryansharma2k2 Mar 18, 2025
632c718
Formatting buttons within delete, copy and edit forms.
aryansharma2k2 Mar 18, 2025
1bebd3c
removed search bar from table and some text formatting
mayamei1 Mar 21, 2025
a42da5e
text formatting
mayamei1 Mar 21, 2025
8923bf1
updated create course button
mayamei1 Mar 22, 2025
494a7ec
updated the update course modal buttons
mayamei1 Mar 22, 2025
e099c0c
create submission table entry component
masonhorne Oct 13, 2024
1335fe5
create submission list component
masonhorne Oct 13, 2024
297b439
create submission view component
masonhorne Oct 13, 2024
337c354
add route for submission view
masonhorne Oct 13, 2024
5b7c13c
fix styling for container
masonhorne Oct 13, 2024
4d1bb2c
test submission view component
masonhorne Oct 13, 2024
dc7898b
test submission list component
masonhorne Oct 13, 2024
8b132ea
test submission entry component
masonhorne Oct 13, 2024
6727ea9
move existing individual submission view to submissions directory
masonhorne Oct 13, 2024
a0d36d4
update view to include 23 mocked users
masonhorne Oct 19, 2024
f7f4d06
submission history view
Oct 28, 2024
e9a0762
Revert "submission history view"
Oct 28, 2024
eb7292b
woops made a mistake, changes without the updated package file
Oct 28, 2024
34bab90
submission history tests
Oct 29, 2024
7d8e7a5
remove user link
masonhorne Oct 29, 2024
379a298
test changes
Oct 29, 2024
f2682c0
update submissions and links to single column
masonhorne Nov 14, 2024
5ce6496
update submissions header to be above table
masonhorne Nov 14, 2024
610168f
update submission history header
masonhorne Nov 14, 2024
32ad226
text format changes to submissions
mayamei1 Mar 18, 2025
83d2252
Updating Submission History Table to standard table format.
aryansharma2k2 Mar 18, 2025
6575cc8
fixed font size and line height
mayamei1 Mar 18, 2025
89ed9ff
Updating path.
aryansharma2k2 Mar 18, 2025
57df2ed
editedvalues for more consistency
mayamei1 Mar 18, 2025
03a447b
Merge branch 'test-course' into test-main
mayamei1 Mar 22, 2025
b45e13f
updated pagination
mayamei1 Mar 22, 2025
49674ba
undone button changes
mayamei1 Mar 22, 2025
7e5ad99
Pulled and merged PR 72
shubashwetha Mar 22, 2025
9d5c20a
Merge branch 'main' of https://github.com/mayamei1/reimplementation-f…
shubashwetha Mar 22, 2025
3aff7ae
Changed buttons and icons in Add TA to a course page according to the…
shubashwetha Mar 22, 2025
cc968d2
Changed dropdown and toggle formatting
shubashwetha Mar 22, 2025
2e4e98b
Changed cases and removed redundant cancel button
shubashwetha Mar 22, 2025
1d6bf6b
made table disableGlobalFilter code more consistent
mayamei1 Mar 22, 2025
5f7ddf2
updated alert for TAEditor
mayamei1 Mar 22, 2025
c3dd938
text changes and button color for TAEditor
mayamei1 Mar 22, 2025
780c2ba
updated course copy/delete modal buttons
mayamei1 Mar 22, 2025
249a6b0
updated submissions text format
mayamei1 Mar 22, 2025
82eb3f8
changed create course to create
mayamei1 Mar 23, 2025
44ba15d
updated manage TA table
mayamei1 Mar 23, 2025
0f0dfa2
merrge branch 'main' of https://github.com/mayamei1/reimplementation-…
shubashwetha Mar 23, 2025
055fb40
Shortened hover message of TA icon
shubashwetha Mar 23, 2025
654ceb4
Merge branch 'skalyan3' of https://github.com/mayamei1/reimplementati…
shubashwetha Mar 23, 2025
00b539d
courses header and submission table format
mayamei1 Mar 23, 2025
fda2784
Adding submissions to navbar.
aryansharma2k2 Mar 23, 2025
c299341
fixed add TA submission
mayamei1 Mar 23, 2025
61e385b
Changed TA display table delete TA icon
shubashwetha Mar 24, 2025
a2944e3
Final changes
shubashwetha Mar 24, 2025
ab6c38c
Removed redundant cancel and changed class
shubashwetha Mar 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo

In the project directory, you can run:

### `npm install`
Installs the dependencies required

### `npm start`

Runs the app in the development mode.\
Expand Down
43,634 changes: 26,029 additions & 17,605 deletions package-lock.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"axios": "^1.4.0",
"bootstrap": "^5.3.3",
"chart.js": "^4.1.1",
"recharts": "^2.0.0",
"formik": "^2.2.9",
"formik": "^2.4.6",
"jquery": "^3.7.1",
"jwt-decode": "^3.1.2",
"react": "^18.2.0",
Expand All @@ -34,6 +33,8 @@
"react-redux": "^8.0.5",
"react-router-dom": "^6.11.1",
"react-scripts": "^5.0.1",
"react-select": "^5.8.3",
"recharts": "^2.0.0",
"redux-persist": "^6.0.0",
"sass": "^1.62.1",
"save": "^2.9.0",
Expand Down
Binary file added public/assets/images/Copy-icon-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/add-ta-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/assign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/delete-icon-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/edit-icon-24.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/paste.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/pencil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/assets/images/remove.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 40 additions & 31 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,45 +1,46 @@
import React from "react";
import RootLayout from "layout/Root";
import { loadAssignment } from "pages/Assignments/AssignmentUtil";
import AssignReviewer from "pages/Assignments/AssignReviewer";
import CreateTeams from "pages/Assignments/CreateTeams";
import ViewDelayedJobs from "pages/Assignments/ViewDelayedJobs";
import ViewReports from "pages/Assignments/ViewReports";
import ViewScores from "pages/Assignments/ViewScores";
import Courses from "pages/Courses/Course";
import CourseEditor from "pages/Courses/CourseEditor";
import { loadCourseInstructorDataAndInstitutions } from "pages/Courses/CourseUtil";
import Questionnaire from "pages/EditQuestionnaire/Questionnaire";
import Home from "pages/Home";
import Participants from "pages/Participants/Participant";
import ParticipantEditor from "pages/Participants/ParticipantEditor";
import { loadParticipantDataRolesAndInstitutions } from "pages/Participants/participantUtil";
import EditProfile from "pages/Profile/Edit";
import Reviews from "pages/Reviews/reviews";
import SubmissionsView from "pages/Submissions/SubmissionsView";
import SubmissionView from "pages/Submissions/SubmissionView";
import SubmissionHistoryView from "./pages/Submissions/SubmissionHistoryView";
import TA from "pages/TA/TA";
import TAEditor from "pages/TA/TAEditor";
import { loadTAs } from "pages/TA/TAUtil";
import { createBrowserRouter, Navigate, RouterProvider } from "react-router-dom";
import AdministratorLayout from "./layout/Administrator";
import ManageUserTypes, { loader as loadUsers } from "./pages/Administrator/ManageUserTypes";
import Assignment from "./pages/Assignments/Assignment";
import AssignmentEditor from "./pages/Assignments/AssignmentEditor";
import Login from "./pages/Authentication/Login";
import Logout from "./pages/Authentication/Logout";
import Email_the_author from "./pages/Email_the_author/email_the_author";
import InstitutionEditor, { loadInstitution } from "./pages/Institutions/InstitutionEditor";
import Institutions, { loadInstitutions } from "./pages/Institutions/Institutions";
import RoleEditor, { loadAvailableRole } from "./pages/Roles/RoleEditor";
import Roles, { loadRoles } from "./pages/Roles/Roles";
import Assignment from "./pages/Assignments/Assignment";
import AssignmentEditor from "./pages/Assignments/AssignmentEditor";
import { loadAssignment } from "pages/Assignments/AssignmentUtil";
import ErrorPage from "./router/ErrorPage";
import ProtectedRoute from "./router/ProtectedRoute";
import { ROLE } from "./utils/interfaces";
import NotFound from "./router/NotFound";
import Participants from "pages/Participants/Participant";
import ParticipantEditor from "pages/Participants/ParticipantEditor";
import { loadParticipantDataRolesAndInstitutions } from "pages/Participants/participantUtil";
import RootLayout from "layout/Root";
import UserEditor from "./pages/Users/UserEditor";
import Users from "./pages/Users/User";
import UserEditor from "./pages/Users/UserEditor";
import { loadUserDataRolesAndInstitutions } from "./pages/Users/userUtil";
import Home from "pages/Home";
import Questionnaire from "pages/EditQuestionnaire/Questionnaire";
import Courses from "pages/Courses/Course";
import CourseEditor from "pages/Courses/CourseEditor";
import { loadCourseInstructorDataAndInstitutions } from "pages/Courses/CourseUtil";
import TA from "pages/TA/TA";
import TAEditor from "pages/TA/TAEditor";
import { loadTAs } from "pages/TA/TAUtil";
import ReviewTable from "./pages/ViewTeamGrades/ReviewTable";
import EditProfile from "pages/Profile/Edit";
import Reviews from "pages/Reviews/reviews";
import Email_the_author from "./pages/Email_the_author/email_the_author";
import CreateTeams from "pages/Assignments/CreateTeams";
import AssignReviewer from "pages/Assignments/AssignReviewer";
import ViewSubmissions from "pages/Assignments/ViewSubmissions";
import ViewScores from "pages/Assignments/ViewScores";
import ViewReports from "pages/Assignments/ViewReports";
import ViewDelayedJobs from "pages/Assignments/ViewDelayedJobs";
import ErrorPage from "./router/ErrorPage";
import NotFound from "./router/NotFound";
import ProtectedRoute from "./router/ProtectedRoute";
import { ROLE } from "./utils/interfaces";
function App() {
const router = createBrowserRouter([
{
Expand Down Expand Up @@ -72,9 +73,13 @@ function App() {
},
{
path: "assignments/edit/:id/viewsubmissions",
element: <ViewSubmissions />,
element: <SubmissionView />,
loader: loadAssignment,
},
{
path: "submissions/history/:submissionId",
element: <ProtectedRoute element={<SubmissionHistoryView />} leastPrivilegeRole={ROLE.TA} />,
},
{
path: "assignments/edit/:id/viewscores",
element: <ViewScores />,
Expand Down Expand Up @@ -122,6 +127,10 @@ function App() {
},
],
},
{
path: "student_tasks",
element: <ProtectedRoute element={<SubmissionsView />} leastPrivilegeRole={ROLE.TA} />,
},
{
path: "student_tasks/participants",
element: <Participants type="student_tasks" id={1} />,
Expand Down
57 changes: 57 additions & 0 deletions src/components/ColumnButton.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React from "react";
import { render, screen } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
import ColumnButton from "./ColumnButton";

// Mock React-Bootstrap components
jest.mock("react-bootstrap", () => ({
Button: ({ children, ...props }: any) => <button {...props}>{children}</button>,
Tooltip: ({ id, children }: any) => <div id={id}>{children}</div>,
OverlayTrigger: ({ children, overlay }: any) => (
<div>
{overlay}
{children}
</div>
),
}));

describe("ColumnButton", () => {
const mockOnClick = jest.fn();

const baseProps = {
id: "test-button",
label: "Test Button",
tooltip: "This is a test tooltip",
variant: "primary",
size: "sm" as const,
className: "custom-class",
onClick: mockOnClick,
icon: <span data-testid="icon">Icon</span>,
};

test("should call onClick when the button is clicked", async () => {
render(<ColumnButton {...baseProps} tooltip={undefined} />);
const button = screen.getByRole("button", { name: "Test Button" });

userEvent.click(button);
expect(mockOnClick).toHaveBeenCalledTimes(1);
});

test("should render a tooltip when tooltip is provided", () => {
render(<ColumnButton {...baseProps} />);
const tooltip = screen.getByText("This is a test tooltip");

// Vanilla assertion to check if tooltip is rendered
expect(tooltip).not.toBeNull();
const button = screen.getByRole("button", { name: "Test Button" });
expect(button).not.toBeNull(); // Ensure the button is still present
});

test("should not render a tooltip when tooltip is not provided", () => {
render(<ColumnButton {...baseProps} tooltip={undefined} />);
const tooltip = screen.queryByText("This is a test tooltip");

// Vanilla assertion to check if tooltip is not rendered
expect(tooltip).toBeNull();
});
});
57 changes: 57 additions & 0 deletions src/components/ColumnButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import React from "react";
import { Button, OverlayTrigger, Tooltip } from "react-bootstrap";

/**
* @author Rutvik Kulkarni on Nov, 2024
*/

interface ColumnButtonProps {
id: string;
label?: string;
tooltip?: string;
variant: string;
size?: "sm" | "lg"; // Matches React-Bootstrap Button prop
className?: string;
onClick: () => void;
icon: React.ReactNode;
}

const ColumnButton: React.FC<ColumnButtonProps> = (props) => {
const {
id,
label,
tooltip,
variant,
size,
className,
onClick,
icon,
} = props;

const displayButton = (
<Button
variant={variant}
size={size}
className={className}
onClick={onClick}
aria-label={label}
>
{icon}
</Button>
);

if (tooltip) {
return (
<OverlayTrigger
placement="top"
overlay={<Tooltip id={`${id}-tooltip`}>{tooltip}</Tooltip>}
>
{displayButton}
</OverlayTrigger>
);
}

return displayButton;
};

export default ColumnButton;
9 changes: 8 additions & 1 deletion src/components/Form/FormSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { IFormikFieldProps, IFormPropsWithOption } from "./interfaces";
* @author Ankur Mundra on May, 2023
*/

const FormSelect: React.FC<IFormPropsWithOption> = (props) => {
const FormSelect: React.FC<IFormPropsWithOption & { onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void }> = (props) => {
const {
as,
md,
Expand All @@ -21,6 +21,7 @@ const FormSelect: React.FC<IFormPropsWithOption> = (props) => {
tooltipPlacement,
disabled,
inputGroupPrepend,
onChange, // Add onChange to props to detect chnage in selected institutions.
} = props;

const displayLabel = tooltip ? (
Expand Down Expand Up @@ -48,6 +49,12 @@ const FormSelect: React.FC<IFormPropsWithOption> = (props) => {
disabled={disabled}
isInvalid={isInvalid}
feedback={form.errors[field.name]}
onChange={(event) => {
field.onChange(event); // Call Formik's onChange
if (onChange) {
onChange(event); // Call the passed onChange if provided
}
}}
>
{options.map((option) => {
return (
Expand Down
1 change: 1 addition & 0 deletions src/components/Form/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface IFormOption {

export interface IFormPropsWithOption extends IFormProps {
options: IFormOption[];
onChange?: (event: React.ChangeEvent<HTMLSelectElement>) => void;
}

export interface IFormikFieldProps {
Expand Down
11 changes: 10 additions & 1 deletion src/components/Table/GlobalFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,23 @@ import DebouncedInput from "./DebouncedInput";
interface FilterProps {
filterValue: string | number;
setFilterValue: (value: string | number) => void;
isDisabled?: boolean; // New optional prop to disable the filter
}

const GlobalFilter: React.FC<FilterProps> = ({ filterValue, setFilterValue }) => {
const GlobalFilter: React.FC<FilterProps> = ({
filterValue,
setFilterValue,
isDisabled = true, // Default to true for disabling
}) => {
const searchHandler = useCallback(
(value: string | number) => setFilterValue(value),
[setFilterValue]
);

if (isDisabled) {
return null; // Render nothing when disabled
}

return (
<DebouncedInput
onChange={searchHandler}
Expand Down
Loading