Giter VIP home page Giter VIP logo

surveysolutionsapi's People

Contributors

michael-cw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

surveysolutionsapi's Issues

Export broken on Ver 20.12

The suso_export function is broken as the new version of Survey Solution has shifted to V2 API and the code here still has V1.

Updated R package

Hi Michael,
Will we be getting an updated package? This one is excellent and all it needs is to incorporate Workspaces.

Kind regards.

Interview ID not consistent

The Interview ID that we get using suso_getAllInterviewQuestionnaire command and suso_export command are different.

suso_getAllInterviewQuestionnaire - bb6c5d61-889c-4b9d-90f9-7f89f22deb45
suso_export - bb6c5d61889c4b9d90f97f89f22deb45

suso_getAllInterviewQuestionnaire has '-' while suso_export doesn't.

Parameter workStatus of suso_export() do not behave as described on documentation

On documentation is stated:

workStatus : define which statuses the file should inlude (i.e. ...), if NULL all is exported .

But the code inside the function does this:

workStatus<-match.arg(workStatus, margs)

Where margs is :
["Restored","Created","SupervisorAssigned","InterviewerAssigned","RejectedBySupervisor","ReadyForInterview","SentToCapi","Restarted","Completed","ApprovedBySupervisor","RejectedByHeadquarters","ApprovedByHeadquarters","Deleted"]

The match.arg() documentation says on Arguments section:

arg : a character vector (of length one unless several.ok is TRUE) or NULL.

And on Details section:

In the one-argument form match.arg(arg), the choices are obtained from a default setting for the formal argument arg of the function from which match.arg was called.
(Since default argument matching will set arg to choices, this is allowed as an exception to the ‘length one unless several.ok is TRUE’ rule, and returns the first element.)

The wording is not very clear, but means that if length of arg is not 1 (as it happens to be when arg is NULL). the first element of choice is returned.

And the code of match.arg() contains:

    if (is.null(arg)) 
        return(choices[1L])

So workStatus ends up with the value "Restored", which is not the documented behaviour for suso_export().

Regards

  • Pablo

Can you verify that Suso_get_stats function works.

Hi I'm getting the following error when using suso_get_stats function example on website:
statquest <- suso_get_stats(workspace = Workspace, questID = questlist[2, QuestionnaireId], version = questlist[2, Version], qQuest = questionnaire[13,
PublicKey])

and getting the following error:

[1] "https://slnet.solutions/vieuxfort/api/v1/statistics?query.questionnaireId=4c8404e9ca814f2cbafb4d8099196095&query.version=1&query.question=084aa69c-ec89-566b-f67a-b02622bd7ad5&query.exportType=Csv&query.pivot=false&query.expandTeams=true"
Error: Invalid request! Please check your input parameters.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.