Skip to content
Snippets Groups Projects
Commit e4200478 authored by Anton Bagliy's avatar Anton Bagliy
Browse files

Merge branch 'hotfix/v2.3.9' into develop

parents 65652876 54bfca67
Branches issue374_selenium_gen
No related merge requests found
DROP FUNCTION IF EXISTS public.deletemodulebonus(pteacherid integer, pdisciplineid integer);
CREATE OR REPLACE FUNCTION public.deletemodulebonus(pteacherid integer, pdisciplineid integer)
RETURNS integer
LANGUAGE plpgsql
AS $function$
DECLARE vBonusModuleID INT DEFAULT -1;
begin
-- select public.deletemodulebonus(
-- :pteacherid, -- put the pteacherid parameter value instead of 'pteacherid' (int4)
-- :pdisciplineid -- put the pdisciplineid parameter value instead of 'pdisciplineid' (int4)
--);
select * from GetBonusModule(pDisciplineID) into vBonusModuleID;
CASE WHEN NOT InternalIsTeacherAuthor(pTeacherID, pDisciplineID) OR
InternalIsMapLocked(pDisciplineID)
THEN
RETURN -1;
else null;
END CASE;
CASE WHEN vBonusModuleID <= 0 THEN
RETURN -1;
else null;
END CASE;
DELETE FROM submodules
WHERE vBonusModuleID = submodules.ModuleID;
DELETE FROM modules
WHERE vBonusModuleID = modules.ID;
--LIMIT 1;
RETURN 0;
END
$function$;
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