Coder Social home page Coder Social logo

getodk / build Goto Github PK

View Code? Open in Web Editor NEW
110.0 26.0 82.0 3.88 MB

ODK Build is a drag-and-drop form designer for ODK XForms. Thousands of users around the world depend on it for their data collection campaigns. Contribute and make the world a better place! βœ¨πŸ“βœ¨

Home Page: https://build.getodk.org/

License: Other

Ruby 8.63% JavaScript 73.77% CSS 8.33% HTML 7.75% Dockerfile 0.33% Shell 1.19%
odk global-development data-collection global-health javascript form-design ruby xforms social-impact mobile-data-collection

build's Introduction

opendatakit

The developer wiki (including release notes) and issues tracker are located here.

This site is primarily for developers. If you are not a developer, please visit https://getodk.org/

ODK is a free and open-source set tools which help organizations author, field, and manage mobile data collection solutions. ODK provides an out-of-the-box solution for users to:

  • Build a data collection form or survey;
  • Collect the data on a mobile device and send it to a server; and
  • Aggregate the collected data on a server and extract it in useful formats.

In addition to socio-economic and health surveys with GPS locations and images, ODK is being used to create decision support for clinicians and for building multimedia-rich nature mapping tools. See featured deployments and list of tools for more examples of what the ODK community is doing. We welcome and encourage participation from the user community.

Downloads of the tools are available at Downloads.

build's People

Contributors

danbjoseph avatar dmac avatar erikhowe avatar florianm avatar issa-tseng avatar jamieslome avatar lognaturel avatar moogacs avatar rockydcoder avatar trendspotter avatar ukanga avatar yanokwa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

build's Issues

Upload form to Aggregate should support HTTP

Currently, the Upload Form to Aggregate Instance URI starts with https. Local servers of ODK Aggregate are often http so we should support it.

And if we do, the second example in the dialog box should be http.

Cannot login

I cannot login in my account. It gives the error "Something has gone wrong. Please try again in a bit, and report the issue if it persists."

Filename of XLSForm export should be XML compliant

When pyxform converts XLS to XML, it uses the XLS file name as the root node name. And because XML has special character requirements (e.g., names must begin with a letter, colon, or underscore, subsequent characters can include numbers, dashes, and periods), we have to be careful about the name of the export.

One way to make this name compliant is to use the form ID in the export, but drop "build_" and the timestamp to make it more human-friendly. So for example, if your form id is build_Favorite-Color_1480937828, the exported file name should be Favorite-Color.
edit by @issa-tseng; this section is confusing as it refers to things Build does not actually do

With this strategy, it might still be possible to have an invalid root node name, so the export should also handle names that start with invalid characters.

User story: Being logged into Google (e.g. Gmail) within same browser session prevents publishing forms to ODK aggregate

When e.g. Gmail is running in another browser tab, ODK Build > File > Publish to Aggregate... will fail with an authentication error.
Related: Logging into an ODK Aggregate instance on google appspot will log you out from any other Google sessions within the same browser window and vice versa.
Took me a while to figure out, and not an issue with ODK Build, but maybe worth a mention in Help > troubleshooting?

Publish to Aggregate

When I hit publish to aggregate and enter in my appspot.com address, I get an internal server error. I believe this is a bug?

Choose One and Select Multiple problem

When i try to export my form to Aggregate, if it has the field "Choose One" or "Select Multiple", i get the following error:

{"error":"Something went wrong when trying to post to Aggregate."}

Any other fields works. Any hints? (Sorry for my poor english. Working on it. I'm from Brazil)

Error
Form

ODK Build: Unsupported languages and ordering

Issue by mitchellsundt
Thursday Jul 09, 2015 at 17:31 GMT
Originally opened as getodk/getodk#156 (2 comment(s))


Originally reported on Google Code with ID 155

When adding language translations the languages are not in order.  For example, "Spanish"
shows up near most of the E's, but appears on the phone as "SPA".  

I'm not sure if this is possible, but it'd be nice if the whole word "spanish" showed
up on the phone instead of "spa"

Also, in several trainings users have asked what they should do when a local dialect/language
is not on the list.  There's no way right now to add or specify another.

It may be easier to just make the add a field where you type the language name and
click "add".?  Haven't thought it through much, so not sure what the easiest/best thing
to do would be.

Reported by carlhartung on 2010-12-09 17:30:36

Force Close with "Group" type question

I had a form created with build which had a "Group" type field. This would cause a "Force Close" crash on the phone before opening this question. I removed this Group question and the form runs fine.
The problematic field is "UsualMeds"

<h:html xmlns="http://www.w3.org/2002/xforms" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:jr="http://openrosa.org/javarosa">
<h:head>
<h:title>Asthma1/h:title

















Name


First and Last Name


ID Number





Normal Peak Flow


Peak Flow when not having problems


Current Peak Flow


Peak Flow at this time


Photo


Take a photo


Symptoms


Tick symptoms now


Cough


Wheeze


Chest Tightness


Short of Breath


Cannot do usual activities


Usual Medications


Quick Relief Medication


Short acting beta2 agonist











/h:head
<h:body>




















cough wheeze chest-tight sob nousualactivity







/h:body
/h:html

Underlying values of selects should allow hyphens/dashes and be constrained to 32 chars

Underlying values of selects should allow hyphens/dashes because it's human-friendly and a JavaRosa-compliant way to name values.

Build should not allow values greater than 32 characters because that will trigger a warning in JavaRosa (see source code).

Long term, @MartijnR is documenting the ODK form specifications. Once he's finished, then we can make sure Build is compliant. πŸŽ‰πŸΎπŸ‘πŸΎ

data range

Its not working at the app when I check the range of the data, it shows the label and doesnt accept any. Also dont change the label of the little calendar (it changes the week places of days, but stays the curent month/year on top.)

The invalid text donesnt work either, it shows the label of main field.

you should be able to save forms as different names than their explicit "form name" in Build

Issue by mitchellsundt
Thursday Jul 09, 2015 at 17:34 GMT
Originally opened as getodk/getodk#166 (1 comment(s))


Originally reported on Google Code with ID 165

I have a form named "patient history"

but I would like to save it as "patient history - kenya" to differentiate it.

but I would like the form to appear on the phone as "patient history". 

Currently, changing form name changes the name it's saved under.

Reported by carlhartung on 2011-01-12 23:08:58

Fix to relevant and fieldlist groups

This code in data.js:
if (relevance.length > 0 )
binding.attrs.relevant = '(' + relevance.join(') and (') + ')';

Should be:
if (relevance.length > 0 )
binding.attrs.relevant = '(' + relevance[relevance.length-1] + ')';

Because when you create a field list group (maybe only a group) it will add the previos relevance of a question and it has some troubles when you show the information.

And example without fix:
< bind nodeset="/data/Refresco/edad" type="select1"/>
< bind nodeset="/data/Refresco/edadanios" type="string" relevant="(/data/Refresco/edad=1)"/>
< bind nodeset="/data/Refresco/edadmeses" type="string" relevant="(/data/Refresco/edad=1) and (/data/Refresco/edad=2)"/>
without fix the second question wont appear.

And with the fix:
< bind nodeset="/data/Refresco/edad" type="select1"/>
< bind nodeset="/data/Refresco/edadanios" type="string" relevant="(/data/Refresco/edad=1)"/>
< bind nodeset="/data/Refresco/edadmeses" type="string" relevant="(/data/Refresco/edad=2)"/>

But I would like to know your opinion.

I tested with relevance group and this continues working.
Maybe with nested groups does not work, I didnt test it.

After this I'm trying to refresh the windows in the collect when a question has relevant in a fieldlist group, but this is another story =).

Greetings

Use of jump

Instead of using groups every time you want to skip a group of questions, it would be easiest by using jumps. Example:
If answer is '2' in question q1 then jump to q12.
If answer is '2' or/and '3' in question q1 then jump to q12.
If answer is '1' in question q1 then terminate interview.
If answer is '2' in question q1 and '1' in question q2 then jump to q12.

Improve Aggregate credential requirements in export dialog

"Note: this is your Aggregate account information, not your Google account..." should be changed to "This is your Aggregate account credentials with Form Manager or greater capabilities. The account type in Aggregate has to be ODK and not Google. You may leave these blank if your Aggregate instance allows anonymous form uploading."

This is important because we don't necessarily want users to put in the admin credentials if they don't need to. It's also important to clarify the type because you can have (and I have seen) Aggregate accounts of type "ODK" but with Gmail addresses as user names.

screen shot 2016-12-07 at 10 03 54

Login to Build

I can't login to build. Have a form build and want to fix it, but the program blocks me from logging in.

Using ODK Collect -Taking Picture Reboots Acer A500 Tablet - Android (4.0.3)

Created 2 forms using Build and upload to Aggregate. The forms have an image field. I use Collect to access the forms on my Acer A500 Android 4.0.3 Tablet. All other field works fine but when i attempt to use the picture field - as soon as I take the picture, my tablet is rebooted. This happens with both forms. The camera works fine with other applications.

The image field is optional - without the picture, the forms are fine - I can enter data, finalize and submit.

The same thing happens each time I attempt to take picture to attached to the image field.

Attaching an image works fine.

[Fix] Looped and Display On One Screen

I had troubles with this, because it wasnt working when both were selected, it only worked Looped and not with Display On One Screen.
One solution that I found was putting a group inside another group with different options and it works, but I made my custom solution and with this you can only use one group and have the two options.

Links that helped me: http://groups.google.com/group/opendatakit-developers/browse_thread/thread/97f263b6225707b0
And my issue: http://code.google.com/p/opendatakit/issues/detail?id=454

The code goes in public/javascripts/data.js
I changed this:
// field-list
if (control.fieldList === true)
{
bodyTag.attrs.appearance = 'field-list';
}

For this:
// field-list
if (control.fieldList === true)
{
//Fix field list + loop
if(control.loop === true){
var loopBodyTag2 = {
name: 'group',
attrs: {},
children: []
};
bodyTag.children.push(loopBodyTag2);
bodyTag = loopBodyTag2;
}
bodyTag.attrs.appearance = 'field-list';
}

And now it works very well without causing troubles.

Greetings.

Add help to help menu

Hi there,

I use ODK build and try to find the help file in the menu. When does this function available? Thanks.

Better Validation Request

Overall I really like the clean UI of ODK Build as it is easy for anyone to use. However, when getting others to add questions, there are frequently issues with validation. The following features would greatly reduce issues when using ODK Build along with ODK Aggregate.

  1. Check for options (in single and multi-select questions) that do not have underlying values (or are empty)
  2. Make sure underlying values do not have bad characters (similar to what is being done with Data Name)
  3. Make sure there are no name collisions with Data Names used inside of different groups (ODK Aggregate does not handle this and an error is only appears after filling out the form in ODK Collect and trying to submit finished data).

We also had some issues teach people how to add skip logic, but I realize that is a more advanced task.

Overall, great work. Thanks!
Matt

Skip logic within group

From [email protected]:

"I am trying to develop a data collection form with ODK build with some questions in a group. If I add skip logic to questions outside the group or if i add skip logic to the whole group, it works fine but if I add skip logic to questions within the group, it does not work. If I take same question out of the group, the same logic starts working."

Add support for uploading forms to non App-Engine installs

Currently, Build supports uploading forms to App Engine. Not all ODK Aggregate users are on App Engine, and it would be good to add this feature for these users.

This change will require changing the Aggregate Instance URI from
https://______.appspot.com/ to a text field that can allow any URL.

It will be important to add some hints to the user what a likely good URL for App Engine and for Tomcat is (e.g., https://my_server.appspot.com, http://192.168.1.10:8080/ODKAggregate).

Conditionals not working when in a group

The conditionals that I am trying to set up are not working when I move them into a group for use on my tablet. Is there a fix for this?

Ex.

  1. Chose your favorite color
    blue
    red
    other
    1a. Specify other

I want question 1a to show up only if "other" was chosen in question 1. I have formatted the conditional information properly, as it works when the question is not in a group.

Change prompt color to red when relevance in a field-list will not work

When there are relevance expressions that refer to other fields in the same group, Build correctly shows a warning in the advanced part of the UI.
screen shot 2016-12-07 at 09 20 42

I think Build should also turn the color of the prompt red (just like it does when the data name of the prompt is invalid). It is important to show this warning more clearly because the behavior of the form in Collect will be subtle and hard for novice users to detect.
screen shot 2016-12-07 at 09 23 38

Error while creating branch component

Hi team,
I am trying to create a skip logic(refering to branch) in my form but i am getting a error in my console.
Error as follows.

Chrome
Uncaught TypeError: Cannot read property 'value' of undefined

Firefox
TypeError: h.name is undefined

any solution for above error.

Thanks in advance
Prince M Jain

Build shows label instead of constraint message

From [email protected]

I was working on modification in ODK buid since past few months. There was a bug, which is it shows the label instead of constraint message.

The problem was in https://github.com/clint-tseng/odkbuild/blob/master/public/javascripts/data.js

LIne 436. There was
addTranslation(control.label, xpath + control.name + ':constraintMsg', translations);

It should be
addTranslation(control.invalidText, xpath + control.name + ':constraintMsg', translations);

Open Form

Hello,
When I click on a form to open in the "Open Form" popup box the form opens in the background but the popup box doesn't not go away, in effect freezing me out of working on my form. Please help.
Cheers,
Jennifer

how to compile

Hi, Do you use netbeans or eclipse for this?

I'm only a starter and I'm trying to compile this in netbeans, with rails.

Is there a tutorial in some part?

Greetings.

Spinner control & Import from XML

Clint:

Hi. First of all, kudos for the great http://build.opendatakit.org web application.
Hope this is the place for feature requests, otherwise, sorry for the mispost.
I want ask for a couple of things:

  • Spinner control (dropdown/pick list): I know the ODK Collect Android app has a "New Widgets" form with several controls not included in the web application, but starting with the Spinner control (to choose a single value) would be great, as this is one of the most commonly used controls
  • Import from XML... : From the File menu option, as I've found out that many reusable forms only exist in XML format and not in odkbuild

Thank you,
Bar.

Branch widget is broken

When dragging and dropping the branch input widget into the form area, only a grey box appears, but there are no properties to set. Happening in Chrome v24, Firefox v17. If there are some browser extensions blocking it, maybe a hint would be useful to disable them on ODK Build. If adding a branch requires an action different to drag and drop (as with the other widgets), a hint would be great.
Thanks for the great app, very useful!

Improve data validation and warning on control and groups

Build should allow letters, numbers, hyphens, and underscores for data names of controls and groups. Build should not allow control and group names that start with numbers.

Currently, group names can start with numbers. It should warn in the same way control names warn. This is a problem because the XML that Build then generates will be invalid (elements can't start with numbers).

Currently, both control and group names don't allow hyphens. They should because that's a human-friendly way of separating data names.

Currently, control and group name warnings say Only letters and numbers are allowed. It should say that letters, numbers, hyphens, and underscores are allowed.

new menu entry: File > Manage forms...

would it be possible to add a menu entry:
File > Manage forms... > Delete -- select multiple forms & delete selected forms
File > Manage forms... > Upload -- upload new form as xml (would have to be parsed and validated, only for forms from odk build)

Use case for "delete form": I have created several forms, and want to uncluter my work space from old, superceded forms.
Use case for "upload form": My colleague has created an ODK Build form, and I want to branch off it in my own ODK Build workspace by uploading the XML that the colleague exported.

"Publish/Export to Aggregate" should be changed to "Upload form to Aggregate"

The dialog that pops up when a user attempts to "Publish to Aggregate" is titled "Export" and the dialog uses "export" in the text. We should agree on a term and make it consistent.

I'm flexible on the exact term, but I think "Upload form to Aggregate" is likely the correct wording. Publish would be ideal, but it is used in Aggregate to mean streaming data to an external source. Export is used in Aggregate to mean one time exports of data. Given that, I think the likely best term is "upload".

screen shot 2016-12-07 at 09 29 48

The pop up dialog that shows up when the form is successfully published, should also say publish, not uploaded. The same applies to the error messages and menu dialog.

GUIDE Instalation ODK BUILD CentOS by jluis859

Create a dir install in "mycentos" (that is your centos dir).

mkdir /home/mycentos/install/
cd /home/mycentos/install/

Install dependencies

yum grouplist |grep -i Development
sudo yum groupinstall "Development Tools"
rpm -qa |grep ruby

sudo yum install httpd-devel
openssl-devel
zlib-devel
gcc
gcc-c++
curl-devel
expat-devel
gettext-devel
mysql-server
mysql-devel

last time it didn't work, so I had to separate it:

sudo yum install httpd-devel
sudo yum install openssl-devel
sudo yum install zlib-devel
sudo yum install gcc
sudo yum install gcc-c++
sudo yum install curl-devel
sudo yum install expat-devel
sudo yum install gettext-devel
sudo yum install mysql-server
sudo yum install mysql-devel

Install ruby

wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure --prefix=/usr/local
make
make install

back

cd ..

wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
tar xzvf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0
./configure --prefix=/usr/local --enable-shared --disable-install-doc --with-opt-dir=/usr/local/lib
make
make install

verify the version

ruby -v
gem -v

back

cd ..

Install Rails

sudo gem install rails

Current version of rails can cause problems, solution:

sudo gem install --version '2.2.3' rails

Install Bundle

sudo gem install bundle

Install Tokyo Tyrant DB for odk build

Some libs

yum install gzip bzip2 bzip2-devel

Tokyo cabinet

wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.47.tar.gz
tar zxf tokyocabinet-1.4.47.tar.gz
cd tokyocabinet-1.4.47
./configure
make
make install

back

cd ..

Tokyo tyrant

wget http://fallabs.com/tokyotyrant/tokyotyrant-1.1.41.tar.gz
tar zxf tokyotyrant-1.1.41.tar.gz
cd tokyotyrant-1.1.41
./configure
make
make install

back

cd ..

Install git

Add the repository

rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm

Install the latest version of git

yum install --enablerepo=webtatic git-all

Download odk from github with git

mkdir odk
cd odk
git clone git://github.com/clint-tseng/odkbuild.git

Install gemfile

cd odkbuild
bundle install --path .rubygems

Copy and rename config.yml.sample to config.yml

cp config.yml.sample config.yml

Start DB TokyoTyrant

rake db:dev:start

Start Default Server Webrick with 8084 port

bundle exec rackup config.ru -p 8084

Install alternative server thin, only If webrick doesnt work with external private Ips install Thin

sudo gem install thin

Start Server with thin -p myport start and that's all, if have problems with rake 1.3.4 maybe you should change the gemfile and bundle install again

thin -p 8084 start

Daemon mode

bundle exec thin -d -p 8084 start

List the installed gems.

gem list

Prevent Build from putting groups inside groups

A field-list group inside another field-list group crashes Collect. Build should not allow such forms to be built.

E/AndroidRuntime( 7503): java.lang.RuntimeException: Only questions are allowed in 'field-list'.  Bad node is: /data
E/AndroidRuntime( 7503):    at org.odk.collect.android.logic.FormController.getQuestionPrompts(FormController.java:848)
E/AndroidRuntime( 7503):    at org.odk.collect.android.logic.FormController.stepToNextScreenEvent(FormController.java:593)
E/AndroidRuntime( 7503):    at org.odk.collect.android.activities.FormEntryActivity.showNextView(FormEntryActivity.java:1174)
E/AndroidRuntime( 7503):    at org.odk.collect.android.activities.FormEntryActivity.onFling(FormEntryActivity.java:2467)
E/AndroidRuntime( 7503):    at android.view.GestureDetector.onTouchEvent(GestureDetector.java:600)    

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.