diff --git a/client/src/components/Pages/StatisticsPage.vue b/client/src/components/Pages/StatisticsPage.vue index 4205add..4ebfcd1 100644 --- a/client/src/components/Pages/StatisticsPage.vue +++ b/client/src/components/Pages/StatisticsPage.vue @@ -187,6 +187,7 @@ export default { this.FIO = ''; this.email = ''; this.course = ''; + this.url = ''; this.actionType = ''; this.eventType = ''; this.elementType = ''; @@ -205,6 +206,7 @@ export default { student_name: this.FIO, student_email: this.email, course_title: this.course, + url: this.url, action_type: this.actionType, event_type: this.eventType, element_type: this.elementType, @@ -241,6 +243,7 @@ export default { let firstLayer = { FIO: element.student, course: element.course, + url: element.url, studentId: element.student_id, email: element.email }; diff --git a/client/src/components/Tables/StatisticsTable.vue b/client/src/components/Tables/StatisticsTable.vue index b4a1708..27302d7 100644 --- a/client/src/components/Tables/StatisticsTable.vue +++ b/client/src/components/Tables/StatisticsTable.vue @@ -39,6 +39,7 @@ export default { { title: "Дата", key: "date", sortable: false, align: "center" }, { title: "Время", key: "time", sortable: false, align: "center" }, { title: "Название курса", key: "course", sortable: false, align: "center"}, + { title: "URL-адрес", key: "url", sortable: false, align: "center"}, { title: "Тип действия", key: "typeAction", sortable: false, align: "center" }, { title: "Тип события", key: "eventType", sortable: false, align: "center" }, { title: "Тип элемента", key: "elementType", sortable: false, align: "center" }, diff --git a/init-mongo.js b/init-mongo.js index cfd9172..bc9ac91 100644 --- a/init-mongo.js +++ b/init-mongo.js @@ -48,6 +48,7 @@ if (process.env.TEST_RUN == 'true'){ "session_id": ObjectId("6648756f964c1253e72202db"), "email": "diana@mail.ru", "course": "Курс молодого бойца", + "url": "https://e.moevm.info/course/view.php?id=2" "actions": [ { "timestamp": new Date("2024-02-02T14:00:00"), @@ -65,6 +66,7 @@ if (process.env.TEST_RUN == 'true'){ "email": "daniil@mail.ru", "session_id": ObjectId("6648756f964c1253e72202dc"), "course": "Курс молодого бойца", + "url": "https://e.moevm.info/course/view.php?id=2" "actions": [ { "timestamp": new Date("2024-02-02T14:00:00"), diff --git a/server/src/models/session_data.py b/server/src/models/session_data.py index b307855..3cef9c7 100644 --- a/server/src/models/session_data.py +++ b/server/src/models/session_data.py @@ -52,6 +52,7 @@ class SessionData(BaseModel): student: str = Field(...) email: EmailStr = Field(...) course: str = Field(...) + url: str = Field(...) actions: List[Payload] = Field(default_factory=list) class Config: @@ -66,6 +67,7 @@ class Config: "student": "Иванов Иван", "email": "iiivanov@edu.ru", "course": "Курс молодого бойца", + "url": "https://e.moevm.info/course/view.php?id=2", "actions": [{ "timestamp": datetime.now().isoformat(), "element_type": "button", @@ -82,6 +84,7 @@ class Config: "student": "Иванов Иван", "email": "iiivanov@edu.ru", "course": "Курс молодого бойца", + "url": "https://e.moevm.info/course/view.php?id=2", "actions": [{ "timestamp": datetime.now().isoformat(), "element_type": "button", @@ -98,6 +101,7 @@ class Config: "session_id": str(uuid.uuid4()), "email": "iiivanov@edu.ru", "course": "Курс молодого бойца", + "url": "https://e.moevm.info/course/view.php?id=2", "actions": [{ "timestamp": datetime.now().isoformat(), "element_type": "page", @@ -117,6 +121,7 @@ class CreateSessionData(BaseModel): student: str = Field(...) email: EmailStr = Field(...) course: str = Field(...) + url: str = Field(...) actions: List[Payload] = Field(default_factory=list) class Config: @@ -130,6 +135,7 @@ class Config: "student": "Иванов Иван", "email": "iiivanov@edu.ru", "course": "Курс молодого бойца", + "url": "https://e.moevm.info/course/view.php?id=2", "actions": [{ "timestamp": datetime.now().isoformat(), "element_type": "button", @@ -145,6 +151,7 @@ class Config: "student": "Иванов Иван", "email": "iiivanov@edu.ru", "course": "Курс молодого бойца", + "url": "https://e.moevm.info/course/view.php?id=2", "actions": [{ "timestamp": datetime.now().isoformat(), "element_type": "page", @@ -160,6 +167,7 @@ class Config: "student": "Иванов Иван", "email": "iiivanov@edu.ru", "course": "Курс молодого бойца", + "url": "https://e.moevm.info/course/view.php?id=2", "actions": [{ "timestamp": datetime.now().isoformat(), "element_type": "page", diff --git a/stat_tracker/moodle_stat_tracker.html b/stat_tracker/moodle_stat_tracker.html index 4cd98c0..5b42728 100644 --- a/stat_tracker/moodle_stat_tracker.html +++ b/stat_tracker/moodle_stat_tracker.html @@ -4,6 +4,7 @@ let courseName let userName let trackingEntity + let cur_url = window.location.href let mousewheelCounter = 0 healthCheck(3) @@ -245,6 +246,7 @@ email: interactor.email, student_id: userID, course: courseName, + url: cur_url, actions: interactor.records, session_id: interactor.pageId }