;
export interface JobApplicationInfo {
id: number;
@@ -155,4 +160,4 @@ export interface UpdateJobApplicationRequest {
id: number;
action: ApplicationAction;
message?: string;
-}
\ No newline at end of file
+}
diff --git a/spec/src/lib/next-api.ts b/spec/src/lib/next-api.ts
index 1a1d45fd9..e3d9fc0ae 100644
--- a/spec/src/lib/next-api.ts
+++ b/spec/src/lib/next-api.ts
@@ -114,4 +114,4 @@ export async function getSlideDetails(courseId: string, clipId: string) {
`${BASE_SLIDES_DATA_URL}/api/get-slide-details/${courseId}/${clipId}`
);
return resp.data as { [timestampSec: number]: ClipMetadata };
-}
+}
\ No newline at end of file
diff --git a/spec/src/lib/problem-api.ts b/spec/src/lib/problem-api.ts
index 784c23873..77673e5be 100644
--- a/spec/src/lib/problem-api.ts
+++ b/spec/src/lib/problem-api.ts
@@ -1,9 +1,21 @@
import axios from 'axios';
+export interface ExamRef {
+ examUri: string;
+ examLabel: string;
+}
+
+export interface QuizRef {
+ quizUri: string;
+ quizLabel: string;
+}
+
export interface ProblemData {
problemId: string;
category: string;
labels: string[];
+ examRefs?: ExamRef[];
+ quizRefs?: QuizRef[];
showForeignLanguageNotice?: boolean;
matchedLanguage?: string;
outOfSyllabusConcepts?: string[];
diff --git a/spec/src/lib/video-matching.ts b/spec/src/lib/video-matching.ts
new file mode 100644
index 000000000..0ec6d61b6
--- /dev/null
+++ b/spec/src/lib/video-matching.ts
@@ -0,0 +1,51 @@
+import axios from 'axios';
+
+export interface MatchedSlide {
+ timestamp: string;
+ ocr_text: string;
+ start_time: number;
+ end_time: number;
+ slide_matched: {
+ sectionId: string;
+ sectionTitle: string;
+ slideUri: string;
+ slideContent: string;
+ };
+}
+
+export interface UnmatchedSlide {
+ timestamp: string;
+ ocr_text: string;
+ start_time: number;
+ end_time: number;
+}
+
+export interface VideoStats {
+ total: number;
+ matched: number;
+ unmatched: number;
+ match_percent: number;
+}
+
+export interface VideoData {
+ matched: MatchedSlide[];
+ unmatched: UnmatchedSlide[];
+ stats: VideoStats;
+}
+
+export interface CourseData {
+ subject: string;
+ semester: string;
+ videos: {
+ [videoId: string]: VideoData;
+ };
+}
+
+export interface MatchReportData {
+ [courseKey: string]: CourseData;
+}
+
+export async function getVideoMatchingData() {
+ const resp = await axios.get(`/api/get-video-matching`);
+ return resp.data as MatchReportData;
+}
\ No newline at end of file
diff --git a/sql/add_livestreamurl_to_coursemetadata.sql b/sql/add_livestreamurl_to_coursemetadata.sql
new file mode 100644
index 000000000..f2b56d34a
--- /dev/null
+++ b/sql/add_livestreamurl_to_coursemetadata.sql
@@ -0,0 +1,2 @@
+-- Add livestreamUrl column to courseMetadata for livestream link
+ALTER TABLE courseMetadata ADD COLUMN livestreamUrl VARCHAR(2048) NULL AFTER teaser;
diff --git a/sql/comments_database_setup.sql b/sql/comments_database_setup.sql
index f0188b199..67424894b 100644
--- a/sql/comments_database_setup.sql
+++ b/sql/comments_database_setup.sql
@@ -283,12 +283,12 @@ CREATE TABLE studentProfile (
resumeUrl VARCHAR(2083),
email VARCHAR(255) NOT NULL,
mobile VARCHAR(15),
- programme VARCHAR(255) NOT NULL,
- yearOfAdmission YEAR NOT NULL,
- yearOfGraduation YEAR,
+ programme VARCHAR(255),
+ yearOfAdmission VARCHAR(50) ,
+ yearOfGraduation VARCHAR(50),
courses TEXT,
about TEXT,
- gpa FLOAT,
+ gpa VARCHAR(50),
location VARCHAR(100),
altMobile VARCHAR(15),
socialLinks JSON,
@@ -301,7 +301,7 @@ CREATE TABLE organizationProfile (
id INT AUTO_INCREMENT PRIMARY KEY,
companyName VARCHAR(255) ,
domain VARCHAR(255) ,
- incorporationYear YEAR ,
+ incorporationYear VARCHAR(50) ,
isStartup BOOLEAN,
website VARCHAR(255),
about TEXT,
@@ -356,11 +356,11 @@ CREATE TABLE jobPost (
jobDescription TEXT,
workLocation VARCHAR(255),
qualification VARCHAR(255),
- targetYears VARCHAR(255),
+ graduationYears VARCHAR(255),
openPositions INT,
compensation JSON,
facilities TEXT,
- applicationDeadline DATETIME,
+ applicationDeadline TIMESTAMP,
workMode VARCHAR(50),
createdByUserId VARCHAR(50),
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
@@ -370,7 +370,6 @@ CREATE TABLE jobPost (
FOREIGN KEY (createdByUserId) REFERENCES userInfo(userId)
);
-
CREATE TABLE jobApplication (
id INT AUTO_INCREMENT PRIMARY KEY,
jobPostId INT NOT NULL,
@@ -425,7 +424,7 @@ CREATE TABLE orgInvitations (
organizationId int NOT NULL,
inviteeEmail VARCHAR(255) NOT NULL,
inviteruserId CHAR(36) NOT NULL,
- created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
+ createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (organizationId) REFERENCES organizationProfile(id) ON DELETE CASCADE
);
@@ -483,13 +482,59 @@ CREATE TABLE courseMetadata (
landing VARCHAR(255) NOT NULL,
slides VARCHAR(255) NOT NULL,
teaser TEXT,
+ livestreamUrl VARCHAR(2048) NULL,
instructors JSON NOT NULL,
PRIMARY KEY (courseId, instanceId)
);
-
+CREATE TABLE CourseMaterials (
+ id VARCHAR(36) PRIMARY KEY,
+ materialName VARCHAR(255) NOT NULL,
+ materialType ENUM('FILE', 'LINK') NOT NULL,
+ storageFileName TEXT,
+ mimeType VARCHAR(100),
+ sizeBytes BIGINT,
+ universityId VARCHAR(100) NOT NULL,
+ courseId VARCHAR(100) NOT NULL,
+ instanceId VARCHAR(100) NOT NULL,
+ uploadedBy VARCHAR(100) NOT NULL,
+ url TEXT,
+ checksum VARCHAR(64),
+ createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+ updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
+);
CREATE TABLE CrossDomainAuthTokens (
otpToken VARCHAR(255) PRIMARY KEY,
jwtToken TEXT NOT NULL,
createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
used BOOLEAN DEFAULT FALSE
);
+
+CREATE TABLE CheatSheet (
+ cheatsheetId VARCHAR(50) PRIMARY KEY,
+ userId VARCHAR(255) NOT NULL,
+ studentName VARCHAR(255),
+ universityId VARCHAR(255) NOT NULL,
+ courseId VARCHAR(255) NOT NULL,
+ instanceId VARCHAR(255) NOT NULL,
+ weekId VARCHAR(255) NOT NULL,
+ checksum VARCHAR(255),
+ fileName VARCHAR(255),
+ uploadedVersionNumber INT,
+ uploadedByUserId VARCHAR(255),
+ uploadedAt TIMESTAMP, -- this is the scanned cheatsheet's upload time
+ createdAt TIMESTAMP, --only for first download of empty cheatsheet
+ updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- for every update
+);
+
+CREATE TABLE CheatSheetHistory (
+ id INT AUTO_INCREMENT PRIMARY KEY,
+ cheatsheetId VARCHAR(50) NOT NULL,
+ uploadedVersionNumber INT NOT NULL,
+ uploadedByUserId VARCHAR(255) NOT NULL,
+ checksum VARCHAR(255),
+ fileName VARCHAR(255),
+ uploadedAt TIMESTAMP, -- this is the scanned cheatsheet's upload time
+ createdAt TIMESTAMP, --only for first download of empty cheatsheet
+ updatedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- for every update
+ FOREIGN KEY (cheatsheetId) REFERENCES CheatSheet(cheatsheetId) ON DELETE CASCADE
+);
diff --git a/sql/temp_coursemetadata.sql b/sql/temp_coursemetadata.sql
new file mode 100644
index 000000000..2ab1a42db
--- /dev/null
+++ b/sql/temp_coursemetadata.sql
@@ -0,0 +1,183 @@
+INSERT INTO courseMetadata (
+ courseId,
+ instanceId,
+ lectureSchedule,
+ tutorialSchedule,
+ seriesId,
+ hasHomework,
+ hasQuiz,
+ updaterId,
+ createdAt,
+ updatedAt,
+ universityId,
+ courseName,
+ notes,
+ landing,
+ slides,
+ teaser,
+ instructors
+) VALUES
+-- ai-1
+('ai-1','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','FAU',
+ 'Artificial Intelligence I',
+ 'https://mathhub.info?a=courses/FAU/AI/course&p=course/notes&d=notes1&l=en',
+ 'https://mathhub.info?a=courses/FAU/AI/course&p=course/notes&d=coursepage1&l=en',
+ 'https://mathhub.info?a=courses/FAU/AI/course&p=course/notes&d=slides1&l=en',
+ 'A classical course on symbolic artificial intelligence covering the whole range of methods from search-based problem solving, via constraint propagation and logical/formal methods to planning.',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- ai-2
+('ai-2','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','FAU',
+ 'Artificial Intelligence II',
+ 'https://mathhub.info?a=courses/FAU/AI/course&p=course/notes&d=notes2&l=en',
+ 'https://mathhub.info?a=courses/FAU/AI/course&p=course/notes&d=coursepage2&l=en',
+ 'https://mathhub.info?a=courses/FAU/AI/course&p=course/notes&d=slides2&l=en',
+ 'A classical course on statistical and subsymbolic AI...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- gdp
+('gdp','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','FAU',
+ 'Grundlagen der Programmierung',
+ 'https://stexmmt.mathhub.info/:sTeX?a=courses/FAU/GDP/course&p=course/notes&d=notes&l=en',
+ 'https://stexmmt.mathhub.info/:sTeX?a=courses/FAU/GDP/course&p=course/notes&d=coursepage&l=en',
+ 'https://stexmmt.mathhub.info/:sTeX?a=courses/FAU/GDP/course&p=course/notes&d=slides&l=en',
+ NULL,
+ JSON_ARRAY('Vanessa Klein')
+),
+
+-- iwgs-1
+('iwgs-1','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','FAU',
+ 'Informatische Werkzeuge für die Geistes- und Sozialwissenschaften I',
+ 'https://mathhub.info?a=courses/FAU/IWGS/course&p=course/notes&d=notes-part1&l=en',
+ 'https://mathhub.info?a=courses/FAU/IWGS/course&p=course/notes&d=coursepage1&l=en',
+ 'https://mathhub.info?a=courses/FAU/IWGS/course&p=course/notes&d=slides-part1&l=en',
+ 'This course introduces computational tools for humanities...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- iwgs-2
+('iwgs-2','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','FAU',
+ 'Informatische Werkzeuge für die Geistes- und Sozialwissenschaften II',
+ 'https://mathhub.info?a=courses/FAU/IWGS/course&p=course/notes&d=notes-part2&l=en',
+ 'https://mathhub.info?a=courses/FAU/IWGS/course&p=course/notes&d=coursepage2&l=en',
+ 'https://mathhub.info?a=courses/FAU/IWGS/course&p=course/notes&d=slides-part2&l=en',
+ 'This course continues the introduction...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- krmt
+('krmt','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','FAU',
+ 'Knowledge Representation of Mathematical Theories',
+ 'https://mathhub.info?a=courses/FAU/KRMT/course&p=dennis/course&d=notes&l=en',
+ 'https://mathhub.info?a=courses/FAU/KRMT/course&p=dennis/course&d=coursepage&l=en',
+ 'https://mathhub.info?a=courses/FAU/KRMT/course&p=dennis/course&d=slides&l=en',
+ 'This repository contains the sources...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- lbs
+('lbs','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','FAU',
+ 'Logic-Based Natural Language Semantics',
+ 'https://mathhub.info?a=courses/FAU/LBS/course&p=course/notes&d=notes&l=en',
+ 'https://mathhub.info?a=courses/FAU/LBS/course&p=course/notes&d=coursepage&l=en',
+ 'https://mathhub.info?a=courses/FAU/LBS/course&p=course/notes&d=slides&l=en',
+ 'This course covers the construction of logic-based models...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- smai
+('smai','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','FAU',
+ 'Symbolic Methods for Artificial Intelligence',
+ 'https://mathhub.info?a=courses/FAU/SMAI/course&p=course/notes&d=notes&l=en',
+ 'https://mathhub.info?a=courses/FAU/SMAI/course&p=course/notes&d=coursepage&l=en',
+ 'https://mathhub.info?a=courses/FAU/SMAI/course&p=course/notes&d=slides&l=en',
+ 'This course introduces the scientific methods used in symbolic AI...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- acs
+('acs','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','Jacobs',
+ 'Advanced Computer Science (Fragment)',
+ 'https://stexmmt.mathhub.info/:sTeX?a=courses/Jacobs/ACS/course&p=course/notes&d=notes&l=en',
+ 'https://stexmmt.mathhub.info/:sTeX?a=courses/Jacobs/ACS/course&p=course/notes&d=coursepage&l=en',
+ 'https://stexmmt.mathhub.info/:sTeX?a=courses/Jacobs/ACS/course&p=course/notes&d=slides&l=en',
+ NULL,
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- comsem
+('comsem','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','Jacobs',
+ 'Computational Semantics of Natural Language',
+ 'https://mathhub.info?a=courses/Jacobs/ComSem&p=course/notes&d=notes&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/ComSem&p=course/notes&d=coursepage&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/ComSem&p=course/notes&d=slides&l=en',
+ '
This repository contains the sources...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- complog
+('complog','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','Jacobs',
+ 'Computational Logic',
+ 'https://mathhub.info?a=courses/Jacobs/CompLog&p=course/notes&d=notes&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/CompLog&p=course/notes&d=coursepage&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/CompLog&p=course/notes&d=slides&l=en',
+ '
This repository contains the sources...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- gencs i
+('gencs i','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','Jacobs',
+ 'General Computer Science I',
+ 'https://mathhub.info?a=courses/Jacobs/GenCS/course&p=course/notes&d=notes1&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/GenCS/course&p=course/notes&d=coursepage1&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/GenCS/course&p=course/notes&d=slides1&l=en',
+ '
This repository contains the sources...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- gencs ii
+('gencs ii','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','Jacobs',
+ 'General Computer Science II',
+ 'https://mathhub.info?a=courses/Jacobs/GenCS/course&p=course/notes&d=notes2&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/GenCS/course&p=course/notes&d=coursepage2&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/GenCS/course&p=course/notes&d=slides2&l=en',
+ '
This repository contains the sources...',
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- genict
+('genict','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','Jacobs',
+ 'General Information and Communication Technology',
+ 'https://mathhub.info?a=courses/Jacobs/GenICT/course&p=course/notes&d=notes&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/GenICT/course&p=course/notes&d=coursepage&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/GenICT/course&p=course/notes&d=slides&l=en',
+ NULL,
+ JSON_ARRAY('Michael Kohlhase')
+),
+
+-- tdm
+('tdm','legacy',JSON_ARRAY(),JSON_ARRAY(),NULL,FALSE,FALSE,NULL,
+ '2021-01-01 00:00:00','2021-01-01 00:00:00','Jacobs',
+ 'Text and Digital Media',
+ 'https://mathhub.info?a=courses/Jacobs/TDM/course&p=course/notes&d=notes&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/TDM/course&p=course/notes&d=coursepage&l=en',
+ 'https://mathhub.info?a=courses/Jacobs/TDM/course&p=course/notes&d=slides&l=en',
+ '
This repository contains the sources...',
+ JSON_ARRAY('Michael Kohlhase')
+);
diff --git a/update-and-build.sh b/update-and-build.sh
index c83881be2..84a22357e 100755
--- a/update-and-build.sh
+++ b/update-and-build.sh
@@ -3,4 +3,5 @@ set -e
git pull
NX_DAEMON=false npx nx reset
+NX_DAEMON=false npx prisma generate --schema=prisma/comments/schema.prisma
NX_DAEMON=false npx nx build alea-frontend --outputPath=dist/packages/alea-frontend-new