Lecture Verification Contract
Lecture Verification Contract
0;
contract MilitaryLectureVerification {
struct Lecture {
string title;
uint256 duration; // Thời lượng bài giảng (giây)
uint256 requiredWatchTime; // Thời gian tối thiểu phải xem
mapping(address => LectureProgress) studentProgress;
}
struct LectureProgress {
uint256 totalWatchTime;
uint256 startTime;
bool completed;
}
function uploadLecture(
string memory _title,
uint256 _duration,
uint256 _requiredWatchTime
) public {
lectureCounter++;
Lecture storage newLecture = lectures[lectureCounter];
newLecture.title = _title;
newLecture.duration = _duration;
newLecture.requiredWatchTime = _requiredWatchTime;
}
progress.totalWatchTime = _watchTime;