@@ -13,7 +13,7 @@ import ReviewSolutionContainer from '../../containers/ReviewSolutionContainer';
1313
1414import Page from '../../components/layout/Page' ;
1515import { GroupNavigation } from '../../components/layout/Navigation' ;
16- import Icon , { AssignmentIcon , DetailIcon , LoadingIcon , UserIcon } from '../../components/icons' ;
16+ import Icon , { AssignmentIcon , DetailIcon , CodeFileIcon , LoadingIcon , UserIcon } from '../../components/icons' ;
1717import SolutionTableRowIcons from '../../components/Assignments/SolutionsTable/SolutionTableRowIcons' ;
1818import Points from '../../components/Assignments/SolutionsTable/Points' ;
1919import SolutionsTable from '../../components/Assignments/SolutionsTable' ;
@@ -70,7 +70,12 @@ const prepareCachedAssignmentsComparator = (assignments, locale) => {
7070} ;
7171
7272const prepareTableColumnDescriptors = defaultMemoize ( ( assignments , groupId , locale , links ) => {
73- const { SOLUTION_DETAIL_URI_FACTORY , ASSIGNMENT_DETAIL_URI_FACTORY , ASSIGNMENT_STATS_URI_FACTORY } = links ;
73+ const {
74+ SOLUTION_DETAIL_URI_FACTORY ,
75+ SOLUTION_SOURCE_CODES_URI_FACTORY ,
76+ ASSIGNMENT_DETAIL_URI_FACTORY ,
77+ ASSIGNMENT_STATS_URI_FACTORY ,
78+ } = links ;
7479
7580 const assignmentsComparator = prepareCachedAssignmentsComparator ( assignments , locale ) ;
7681
@@ -87,6 +92,7 @@ const prepareTableColumnDescriptors = defaultMemoize((assignments, groupId, loca
8792 status = { info . lastSubmission ? info . lastSubmission . evaluationStatus : null }
8893 lastSubmission = { info . lastSubmission }
8994 commentsStats = { info . commentsStats }
95+ plagiarism = { Boolean ( info . plagiarism ) }
9096 />
9197 ) ,
9298 } ) ,
@@ -192,6 +198,12 @@ const prepareTableColumnDescriptors = defaultMemoize((assignments, groupId, loca
192198 < DetailIcon gapRight />
193199 < FormattedMessage id = "generic.detail" defaultMessage = "Detail" />
194200 </ Button >
201+ < Link to = { SOLUTION_SOURCE_CODES_URI_FACTORY ( solution . assignmentId , solution . id ) } >
202+ < Button size = "xs" variant = "primary" >
203+ < CodeFileIcon fixedWidth gapRight />
204+ < FormattedMessage id = "generic.files" defaultMessage = "Files" />
205+ </ Button >
206+ </ Link >
195207 </ Link >
196208 ) }
197209 { solution . permissionHints && solution . permissionHints . setFlag && (
@@ -235,14 +247,24 @@ const prepareTableData = defaultMemoize(
235247 isBestSolution,
236248 commentsStats,
237249 permissionHints,
250+ plagiarism = null ,
238251 } ) => {
239252 const statusEvaluated =
240253 lastSubmission &&
241254 ( lastSubmission . evaluationStatus === 'done' || lastSubmission . evaluationStatus === 'failed' ) ;
242255 const rte = getRuntime ( runtimeEnvironmentId ) ;
243256
244257 res . push ( {
245- icon : { id, commentsStats, lastSubmission, accepted, review, permissionHints, isBestSolution } ,
258+ icon : {
259+ id,
260+ commentsStats,
261+ lastSubmission,
262+ accepted,
263+ review,
264+ permissionHints,
265+ isBestSolution,
266+ plagiarism,
267+ } ,
246268 assignment,
247269 date : createdAt ,
248270 validity : statusEvaluated ? safeGet ( lastSubmission , [ 'evaluation' , 'score' ] ) : null ,
@@ -516,6 +538,7 @@ class GroupUserSolutions extends Component {
516538 />
517539 </ div >
518540 }
541+ className = "mb-0"
519542 />
520543 </ Box >
521544 )
0 commit comments