Skip to content
Snippets Groups Projects
Commit 5c29c6a4 authored by PavelBegunkov's avatar PavelBegunkov
Browse files

fix

parent 03453e9d
Branches
Tags
No related merge requests found
...@@ -2600,6 +2600,7 @@ CREATE FUNCTION `ClearDiscipline` ( `AuthorID` INT, ...@@ -2600,6 +2600,7 @@ CREATE FUNCTION `ClearDiscipline` ( `AuthorID` INT,
NO SQL NO SQL
BEGIN BEGIN
DECLARE checker boolean; DECLARE checker boolean;
DECLARE vtemp INT;
IF NOT InternalIsTeacherAuthor(AuthorID, DisciplineID) THEN IF NOT InternalIsTeacherAuthor(AuthorID, DisciplineID) THEN
RETURN -1; RETURN -1;
...@@ -2655,12 +2656,11 @@ BEGIN ...@@ -2655,12 +2656,11 @@ BEGIN
END IF; END IF;
SET vtemp = CountRatings(AuthorID, DisciplineID); SET vtemp = CountRatings(AuthorID, DisciplineID);
IF vtemp >= 0 THEN IF vtemp > 0 THEN
RETURN vtemp; RETURN -1;
END IF; END IF;
DELETE FROM `logs_rating` DELETE FROM `logs_rating`
WHERE logs_rating.SubModuleID IN WHERE logs_rating.SubModuleID IN
( (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment