diff --git a/src/pages/AssignmentSolutions/AssignmentSolutions.js b/src/pages/AssignmentSolutions/AssignmentSolutions.js
index 9c56f779e..35e7695d1 100644
--- a/src/pages/AssignmentSolutions/AssignmentSolutions.js
+++ b/src/pages/AssignmentSolutions/AssignmentSolutions.js
@@ -39,6 +39,8 @@ import FetchManyResourceRenderer from '../../components/helpers/FetchManyResourc
import { createUserNameComparator } from '../../components/helpers/users.js';
import { LocalizedExerciseName } from '../../components/helpers/LocalizedNames';
import EnvironmentsListItem from '../../components/helpers/EnvironmentsList/EnvironmentsListItem.js';
+import GroupArchivedWarning from '../../components/Groups/GroupArchivedWarning/GroupArchivedWarning.js';
+import GroupExamPending from '../../components/Groups/GroupExamPending';
import Callout from '../../components/widgets/Callout';
import { fetchByIds } from '../../redux/modules/users.js';
@@ -47,8 +49,8 @@ import { fetchGroupIfNeeded } from '../../redux/modules/groups.js';
import { fetchRuntimeEnvironments } from '../../redux/modules/runtimeEnvironments.js';
import { fetchAssignmentSolutions, fetchAssignmentSolversIfNeeded } from '../../redux/modules/solutions.js';
import { setSolutionReviewState } from '../../redux/modules/solutionReviews.js';
-import { usersSelector } from '../../redux/selectors/users.js';
-import { groupSelector } from '../../redux/selectors/groups.js';
+import { usersSelector, loggedInUserSelector } from '../../redux/selectors/users.js';
+import { groupSelector, groupDataAccessorSelector } from '../../redux/selectors/groups.js';
import { studentsIdsOfGroup } from '../../redux/selectors/usersGroups.js';
import {
getAssignment,
@@ -408,10 +410,12 @@ class AssignmentSolutions extends Component {
render() {
const {
loggedUserId,
+ currentUser,
assignmentId,
assignment,
getStudents,
getGroup,
+ groupsAccessor,
getUserSolutions,
runtimeEnvironments,
assignmentSolutions,
@@ -445,41 +449,59 @@ class AssignmentSolutions extends Component {
canViewExercise={true}
/>
- {plagiarisms && plagiarisms.length > 0 && (
- }>
-
-
- )}
-
- {pendingReviews && pendingReviews.length > 0 && (
-
-
-
-
-
-
-
-
-
-
- )}
+
+ )}
+
+ {pendingReviews && pendingReviews.length > 0 && !group.archived && (
+
+
+
+
+
+
+
+
+
+
+ )}
+ >
+ )}
+
@@ -667,10 +689,12 @@ class AssignmentSolutions extends Component {
AssignmentSolutions.propTypes = {
loggedUserId: PropTypes.string.isRequired,
+ currentUser: ImmutablePropTypes.map,
assignmentId: PropTypes.string.isRequired,
assignment: PropTypes.object,
getStudents: PropTypes.func.isRequired,
getGroup: PropTypes.func.isRequired,
+ groupsAccessor: PropTypes.func.isRequired,
getUserSolutions: PropTypes.func.isRequired,
runtimeEnvironments: PropTypes.array,
assignmentSolutions: ImmutablePropTypes.list,
@@ -697,6 +721,7 @@ export default withLinks(
return {
loggedUserId: loggedInUserIdSelector(state),
+ currentUser: loggedInUserSelector(state),
assignmentId,
assignment,
getStudentsIds,
@@ -704,6 +729,7 @@ export default withLinks(
getUserSolutions: userId => getUserSolutionsSortedData(state)(userId, assignmentId),
assignmentSolutions: getAssignmentSolutions(state, assignmentId),
getGroup: id => groupSelector(state, id),
+ groupsAccessor: groupDataAccessorSelector(state),
runtimeEnvironments: getAssignmentEnvironments(state, assignmentId),
fetchManyStatus: fetchManyAssignmentSolutionsStatus(assignmentId)(state),
assignmentSolversLoading: isAssignmentSolversLoading(state),
diff --git a/src/pages/GroupUserSolutions/GroupUserSolutions.js b/src/pages/GroupUserSolutions/GroupUserSolutions.js
index 3df283733..21eca0faa 100644
--- a/src/pages/GroupUserSolutions/GroupUserSolutions.js
+++ b/src/pages/GroupUserSolutions/GroupUserSolutions.js
@@ -418,7 +418,7 @@ class GroupUserSolutions extends Component {
)}
- {pendingReviews && pendingReviews.length > 0 && (
+ {pendingReviews && pendingReviews.length > 0 && !group.archived && (