-
Notifications
You must be signed in to change notification settings - Fork 4
unique urls for courseId #852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
|
||
| <Tooltip title={t.studyBuddy}> | ||
| <Link href={`/study-buddy/${courseId}`} passHref> | ||
| <Link href={`/${course.universityId || 'FAU'}/${courseId}/latest/study-buddy`} passHref> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create functions in packages/utils/src/lib/utils.ts like pathToStudyBuddy...
| } | ||
|
|
||
| export async function getLatestInstance(institutionId: string): Promise<string> { | ||
| const response = await axios.get(`/api/get-latest-instance/${institutionId}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If latest instance is per courseId, how will be handle courses which were taught in the previous semester (e.g 'ai-2').
will this link work? https://alea.education/FAU/ai-2/latest
| useEffect(() => { | ||
| getAllCourses().then(() => {}); | ||
| }, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unused?
|
|
||
| setInstitutionValidated(true); | ||
|
|
||
| getAllCourses().then((allCourses) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we making this API call on each page navigation?
| const [validationError, setValidationError] = useState<string | null>(null); | ||
| const [isValidating, setIsValidating] = useState(true); | ||
|
|
||
| // FIX: Fixed infinite reload loop by: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this AI generated commentary?
| institutionValidated: boolean; | ||
| } | ||
|
|
||
| export function useRouteValidation(routePath: string): RouteValidationResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can simply get the list of valid courses (along with institutions) in a single API call during application initialization. All this seems complicated and inefficient (in terms of number of API calls)
* datetime to timestamp for applicationDeadline and using epoch ms for consistency across different timezones * minor sql bug * admin documentation
...this is a hack. Need to figure out the right way to do it
+slide fixes based on dennis suggestion: ``` you can replace the rustex-body hack by the following css attributes, for your desired value of "600": --rustex-curr-width:600px; --rustex-this-width:600px; max-width: 630px; padding-right:30px; ```
* uncommented deletion and updation calls
No description provided.