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

Merge remote-tracking branch 'remotes/origin/hotfix/v2.3.10' into develop

parents f3982157 d2787bb8
No related merge requests found
DROP FUNCTION IF EXISTS public.student_changeinfo(pid integer, pexternalid character varying, plastname character varying, pfirstname character varying, psecondname character varying);
CREATE OR REPLACE FUNCTION public.student_changeinfo(pid integer, pexternalid character varying, plastname character varying, pfirstname character varying, psecondname character varying)
RETURNS integer
LANGUAGE plpgsql
AS $function$
DECLARE vAccountID INT DEFAULT -1;
vStudentID INT DEFAULT -1;
begin
-- select public.student_changeinfo(
-- :pid, -- put the pid parameter value instead of 'pid' (int4)
-- :pexternalid, -- put the pexternalid parameter value instead of 'pexternalid' (varchar)
-- :plastname, -- put the plastname parameter value instead of 'plastname' (varchar)
-- :pfirstname, -- put the pfirstname parameter value instead of 'pfirstname' (varchar)
-- :psecondname -- put the psecondname parameter value instead of 'psecondname' (varchar)
--);
SELECT students.AccountID INTO vAccountID
FROM students
WHERE students.ID = pID;
UPDATE accounts
SET ExternalID = COALESCE(pExternalID, ExternalID),
LastName = COALESCE(pLastName, LastName),
FirstName = COALESCE(pFirstName, FirstName),
SecondName = COALESCE(pSecondName, SecondName)
WHERE ID = vAccountID;
RETURN 0;
EXCEPTION
when others then RETURN -1;
END
$function$;
......@@ -71,8 +71,8 @@ $(document).ready(function () {
' <div class="landmarkControl"><input type="text" class="inputCredit inputLandmarkControl" value="0"></div>' +
' <div class="actions">' +
' <div class="deleteSubmodule icon delete"></div>' +
' <div class="moveUp icon down"></div>' +
' <div class="moveDown icon up"></div>' +
' <div class="moveUp icon up"></div>' +
' <div class="moveDown icon down"></div>' +
' </div>' +
'</div>'
)),
......
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