fix(web): tutorials page throws when a tutorial's meeting time is not - #523
Closed
sakethsram8888 wants to merge 1523 commits into
Closed
fix(web): tutorials page throws when a tutorial's meeting time is not#523sakethsram8888 wants to merge 1523 commits into
sakethsram8888 wants to merge 1523 commits into
Conversation
- students must wait until all tasks have finished processing before clicking on create portfolio
…ms#1263) * chore: upgrade gantt chart * feat: add ability to screenshot gantt chart * chore: fix date formatting * refactor: enable accurate screenshotting of gantt chart * chore: improve screenshot name * chore: extend start date of chart if todays date lands outside
Bumps [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-conventional) from 20.5.3 to 21.0.2. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-conventional/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v21.0.2/@commitlint/config-conventional) --- updated-dependencies: - dependency-name: "@commitlint/config-conventional" dependency-version: 21.0.2 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
* refactor: prevent camera running in background * refactor: improve ui scaling of tutor mobile view * chore: improve ui * fix: ensure scanner works after route loads * chore: improve ui * refactor: hide qr scanner in header if already in tutor discussion route * fix: ensure scanner works after route loads
* feat: submission history * refactor: improve tab order * refactor: merge history components * chore: format * fix: add task status fallbacks * fix: manually add back code block styling
* refactor: improve calendar ui/ux * refactor: improve ui * chore: add install guide * chore: correct google calendar * fix: copy to clipboard * chore: add mock ics extension * feat: open web cal from task planner
* feat: engagement passport * feat: connect engagements to backend * feat: view engagement comments * chore: render evidence url * chore: open engagement dialog from tutor discussion * chore: format * refactor: use placeholder text and default note if left empty * chore: swap occurred at and created at dates * chore: improve layout * chore: format * fix: prevent mobile devices from zooming in on modal inputs * chore: reorder engagement types * refactor: rename negative to needs attention
…pe-fix-20260819-230937
…lexbox refactor: replace flex-layout with tailwind in extension-comment (doubtfire-lms#1187)
…ooter refactor: replace flex-layout with tailwindcss in tutor's dashboard footer
…pr33-settings-bootstrap-compat fix(settings): preserve bootstrap with protected feature flags
* Add GitHub Actions workflow to notify Teams on PRs * fix(ci): gate the Teams notifier and harden its payload Adds a job guard so the webhook is unreachable from anonymous fork pull requests on these public repositories, and so the file is inert if it ever travels to thoth-tech or doubtfire-lms. Adds reopened and ready_for_review, which is the transition a reviewer alert exists to catch, and varies the headline per action so it stays accurate. Strips Markdown link and code syntax from the title, author and head label before they reach the channel. Joins on a double newline, which is what Teams renders as a break. Reports the real HTTP status instead of asserting a delivery the workflow never checked. --------- Co-authored-by: Clupai8o0 <clupaio4@gmail.com>
…tify-teams-pr Refactor Teams notification to use Adaptive Card
Bumps and [brace-expansion](https://github.com/juliangruber/brace-expansion). These dependencies needed to be updated together. Updates `brace-expansion` from 5.0.6 to 5.0.9 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v5.0.6...v5.0.9) Updates `brace-expansion` from 5.0.7 to 5.0.9 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v5.0.6...v5.0.9) Updates `brace-expansion` from 2.1.1 to 2.1.4 - [Release notes](https://github.com/juliangruber/brace-expansion/releases) - [Commits](juliangruber/brace-expansion@v5.0.6...v5.0.9) --- updated-dependencies: - dependency-name: brace-expansion dependency-version: 5.0.9 dependency-type: indirect - dependency-name: brace-expansion dependency-version: 5.0.9 dependency-type: indirect - dependency-name: brace-expansion dependency-version: 2.1.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [ip-address](https://github.com/beaugunderson/ip-address) from 10.2.0 to 10.5.0. - [Release notes](https://github.com/beaugunderson/ip-address/releases) - [Commits](beaugunderson/ip-address@v10.2.0...v10.5.0) --- updated-dependencies: - dependency-name: ip-address dependency-version: 10.5.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…abot/npm_and_yarn/ip-address-10.5.0 chore(deps): bump ip-address from 10.2.0 to 10.5.0
Bumps [fast-uri](https://github.com/fastify/fast-uri) from 3.1.2 to 3.1.6. - [Release notes](https://github.com/fastify/fast-uri/releases) - [Commits](fastify/fast-uri@v3.1.2...v3.1.6) --- updated-dependencies: - dependency-name: fast-uri dependency-version: 3.1.6 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.2.0 to 4.3.1. - [Changelog](https://github.com/nodeca/js-yaml/blob/4.3.1/CHANGELOG.md) - [Commits](nodeca/js-yaml@4.2.0...4.3.1) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.3.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
…abot/npm_and_yarn/multi-1ff2894045 chore(deps): bump brace-expansion
…abot/npm_and_yarn/fast-uri-3.1.6 chore(deps): bump fast-uri from 3.1.2 to 3.1.6
…abot/npm_and_yarn/js-yaml-4.3.1 chore(deps-dev): bump js-yaml from 4.2.0 to 4.3.1
GitHub gates on the test merge commit whenever that commit carries a status, and only falls back to the head when it carries none. The test merge commit carries none of this repository's other checks, so reporting there moves the merge gate onto a commit CI never sees, and that commit is recomputed every time the base branch moves. Report on head.sha instead. A recomputed test merge commit is no longer something the evaluator reports on, so drop it from the mid-evaluation consistency check as well. 14 unit tests pass.
…ontrack-review-policy ci: enforce OnTrack PR review policy
UI ux waveform
…english-only-submission-notice DOC-4: Add English-only submission notice
…nt-composer refactor: replace ng-flex-layout with Tailwind in task-comment-composer
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes SJ-17: the Tutorials page threw and failed to render entirely whenever
a tutorial's
meetingTimewasn't a valid "H:mm" string.TutorialsComponent.shortTime()didmeetingTime.split(':')and thenminutes.padStart(2, '0')with no guard. IfmeetingTimehad no colon(e.g. a convenor entered
'9am'),minuteswasundefinedand the callthrew a
TypeError. IfmeetingTimeitself wasundefined, it threw evenearlier on
.split(':'). This ran once per row directly in the template(
tutorials.component.html:55) and again inside the Time-column sortcomparator, so a single malformed row took down the whole Tutorial List
screen for every student — not just that row.
shortTimeis now total: it returns''for a falsy input, returns theraw string unchanged when there's no colon to parse, and only formats when
both an hour and minute part are present. No input can make it throw.
No API-side validation was added
meeting_timeis a free-text nullablecolumn by design at that layer, and only the create endpoint validates it,
not update. That's outside this card's scope.
Branches/commits this was built and tested against
fix/sj-17@cfe74dc57, branched fromorigin/11.0.x@6e4c63064feature/mobile-notifications@dc76a5a0e(note: not11.0.xthis repo's checkout was already on this branch and wasn't switched, since the fix is entirely client-side and doesn't touch the API)fix/local-dev-run@ab6b0ebHow Has This Been Tested?
Unit tests
src/app/projects/states/tutorials/tutorials.component.spec.ts(new file), run in isolation via:ng test --include=src/app/projects/states/tutorials/tutorials.component.spec.ts --watch=falseBefore/after reproduction of the exact original vs. fixed logic (standalone, outside the Angular app, to isolate just the function's behaviour):
Live manual verification, running the app locally against seeded data (COS10001):
15:30,12:30) renders identically before and after this change.meeting_timeto'9am'directly in the dev DB. With the fix applied, the Tutorial List page renders normally and shows9amin the malformed row's Time column instead of crashing.shortTime) also does not throw with the malformed row present.15:30afterward.Note: the pre-fix crash itself was reproduced via the standalone script above (same logic, byte-identical to the original
origin/11.0.ximplementation) and confirmed by reading the code path, but was not separately re-demonstrated live in the running app with the fix reverted the live check above was done against the fixed code only.One thing not covered by the automated test: that the malformed row visibly renders inline in the real table in the live app (rather than just that the pure function doesn't throw in isolation) this was checked manually, per above, not via an automated test.
Type of change
Testing Checklist:
Checklist: