-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improving visualization of plagiarism similarities over multiple files.
- Loading branch information
1 parent
0fa1927
commit fe3bbb0
Showing
12 changed files
with
439 additions
and
253 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
src/components/ReferenceSolutions/EvaluationTable/EvaluationTable.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.activeRow { | ||
background-color: #eee; | ||
} | ||
.activeRow { | ||
background-color: #eee; | ||
} |
371 changes: 214 additions & 157 deletions
371
src/components/Solutions/PlagiarismCodeBox/PlagiarismCodeBox.js
Large diffs are not rendered by default.
Oops, something went wrong.
51 changes: 51 additions & 0 deletions
51
src/components/Solutions/PlagiarismCodeBoxWithSelector/FileSelectionTableRow.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { FormattedMessage } from 'react-intl'; | ||
|
||
import DateTime from '../../widgets/DateTime'; | ||
import GroupsNameContainer from '../../../containers/GroupsNameContainer'; | ||
import { CodeFileIcon } from '../../icons'; | ||
|
||
const FileSelectionTableRow = ({ file, idx, selected = false, selectFile }) => ( | ||
<tr | ||
className={selected ? 'table-primary' : 'clickable'} | ||
onClick={!selected && selectFile ? () => selectFile(idx) : null}> | ||
<td className="text-nowrap shrink-col"> | ||
<CodeFileIcon className="text-muted" gapLeft gapRight /> | ||
</td> | ||
<td> | ||
<code> | ||
{file.solutionFile.name} | ||
{file.fileEntry ? `/${file.fileEntry}` : ''} | ||
</code> | ||
</td> | ||
<td> | ||
{file.fragments && ( | ||
<FormattedMessage | ||
id="app.solutionPlagiarisms.selectPlagiarismFileModal.fragments" | ||
defaultMessage="({fragments} {fragments, plural, one {fragment} other {fragments}})" | ||
values={{ fragments: file.fragments.length }} | ||
/> | ||
)} | ||
</td> | ||
<td> | ||
<FormattedMessage id="app.solutionPlagiarisms.selectPlagiarismFileModal.fromSolution" defaultMessage="solution" />{' '} | ||
<strong>#{file.solution.attemptIndex}</strong> | ||
</td> | ||
<td> | ||
(<DateTime unixts={file.solution.createdAt} />) | ||
</td> | ||
<td className="small"> | ||
<GroupsNameContainer groupId={file.groupId} admins /> | ||
</td> | ||
</tr> | ||
); | ||
|
||
FileSelectionTableRow.propTypes = { | ||
file: PropTypes.object.isRequired, | ||
idx: PropTypes.number.isRequired, | ||
selected: PropTypes.bool, | ||
selectFile: PropTypes.func, | ||
}; | ||
|
||
export default FileSelectionTableRow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
.tab-pane img { | ||
max-width: 100%; | ||
} | ||
.tab-pane img { | ||
max-width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.