2006-07-11 03:44:14 +00:00
|
|
|
<?php
|
|
|
|
|
2006-07-11 19:24:12 +00:00
|
|
|
// stuff that's particular to the "BOINC user survey"
|
|
|
|
|
|
|
|
// miscellaneous field names
|
|
|
|
|
|
|
|
$run_boinc="run_boinc";
|
|
|
|
$factor_other_text = "factor_other_text";
|
|
|
|
$country = "country";
|
|
|
|
$lother_text = "lother_text";
|
|
|
|
$fother_text = "fother_text";
|
|
|
|
$wother_text = "wother_text";
|
|
|
|
$nother_text = "nother_text";
|
|
|
|
$improved = "improved";
|
|
|
|
|
2006-07-11 03:44:14 +00:00
|
|
|
$choice0 = array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"text" => "Yes - I've been running BOINC on my computer for...",
|
2006-07-11 03:44:14 +00:00
|
|
|
"rname" => "current",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"tweek" => "less than a week",
|
|
|
|
"tmonth" => "less than a month",
|
|
|
|
"t6months" => "less than six months",
|
|
|
|
"tmore" => "more than six months"
|
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => "duration",
|
|
|
|
"other_name" => null,
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
$choice1 = array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"text" => "No - I was running BOINC, but stopped because...",
|
2006-07-11 03:44:14 +00:00
|
|
|
"rname" => "lapsed",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"linterest" => "I lost interest",
|
|
|
|
"lcomplicated" => "it was too complicated",
|
|
|
|
"lstopped" => "I stopped it and forgot to start again",
|
|
|
|
"lproblems" => "it caused problems on my computer",
|
|
|
|
"lpower" => "it used too much electricity",
|
|
|
|
"lnonboinc" => "I switched to a non-BOINC computing project",
|
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "lother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
$choice2 = array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"text" => "No - I tried running BOINC, but...",
|
2006-07-11 03:44:14 +00:00
|
|
|
"rname" => "failed",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"finstall" => "the software didn't install correctly",
|
|
|
|
"ffigure" => "I couldn't figure out how to use the software",
|
|
|
|
"fnetwork" => "I had network communication problems",
|
|
|
|
"fattach" => "I couldn't attach to a project",
|
|
|
|
"fwork" => "I attached to a project, but never got any work",
|
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "fother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
$choice3 = array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"text" => "No - I never tried running BOINC, because...",
|
2006-07-11 03:44:14 +00:00
|
|
|
"rname" => "never",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"nsecurity" => "I was concerned about securty",
|
2006-07-11 21:56:53 +00:00
|
|
|
"nproject" => "I wasn't interested in any of the projects",
|
|
|
|
"npermission" => "I don't have permission to run it on my computer",
|
2006-07-11 03:44:14 +00:00
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "nother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
|
2006-07-11 19:24:12 +00:00
|
|
|
$overall_choices = array($choice0, $choice1, $choice2, $choice3);
|
|
|
|
|
2006-07-11 03:44:14 +00:00
|
|
|
$factors = array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"text" => "Which are the most important factors when you decide whether to participate in a BOINC project?",
|
|
|
|
"options" => array(
|
|
|
|
"factor_graphics"=>"Nice-looking screensaver graphics",
|
|
|
|
"factor_credit_fair"=>"Fair and quick granting of credit for work done",
|
|
|
|
"factor_credit_more"=>"Getting more credit from this project than from others",
|
|
|
|
"factor_mb_friendly"=>"Helpful and friendly message boards",
|
|
|
|
"factor_mb_staff"=>"Participation by project staff on the message boards",
|
|
|
|
"factor_web_site"=>"Informative project web site",
|
2006-07-11 21:56:53 +00:00
|
|
|
"factor_science_important"=>"The science is important and beneficial",
|
2006-07-11 19:24:12 +00:00
|
|
|
"factor_science_public"=>"Scientific results are public",
|
|
|
|
"factor_recognize"=>"Personal recognition if my computer finds something",
|
2006-07-11 21:56:53 +00:00
|
|
|
"factor_publish"=>"Publication by the project in scientific journals",
|
2006-07-11 19:24:12 +00:00
|
|
|
"factor_email"=>"Periodic email newsletters from the project",
|
|
|
|
),
|
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "factor_other_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
$comp_items = array(
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"kind",
|
2006-07-11 03:44:14 +00:00
|
|
|
"text"=>"What kind of computer do you have?",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"windows"=>"Windows",
|
|
|
|
"mac"=>"Macintosh",
|
|
|
|
"linux"=>"Linux",
|
|
|
|
"other_unix"=>"Other Unix",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"venue",
|
2006-07-11 03:44:14 +00:00
|
|
|
"text"=>"Where is your computer?",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"home"=>"Home",
|
|
|
|
"work"=>"Work",
|
|
|
|
"school"=>"School",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"ncomputers",
|
2006-07-11 03:44:14 +00:00
|
|
|
"text"=>"How many computers do you have?",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"n1"=>"1",
|
|
|
|
"n2"=>"2-4",
|
|
|
|
"n59"=>"5-9",
|
|
|
|
"n10"=>"10+",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"turned_on",
|
|
|
|
"text"=>"On average, how many hours per day is your computer turned on?",
|
|
|
|
"options" => array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"t08"=>"0-8",
|
|
|
|
"t823"=>"8-23",
|
|
|
|
"t24"=>"24",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
$you_items = array(
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"age",
|
2006-07-11 03:44:14 +00:00
|
|
|
"text"=>"Age",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options"=>array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"age019"=>"0-19",
|
|
|
|
"age2039"=>"20-39",
|
|
|
|
"age4059"=>"40-59",
|
|
|
|
"age60"=>"60+",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"sex",
|
2006-07-11 03:44:14 +00:00
|
|
|
"text"=>"Sex",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options"=>array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"sexm"=>"Male",
|
|
|
|
"sexf"=>"Female",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
array(
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name"=>"level",
|
2006-07-11 03:44:14 +00:00
|
|
|
"text"=>"Your level of computer expertise",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options"=>array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"levb"=>"Beginner",
|
|
|
|
"levi"=>"Intermediate",
|
|
|
|
"leva"=>"Advanced",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
$where_item = array(
|
|
|
|
"name"=>"where",
|
|
|
|
"text"=>"Where did you learn about your current project?",
|
2006-07-11 19:24:12 +00:00
|
|
|
"options"=>array(
|
2006-07-11 03:44:14 +00:00
|
|
|
"wtv"=>"TV/radio/newspaper",
|
|
|
|
"wweb"=>"The web",
|
|
|
|
"wpers"=>"Someone told me about it",
|
|
|
|
),
|
2006-07-11 19:24:12 +00:00
|
|
|
"radio_name" => false,
|
|
|
|
"other_name" => "wother_text",
|
2006-07-11 03:44:14 +00:00
|
|
|
);
|
|
|
|
|
2006-07-11 19:24:12 +00:00
|
|
|
function parse_form() {
|
|
|
|
global $run_boinc;
|
|
|
|
global $overall_choices;
|
|
|
|
global $factors;
|
|
|
|
global $comp_items;
|
|
|
|
global $you_items;
|
|
|
|
global $where_item;
|
|
|
|
global $country;
|
|
|
|
global $improved;
|
|
|
|
$x = array();
|
|
|
|
$x[$run_boinc] = get_str($run_boinc);
|
|
|
|
$x = parse_form_choices($x, $overall_choices);
|
|
|
|
$x = parse_form_choice($x, $factors);
|
|
|
|
$x = parse_form_choice($x, $where_item);
|
|
|
|
$x = parse_form_choices($x, $comp_items);
|
|
|
|
$x = parse_form_choices($x, $you_items);
|
|
|
|
$x[$country] = get_str($country);
|
|
|
|
$x[$improved] = get_str($improved);
|
|
|
|
return $x;
|
|
|
|
}
|
|
|
|
|
|
|
|
function generate_xml($x) {
|
|
|
|
global $run_boinc;
|
|
|
|
global $overall_choices;
|
|
|
|
global $factors;
|
|
|
|
global $comp_items;
|
|
|
|
global $you_items;
|
|
|
|
global $where_item;
|
|
|
|
global $country;
|
|
|
|
global $improved;
|
|
|
|
$xml = "";
|
|
|
|
$xml .= "<$run_boinc>".$x[$run_boinc]."</$run_boinc>\n";
|
|
|
|
$xml .= gen_xml_choices($x, $overall_choices);
|
|
|
|
$xml .= gen_xml_choice($x, $factors);
|
|
|
|
$xml .= gen_xml_choice($x, $where_item);
|
|
|
|
$xml .= gen_xml_choices($x, $comp_items);
|
|
|
|
$xml .= gen_xml_choices($x, $you_items);
|
|
|
|
$xml .= "<$country>".$x[$country]."</$country>\n";
|
|
|
|
$xml .= "<$improved>".$x[$improved]."</$improved>\n";
|
|
|
|
return $xml;
|
|
|
|
}
|
|
|
|
|
2006-07-11 03:44:14 +00:00
|
|
|
?>
|