Teaching with Moodle

Plugin API auth with any Service

 
Picture of Dastan Abeuov
Plugin API auth with any Service
 

Moodlers Hello!


There are problems with the plug-in authorizations


I was given the task of developing IP integrations (Univer) with Moodle


I'm from the EC (Uni) received the API fields




 (API contains the following fields (Full name,, post office, city, institute, training direction, country, phone, course, group number, number zachetke, form of training, qualification, name of discipline (Faculty -> specialty -> discipline), role in the disciplines).)




 and gave a flag in his hands Moodle said we do not know here's our fields) and then he rabiraysya


Stage 1


a) Authorization is successful then the update is requested again and again


 ? where the mouse is hiding?




stage 2


b) The remaining fields for synchronization and which lay down gle door open?


below I will put the plugin file


and here's another API c fields




http://univerapi.kaznu.kz/user/login?login=aitmukash.daniyar&password=*******

{ "Code": 0, "message": "Login successful", "serverDate": "\ / Date (1485582833001) \ /", "userId": 157384, "data": { "login": "aitmukash. daniyar "," password ": null," lastLogin ":" \ / Date (1485581924553) \ / "," passChangeDate ":" \ / "," access \ / Date (1,473,137,701,437) ": 4194306," temppass ":" wex5q0ey "," infoTag ": null," _ isCheater ": false," _ userCheater ": null," ip ":" 10.7.0.6 "," loginTime ":" \ / Date (1485582833001) \ / "," id ": 157,384, "name": null, "shortName": null, "nameEx": {}, "shortNameEx": null, "status": 0, "modelName": "User"}, "sessionId": "j2lhgj05z5qm0hbzzdqigdgq"}


 

http://univerapi.kaznu.kz/student/profile/

profile api

{ "Code": 0, "message": "", "serverDate": "\ / Date (1485581968208) \ /", "userId": 157384, "data": { "student": "Aytmұқash DB "}, {" edu_form ":" Full-time "}, {" edu_level ":" The level of training: Scientific and pedagogical direction "}, {" lang_div ":" Department: Kazakh "}, {" stage ":" step training: Master "}, {" faculty ":" Faculty of Mechanics and Mathematics "}, {" speciality ":" Occupation: 6M070400 Computer science and software "}, {" payment_form ":" The form of payment: the state educational grants "}, {" for_lang ":" learning foreign languages: English language "}, {" course_num ":" course number Study: 2 "}, {" enrollment_type ":" Incoming Type: State educational grant "}, {" grant_date "" Date of grant: 24.08.2015 "}, {" grant_num ":" grant Number: None "}, {" contract_date ":" "}, {" contract_num ":" "}, {" no_info ":" "}, {" Specialization ":" Educational program: 6M070402 - Organization and management of computer systems "}, {" the status ":" student status: enrolled "}, {" mark_status ":" Status of study: Unknown "}, {" work_place ":" place of the student: "}, {" address ":" place a student residence: "}, {" privilege ":" Benefits: not needy "}, {" secured ":" Category security: Unk "}] , [{ "sname": "Last name: Aytmұқash"}, { "name": "Name: Daniyar"}, { "fname": "name: Bolatұly"}, { "zachetka": "№ zachetke: 154352"} , { "sex": "Gender: Male"}, "sessionId": null}


 


discipline


http://univerapi.kaznu.kz/student/attestation/2016/1


{ "Code": 0, "message": "", "serverDate": "\ / Date (1485582857141) \ /", "userId": 157384, "data": [{ "subjectName": "Educational", " credit ":" 3 "," resultRK1 ":" 0 "," resultMT ":" 0 "," resultRK2 ":" 0 "," result ":" 97 "," totalRes ":" 97 "," GPA " "4", "symbol": "A", "text": "ex."}, { "subjectName": "information Theory", "credit", "3", "resultRK1": "94", " resultMT ":" 94 "," resultRK2 ":" 97 "," result ":" 90 "," totalRes ":" 94 "," GPA ":" 3,67 "," symbol ":" A- ", "text": "ex."}, { "subjectName": "Designing antivirus protection", "credit": "3", "resultRK1": "93", "resultMT": "93", "resultRK2": "97", "result": "90", "totalRes": "93", "GPA": "3,67", "symbol": "A -", "text": "ex."}, { "subjectName": "Supercomputer modeling and visualization in scientific research", "credit": "3", "resultRK1": "97", "resultMT": "96", "resultRK2": "97", "result": "90", "totalRes": "95", "GPA": "4", "symbol": "A", "text": "ex."}, { "subjectName": "Cloud computing", "credit "," 3 "," resultRK1 ":" 94 "," resultMT ":" 94 "," resultRK2 ":" 97 "," result ":" 90 "," totalRes ":" 94 "," GPA ": "3,67", "symbol": "A -", "text": "ex."}, { "subjectName": "The research work of a student (research seminar III)", "credit": "1" , "resultRK1": "0", "resultMT": "0", "resultRK2": "0", "result": "100", "totalRes": "100", "GPA": "4", " symbol ":" A "," text ":" ex "}, {" credits. ": 16," gpa ": 3.81}, {" course ": 2," semestersCount ": 4}]," sessionId ": null}



THANKS FOR YOUR REPLY

 
Average of ratings: -
Picture of Justin Hunt
Re: Plugin API auth with any Service
Particularly helpful MoodlersPlugin developers

Hi Dastan.

I could not understand your question.

 
Average of ratings: -
Picture of Dastan Abeuov
Re: Plugin API auth with any Service
 

this is my API service. Who is responsible such fields. And I only proshol authorization. But I have yet to synchronize user information. Here I attached the plugin written. Sorry for my anglissky advance.

questions

1 Authorization

2 Synchronization

3 Automatic creation of disciplines

4 Automatically attach a user to rate

 
Average of ratings: -