Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into improve-install-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
dmols committed Sep 24, 2024
2 parents d9e4a09 + 100471b commit f5ad77b
Show file tree
Hide file tree
Showing 7 changed files with 211 additions and 82 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ PHPALLY_SUGGESTION_RULES="
RedirectedLink,
EmbedTagDetected,
IframeNotHandled,
TableNotEmpty
"
# Rules that are easiest to tackle when using UDOIT. Comma-separated list of rule IDs.
EASY_FIX_RULES="
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Change Log

Please update this file as you open PRs and make changes to the codebase. Thank you!
## [Unreleased]

## [3.5.0]

### General

- Added TableNotEmpty rule and UFIXIT issue form to track tables with no content (Thank you, [@AlanFCMV](https://github.com/alanfcmv))
- Increased maximum file upload size allowed, from 1mb to 10mb (Thank you, [@taheralfayad](https://github.com/taheralfayad))
- Changed the description of 'ParagraphNotUsedAsHeader' rule to be less ambiguous since UDOIT has flagged this issue incorrectly before (Thank you, [@taheralfayad](https://github.com/taheralfayad))
- Updated outdated dependencies (Thank you, [@dmols](https://github.com/dmols))
- Previously, the browser console would relay the data captured in the course, on initial scan. The console log has been removed since, to allow for more data security (Thank you, [@dmols](https://github.com/dmols))
- Allow UDOIT to accept modern file types to be uploaded, such as those with extensions pptx, xlsx, docx (Thank you, [@taheralfayad](https://github.com/taheralfayad))
- Added a CHANGELOG file to keep better track of the codebase changes (Thank you, [@dmols](https://github.com/dmols))

### Bugfixes

- Fixed issue where more than one resolved issue in the UFIXIT modal can remain. Before, the modal would only show the most recent one resolved. (Thank you, [@ssciolla](https://github.com/ssciolla))
- Fixed case where navigating through issues on UFIXIT modal would be difficult or impossible when one is marked as fixed, since the modal will jump back to the resolved one. (Thank you, [@ssciolla](https://github.com/ssciolla))
- Fixed issue where adding a Youtube API key to your .env file would not make UDOIT automatically consider issues revolving youtube captioning. This was resolved by allowing a 'Full Course Rescan' option in the dropdown menu of the UDOIT welcome screen (Thank you, [@taheralfayad](https://github.com/taheralfayad))

## Previous Releases
For the time being, please refer to [this page](https://github.com/ucfopen/UDOIT/releases) to view the changes made to previous UDOIT releases.
14 changes: 10 additions & 4 deletions assets/js/Components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,20 @@ class App extends React.Component {
}

handleIssueSave(newIssue, newReport) {
let { report } = this.state
report = {...report, ...newReport}
const oldReport = this.state.report;

const report = { ...oldReport, ...newReport };

if (report && Array.isArray(report.issues)) {
report.issues = report.issues.map(issue => (issue.id == newIssue.id) ? newIssue : issue)
// Combine backend issues with frontend issue state
report.issues = report.issues.map((issue) => {
if (issue.id === newIssue.id) return newIssue;
const oldIssue = oldReport.issues.find((oldReportIssue) => oldReportIssue.id === issue.id);
return oldIssue !== undefined ? { ...oldIssue, ...issue } : issue;
});
}

this.setState({ report })
this.setState({ report });
}

handleFileSave(newFile, newReport) {
Expand Down
1 change: 1 addition & 0 deletions assets/js/Components/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const issueRuleIds = [
"RedirectedLink",
"TableDataShouldHaveTableHeader",
"TableHeaderShouldHaveScope",
"TableNotEmpty",
"VideoCaptionsMatchCourseLanguage",
"VideoEmbedCheck",
"VideoProvidesCaptions",
Expand Down
21 changes: 9 additions & 12 deletions assets/js/Components/ContentPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,6 @@ class ContentPage extends React.Component {
}
}

static getDerivedStateFromProps(props, state) {
const stateActiveIssue = state.activeIssue
const propsActiveIssue = stateActiveIssue && props.report.issues[stateActiveIssue.id]
if(propsActiveIssue && propsActiveIssue.status !== stateActiveIssue.status) {
return {
activeIssue: propsActiveIssue
}
}
return null
}

handleSearchTerm = (e, val) => {
this.setState({searchTerm: val, filteredIssues: [], tableSettings: Object.assign({}, this.state.tableSettings, {pageNum: 0})});
}
Expand All @@ -102,9 +91,17 @@ class ContentPage extends React.Component {
}

handleCloseButton = () => {
const newReport = { ...this.props.report };
newReport.issues = newReport.issues.map((issue) => {
issue.recentlyResolved = false;
issue.recentlyUpdated = false;
return issue;
});

this.setState({
report: newReport,
modalOpen: false
})
});
}

handleTrayToggle = (e, val) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@instructure/ui-toggle-details": "^7.5.0",
"@instructure/ui-tray": "^7.5.0",
"@reactchartjs/react-chart.js": "^1.0.0-rc.3",
"axios": "^0.21.2",
"axios": "^1.6.0",
"babel-loader": "^8.2.2",
"chart.js": "^2.9.4",
"moment": "^2.29.4",
Expand Down
Loading

0 comments on commit f5ad77b

Please sign in to comment.