Commit Graph

72 Commits

Author SHA1 Message Date
jacob
e7fac7406f Some user data that was expected in the session was not getting updated
on the user load.  Fixed.
2011-03-02 15:57:38 +00:00
james
5dba209aae Fix json_decode, we need the second parameter to specify an assoc array instead of an object 2011-03-02 14:26:18 +00:00
james
d6efd6749e Tweak the docs 2011-03-01 20:09:33 +00:00
jacob
e10d31f2c8 Updated the api for api/project/mentor/add and api/project/mentor/edit. Both now accept an array of
mentor arrays (now referred to as 'mentors' instead of 'mentor').  /edit will only accept an array,
but /add will accept that or no parameters to generate a fresh empty record.
2011-03-01 19:57:05 +00:00
james
69bc561055 allow project/add and project/mentor/add to pass in an corresponding input array, and save that into the newly created project/mentor 2011-02-28 19:00:24 +00:00
jacob
d10d5f3835 Quick fixes:
1) desk and outlet information no longer required when saving a project if they're not required in the config
 2) Updated the project/save api to have consistent return value with other api functions
2011-02-25 16:19:15 +00:00
jacob
2ec08b64d9 Adding additional student fields to the users table
Added name confirmation to the api in api/user/displayname/get and pi/user/displayname/confirm
2011-02-24 17:44:12 +00:00
jacob
19676aa403 Modified the authentication api to store project registration id and registration number in the session.
Updated the project api's to use project id/number stored in the session
2011-02-23 21:12:12 +00:00
james
0320f662dd remove the student table from the register_participants_signature auth
add 'participant' to the auth requirement for projects in the API
2011-02-23 19:30:50 +00:00
james
79baaa37b6 Make password optional for create account (it'll pick a random one if not specified) 2011-02-23 16:42:08 +00:00
james
8d7eb7ca72 add api/project/signatureform API 2011-02-21 22:07:06 +00:00
jacob
f22dfb3c93 Added project mentor management to the api, and functions for testing it 2011-02-21 19:42:13 +00:00
jacob
64ef61d88f Added api functionality for disconnecting a user from a registration : api/project/remove 2011-02-18 21:53:07 +00:00
jacob
f785a71be2 Oops - removed debug output from the project/new api.
Updated getProject to take userId as a parameter, rather than the registration number.
2011-02-18 20:48:56 +00:00
jacob
40e139b7a1 Fix for logical error in how I connected users to registrations. Had the wrong ID field connecting them. 2011-02-18 20:25:47 +00:00
jacob
e6dfe1c476 Added joinProject function in register_participants.inc.php, and added the api for it at /api/project/join 2011-02-18 19:19:56 +00:00
jacob
c1d248dbd3 Added the soulmate for a lonely opening brace. 2011-02-18 17:12:32 +00:00
james
96f36d4681 Implement project\/view 2011-02-18 16:56:35 +00:00
jacob
340a45127b Added code preventing users from creating more than one registration/project 2011-02-18 16:46:44 +00:00
james
3c0151263f Convert project/edit to pass a 'project' object as JSON instead of individual fields 2011-02-18 16:37:11 +00:00
jacob
ef4a14a386 modified the project/add API to not expect any data, but simply create the project. 2011-02-18 16:14:23 +00:00
jacob
3745d8cfd9 Added api functionality for creating and saving projects 2011-02-17 22:04:47 +00:00
james
e0f0a5dd90 Re-do user_invite to allow users to be invited by admin/config's - its not complete, but its working, it still needs to send emails though to tell the user of their new role, but i need to think on how to do that because if its a new account then it could be just a username/password without an email, but if its invited then the email __IS__ the username, but we shouldnt rely on the email being valid until its been confirmed via the email confirmation.. ugh?!?! 2010-12-21 23:16:20 +00:00
james
459eb17e98 Add a hidden config option (put it in data/config.inc.php) to not require API access over SSL 2010-12-08 21:18:07 +00:00
jacob
77a3c77e69 oops - forgot to remove debugging remarks 2010-12-02 17:54:01 +00:00
jacob
dfd468505c Modified the api loging for better readability and to include the output 2010-12-02 17:50:16 +00:00
jacob
128fc6a3b5 Added logging to the API, and separated the log file creation into a common function 2010-12-02 17:25:23 +00:00
jacob
6b94ef5c76 Added abillity to uninvite a user from a particular role where allowed, and api function (/user/uninvite)
Added function user_list_modifiable, which returns a list of user info that the current user is allowed to modify (users.inc.php)
Added api for calling user_list_modifiable (/user/list)
2010-12-01 19:40:45 +00:00
jacob
39f53e4168 Added teacher abillity to add/remove students
Updated the user_save to output more meaningful errors
Updates on 'questions' and 'pagetext' tables to change the 0 conference ID to -1, matching the -1 year
2010-11-29 22:54:12 +00:00
james
57561c829d Add copyoriginal and copyparent to API 2010-11-25 20:47:32 +00:00
james
46b39f81e0 Add copyoriginal, copyparent, and notes(currently unused) to conferences table
Add code in create conference and copy conference to set copyoriginal and copyparent
Add missing json_decode to API (we expect ALL arrays being POSTED to be json encoded)
2010-11-25 20:45:44 +00:00
jacob
e9f46edb0e Added code for inviting users, access to it through the api 2010-11-23 20:58:38 +00:00
jacob
8b15620f69 Added the api/registration/dictionary functionality 2010-11-18 17:00:26 +00:00
jacob
31baeaa715 SQL error fix 2010-11-18 15:59:22 +00:00
jacob
1b098f85b3 The API depends on a return value from the user_save function, which was not being generated.
Updated user_save to return 'ok' on success, and an error message otherwise.
Updated api.php to make use of user_save's retun value.
2010-11-17 21:02:32 +00:00
james
61fba8a93c json_decode always returns an object unless you tell it to give you an associative array (2nd parameter)
give multi-select-lists as full object's where appropriate (might be more too? special awards?)
2010-11-16 21:19:16 +00:00
james
7113a3df95 Oops, i never committed this before - add configerence id as an optional parameter to /auth/login 2010-11-16 04:29:16 +00:00
jacob
4f35702bbf Added API function for modifying account information 2010-10-28 21:22:12 +00:00
jacob
d0d3c7b7c4 Separated the functionality of school selection from the pages, implemented it in the API 2010-10-27 16:40:17 +00:00
james
0bcd811101 Fix passing in role list by ids 2010-10-25 23:58:48 +00:00
james
3971df267f Add registration field roles to testapi.php page
Fix char(2) field detection
2010-10-25 23:55:38 +00:00
james
19e146547f Fix api registration fields when roles ar epassed in
roles can be passed in as array of ids or array of types
2010-10-25 23:12:35 +00:00
james
a5887bdf96 Oops fix the docs 2010-10-22 15:12:45 +00:00
james
a035a6f8e3 Add registration/fields API
Fix $roles array use colliding with global $roles array ($roles should never be used anywhere! its a master list of all of the roles set in the bootstrap!)
2010-10-22 15:06:49 +00:00
jacob
b9bcb127a6 Updated these tables to include the conference id:
award_awards
	award_prizes
	award_types
	award_awards_projectcategories
	award_awards_projectdivisions
	winners
	students
	projects
	registrations

Also modified all code that uses those tables to work with the conference id
instead of the year, with the exception of these files:
	communication.inc.php
	reports_students.inc.php
	rerollprizes.php
	remote.php
The "rerollprizes.php" probably doesn't matter, having been a one-time usage
file anyway.  The others will need to be modified in the future to correctly
use the conference id instead of the year.
2010-10-20 21:58:26 +00:00
james
f225787e39 Properly update the session roles from the API side
Allow (u) to be empty if we dont have it, we can get it from the session users_id
2010-10-14 20:38:48 +00:00
jacob
607834bc0e updating _SESSION when user roles are modified 2010-10-08 20:28:56 +00:00
james
fce116316e Implement the role/* functions 2010-10-06 21:01:17 +00:00
james
e590c94690 Fix api for categories (projectcategories_load wouldnt have ever worked!) 2010-10-05 20:24:43 +00:00
james
4f42407073 migrate categories/divisions/subdivisions from FAIRYEAR to conferences_id
rename API call /config to /config/variables
update API with /config members for divisions/subdivisions/categories
2010-10-05 19:43:30 +00:00