Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions client/src/components/Pages/StatisticsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ export default {
this.FIO = '';
this.email = '';
this.course = '';
this.url = '';
this.actionType = '';
this.eventType = '';
this.elementType = '';
Expand All @@ -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,
Expand Down Expand Up @@ -241,6 +243,7 @@ export default {
let firstLayer = {
FIO: element.student,
course: element.course,
url: element.url,
studentId: element.student_id,
email: element.email
};
Expand Down
1 change: 1 addition & 0 deletions client/src/components/Tables/StatisticsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down
2 changes: 2 additions & 0 deletions init-mongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ if (process.env.TEST_RUN == 'true'){
"session_id": ObjectId("6648756f964c1253e72202db"),
"email": "[email protected]",
"course": "Курс молодого бойца",
"url": "https://e.moevm.info/course/view.php?id=2"
"actions": [
{
"timestamp": new Date("2024-02-02T14:00:00"),
Expand All @@ -65,6 +66,7 @@ if (process.env.TEST_RUN == 'true'){
"email": "[email protected]",
"session_id": ObjectId("6648756f964c1253e72202dc"),
"course": "Курс молодого бойца",
"url": "https://e.moevm.info/course/view.php?id=2"
"actions": [
{
"timestamp": new Date("2024-02-02T14:00:00"),
Expand Down
8 changes: 8 additions & 0 deletions server/src/models/session_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -66,6 +67,7 @@ class Config:
"student": "Иванов Иван",
"email": "[email protected]",
"course": "Курс молодого бойца",
"url": "https://e.moevm.info/course/view.php?id=2",
"actions": [{
"timestamp": datetime.now().isoformat(),
"element_type": "button",
Expand All @@ -82,6 +84,7 @@ class Config:
"student": "Иванов Иван",
"email": "[email protected]",
"course": "Курс молодого бойца",
"url": "https://e.moevm.info/course/view.php?id=2",
"actions": [{
"timestamp": datetime.now().isoformat(),
"element_type": "button",
Expand All @@ -98,6 +101,7 @@ class Config:
"session_id": str(uuid.uuid4()),
"email": "[email protected]",
"course": "Курс молодого бойца",
"url": "https://e.moevm.info/course/view.php?id=2",
"actions": [{
"timestamp": datetime.now().isoformat(),
"element_type": "page",
Expand All @@ -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:
Expand All @@ -130,6 +135,7 @@ class Config:
"student": "Иванов Иван",
"email": "[email protected]",
"course": "Курс молодого бойца",
"url": "https://e.moevm.info/course/view.php?id=2",
"actions": [{
"timestamp": datetime.now().isoformat(),
"element_type": "button",
Expand All @@ -145,6 +151,7 @@ class Config:
"student": "Иванов Иван",
"email": "[email protected]",
"course": "Курс молодого бойца",
"url": "https://e.moevm.info/course/view.php?id=2",
"actions": [{
"timestamp": datetime.now().isoformat(),
"element_type": "page",
Expand All @@ -160,6 +167,7 @@ class Config:
"student": "Иванов Иван",
"email": "[email protected]",
"course": "Курс молодого бойца",
"url": "https://e.moevm.info/course/view.php?id=2",
"actions": [{
"timestamp": datetime.now().isoformat(),
"element_type": "page",
Expand Down
2 changes: 2 additions & 0 deletions stat_tracker/moodle_stat_tracker.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
let courseName
let userName
let trackingEntity
let cur_url = window.location.href
let mousewheelCounter = 0

healthCheck(3)
Expand Down Expand Up @@ -245,6 +246,7 @@
email: interactor.email,
student_id: userID,
course: courseName,
url: cur_url,
actions: interactor.records,
session_id: interactor.pageId
}
Expand Down
Loading