View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
11388 | Feature requests | RemoteControl | public | 2016-06-15 17:40 | 2016-06-16 13:25 |
Reporter | frederikprijck | Assigned To | |||
Priority | none | Severity | feature | ||
Status | new | Resolution | open | ||
Summary | 11388: Get participant information using token | ||||
Description | The RPC has serval methods regarding participants, all of them require a iTokenId in order to execute the desired query. This can be useful because we can use these methods before a token has been assigned to the participant. (DB record is inserted with a blank token and updated later when a token is generated). However, sometimes it can be useful to use the actual token (when it's available) instead of the tokenId. Example: A possible solution could be to add a new RPC method: get_participant_properties_by_token with the following code: This code is a copy of the existing get_participant_properties, replacing a single line (https://github.com/LimeSurvey/LimeSurvey/blob/master/application/helpers/remotecontrol/remotecontrol_handle.php#L1646) with https://gist.github.com/frederikprijck/fe7580909eb6fb54ceecd857b609ca08#file-gistfile1-txt-L22 I don't like code duplication, so we need to figure a way to avoid code duplication without, possibly, impacting the existing get_participant_properties method. Maybe there are other solutions? Feel free to discuss! | ||||
Tags | No tags attached. | ||||
Bug heat | 4 | ||||
Story point estimate | |||||
Users affected % | |||||
BTW: I can PR this whenever we come to an agreement, I just prefer to discuss this before creating a PR which possible gets rejected. |
|
I think we don't have actually a RC specialist/user in Dev : https://github.com/LimeSurvey/LimeSurvey/commits/master/application/helpers/remotecontrol |
|
PS : you're right for codeDuplication, we have a lot. Maybe add some private fucntion: checkSurveysExist($iSurveyId) Each of this private function throw error directly , then : for the gist : But it's just an idea, and it's completely different issue ;) |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2016-06-15 17:40 | frederikprijck | New Issue | |
2016-06-15 17:41 | frederikprijck | Note Added: 39612 | |
2016-06-16 09:32 | DenisChenu | Note Added: 39616 | |
2016-06-16 09:39 | DenisChenu | Note Added: 39617 | |
2016-06-16 13:25 | frederikprijck | Note Added: 39628 |