Skip to content

Commit 529d3b1

Browse files
committed
Merge branch 'new-main-page-UX' of github.com:ucfopen/UDOIT into InlineCSSADD
2 parents baed7ae + 9db8c02 commit 529d3b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+3355
-643
lines changed

.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
###> symfony/framework-bundle ###
1717
APP_ENV=prod
1818
APP_SECRET=eb2f09f8a21b0b7c57b9fc36eee250eb
19+
20+
# Add your sentry DSN if you want error tracking
21+
SENTRY_DSN=""
22+
1923
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
2024
#TRUSTED_HOSTS='^(localhost|example\.com)$'
2125
###< symfony/framework-bundle ###

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
php-versions: ['8.4']
2222
node-version: [20.19.0]
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525

2626
- name: Log in to the Container registry
2727
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
@@ -35,27 +35,27 @@ jobs:
3535
uses: ASzc/change-string-case-action@v2
3636
with:
3737
string: ${{ github.repository }}
38-
38+
3939
- name: Display repository name
4040
run: echo ${{ steps.case.outputs.lowercase }}
4141

4242
- name: Find-and-replace strings
4343
id: slash
4444
uses: mad9000/actions-find-and-replace-string@2
4545
with:
46-
source: ${{ github.ref_name }}
47-
find: '/'
48-
replace: '-'
46+
source: ${{ github.ref_name }}
47+
find: '/'
48+
replace: '-'
4949

5050
- name: Display issue name
51-
run: echo ${{ steps.slash.outputs.value }}
51+
run: echo ${{ steps.slash.outputs.value }}
5252

5353
- name: Build Image
5454
run: |
5555
cp .env.example .env
5656
docker compose -f docker-compose.nginx.yml build
5757
docker compose -f docker-compose.nginx.yml run composer composer install --no-dev --no-interaction --no-progress --optimize-autoloader
58-
docker compose -f docker-compose.nginx.yml run yarn bash -c 'cd /app && yarn install && yarn build'
58+
docker compose -f docker-compose.nginx.yml run yarn bash -c 'cd /app && yarn install && yarn build'
5959
docker build . -t udoit:latest -f build/nginx/Dockerfile.build
6060
docker tag udoit:latest ${{ env.REGISTRY }}/${{ steps.case.outputs.lowercase }}:${{ steps.slash.outputs.value }}
6161

INSTALL_CANVAS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ We strongly recommend you enforce scopes with your API key. The following scopes
4646
* url:PUT|/api/v1/courses/:id
4747
* url:GET|/api/v1/courses/:id
4848
* url:POST|/api/v1/courses/:course_id/files
49+
* url:GET|/api/v1/courses/:course_id/users
4950
* discussion_topics
5051
* url:GET|/api/v1/courses/:course_id/discussion_topics
5152
* url:PUT|/api/v1/courses/:course_id/discussion_topics/:topic_id
@@ -78,6 +79,10 @@ We strongly recommend you enforce scopes with your API key. The following scopes
7879
* url:GET|/api/v1/courses/:course_id/pages
7980
* url:GET|/api/v1/courses/:course_id/pages/:url_or_id
8081
* url:PUT|/api/v1/courses/:course_id/pages/:url_or_id
82+
83+
* enrollments_api
84+
* url:GET|/api/v1/courses/:course_id/enrollments
85+
*
8186

8287
---
8388
## Create an LTI Developer Key

assets/js/Components/Admin/AdminApp.js

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,29 @@ export default function AdminApp(initialData) {
9292
}, [filters])
9393

9494
const handleCourseUpdate = (courseData) => {
95-
let tempCourses = Object.assign({}, courses)
96-
tempCourses[courseData.id] = courseData
95+
let tempCourses = {...courses}
96+
97+
// If there's an oldId, this is a newly scanned course that needs the old entry removed
98+
if (courseData.oldId && courseData.oldId !== courseData.id) {
99+
// Remove the old unscanned course entry
100+
if (tempCourses[courseData.oldId]) {
101+
delete tempCourses[courseData.oldId]
102+
}
103+
104+
// Add the new scanned course entry
105+
const updatedCourse = {...courseData}
106+
delete updatedCourse.oldId // Remove the signal flag
107+
tempCourses[courseData.id] = updatedCourse
108+
}
109+
// If updating an existing course, just update its data
110+
else if (tempCourses[courseData.id]) {
111+
tempCourses[courseData.id] = {...tempCourses[courseData.id], ...courseData}
112+
}
113+
// If it's a new course, add it
114+
else {
115+
tempCourses[courseData.id] = courseData
116+
}
117+
97118
setCourses(tempCourses)
98119
}
99120

@@ -132,7 +153,7 @@ export default function AdminApp(initialData) {
132153
}
133154

134155
{ !loadingCourses && (
135-
<div className="non-scrollable">
156+
<div className="mt-3">
136157

137158
{('courses' === navigation) &&
138159
<CoursesPage

assets/js/Components/Admin/AdminFilters.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ export default function AdminFilters({
6969
<select
7070
id="inputAccount"
7171
disabled={loadingContent}
72+
value={filters.accountId.toString()}
7273
onChange={(e) => handleAccountSelect(e.target.value)}
7374
>
7475
{accountOptions.map((acct, i) => {
7576
return (
7677
<option
7778
key={`acct-${i}`}
7879
value={acct.id}
79-
selected={filters.accountId.toString() === acct.id.toString()}
80-
>
80+
>
8181
{acct.name}
8282
</option>
8383
)
@@ -93,15 +93,15 @@ export default function AdminFilters({
9393
<select
9494
id="inputTerm"
9595
disabled={loadingContent}
96+
value={filters.accountId.toString()}
9697
onChange={(e) => handleTermSelect(e.target.value)}
9798
>
9899
{termOptions.map((term, i) => {
99100
return (
100101
<option
101102
key={`term-${i}`}
102103
value={term.id}
103-
selected={filters.termId.toString() === term.id.toString()}
104-
>
104+
>
105105
{term.name}
106106
</option>
107107
)

0 commit comments

Comments
 (0)