Skip to content
Snippets Groups Projects
Commit 30e6571b authored by PavelBegunkov's avatar PavelBegunkov
Browse files

name fixes

parent fa53ef5a
Branches
Tags
No related merge requests found
......@@ -2850,20 +2850,16 @@ END //
DROP FUNCTION IF EXISTS OverSession//
CREATE FUNCTION `OverSession` ( `TeacherID` INT,
`DisciplineID` INT
) RETURNS int(11)
DROP FUNCTION IF EXISTS RestrictAfterMilestone//
CREATE FUNCTION `RestrictAfterMilestone` ( `TeacherID` INT,
`DisciplineID` INT
) RETURNS int(11)
NO SQL
BEGIN
IF NOT InternalIsTeacherAuthor(TeacherID,DisciplineID)
THEN
RETURN -1;
END IF;
UPDATE `disciplines`
SET disciplines.OverDate = CURDATE(),
disciplines.isOver = 1
SET disciplines.MilestoneDate = CURDATE(),
disciplines.isMilestone = 1
WHERE disciplines.ID = DisciplineID
LIMIT 1;
......@@ -2872,8 +2868,9 @@ END //
DROP FUNCTION IF EXISTS OverSessionAllCredit//
CREATE FUNCTION `OverSessionAllCredit` ( ) RETURNS int(11)
DROP FUNCTION IF EXISTS SetMilestoneForCredits//
CREATE FUNCTION `RestrictAfterMilestoneForCredits` ( `TeacherID` INT
) RETURNS int(11)
NO SQL
BEGIN
DECLARE semID INT;
......@@ -2881,8 +2878,8 @@ BEGIN
SET semID = GetCurSemesterID();
UPDATE `disciplines`
SET disciplines.OverDate = CURDATE(),
disciplines.isOver = 1
SET disciplines.MilestoneDate = CURDATE(),
disciplines.isMilestone = 1
WHERE disciplines.SemesterID = semID AND
disciplines.ExamType = 'credit';
......@@ -3624,7 +3621,7 @@ BEGIN
SET mtype = -1;
SELECT modules.DisciplineID,
disciplines.isLocked,
disciplines.isOver,
disciplines.isMilestone,
rating_table.StudentID,
submodules.isUsed,
submodules.MaxRate,
......
ALTER TABLE `disciplines`
ADD `isOver` tinyint(1) NOT NULL DEFAULT '0',
ADD `OverDate` DATE NULL DEFAULT NULL;
ADD `isMilestone` int(11) NOT NULL DEFAULT '0',
ADD `MilestoneDate` DATE NULL DEFAULT NULL;
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment