- web: allow profiles to have blank text fields

svn path=/trunk/boinc/; revision=15707
This commit is contained in:
David Anderson 2008-07-30 02:16:10 +00:00
parent 95fdff2fd3
commit dd59703811
3 changed files with 22 additions and 5 deletions

View File

@ -6018,3 +6018,9 @@ David 28 July 2008
sched/
Makefile.am
pymw_assimilator.C
David 28 July 2008
- web: allow profiles to have blank text fields
html/user/
create_profile.php

View File

@ -29,12 +29,16 @@ function job_show($job, $inst, $user) {
function job_issued($job, $inst, $user) {
$insts = $job->get_instances();
if (count($insts) > 1) {
if (count($insts) == 1) {
$job->set_priority(2);
} else {
$job->set_priority(0);
}
}
function job_finished($job, $inst) {
// record the user's response
//
$response = null;
if (get_str('submit', true)) {
$response->have_ellipse = 0;
@ -45,7 +49,7 @@ function job_finished($job, $inst) {
}
$inst->update_info($response);
// see if job is done
// see whether we have a consensus
//
$insts = $job->get_finished_instances();
$n = count($insts);
@ -64,10 +68,17 @@ function job_finished($job, $inst) {
}
}
}
// no consensus - see whether we've reached replication limit
//
if ($n >= 10) {
$job->update_state(BOSSA_JOB_INCONCLUSIVE);
return;
}
// still looking for consensus - allow another instance to be issued
//
$job->set_priority(2);
}
// two results are compatible if neither found an ellipse,
@ -87,7 +98,7 @@ function compatible($r1, $r2) {
}
function job_timed_out($job, $inst, $user) {
$job->set_priority(1);
$job->set_priority(2);
}
function show_job_summary($job) {

View File

@ -186,8 +186,8 @@ function show_textarea($name, $text) {
// Don't assign to $profile->x if this is the case.
//
function process_create_profile($user, $profile) {
$response1 = post_str('response1');
$response2 = post_str('response2');
$response1 = post_str('response1', true);
$response2 = post_str('response2', true);
$language = post_str('language');
akismet_check($user, $response1);