diff --git a/db/postgresql/hotfix2.3.10.sql b/db/postgresql/hotfix2.3.10.sql new file mode 100644 index 0000000000000000000000000000000000000000..4789f564e8457213932dd23f0b421e7b4d4101d3 --- /dev/null +++ b/db/postgresql/hotfix2.3.10.sql @@ -0,0 +1,31 @@ +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$; diff --git a/media/js/discipline/editStructure.js b/media/js/discipline/editStructure.js index 4e7c039ff93ed7909a1e7694fe7d177cc05152ab..b84aa266e270756da86c34443e624ed4cc7cfb13 100644 --- a/media/js/discipline/editStructure.js +++ b/media/js/discipline/editStructure.js @@ -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>' )),