Changes between Version 21 and Version 22 of BossaExampleOne


Ignore:
Timestamp:
Jul 30, 2008, 9:44:22 AM (16 years ago)
Author:
davea
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BossaExampleOne

    v21 v22  
    1 = Bossa example 1 =
     1= Example 1: the basics =
    22
    33In this application volunteers view synthetic images,
     
    5656The display function is:
    5757{{{
    58 function job_show($job, $inst, $user) {
    59     $info = $job->get_info($job);
    60     $path = $info->path;
    61     page_head("Find the Ellipse");
    62     echo "
    63         <form method=get action=bossa_job_finished.php>
    64         Click on the center of the ellipse.
    65         If you don't see one, click here:
    66         <input type=submit name=submit value=None>
    67         <br><br>
    68         <input type=hidden name=bji value=$inst->id>
    69         <input type=image name=pic src=$path>
    70         </form>
    71     ";
    72     page_tail();
    73 }
     58     9  function job_show($job, $inst, $user) {
     59    10      $info = $job->get_info($job);
     60    11      $path = $info->path;
     61    12      page_head("Find the Ellipse");
     62    13      echo "
     63    14          <form method=get action=bossa_job_finished.php>
     64    15          Click on the center of the ellipse.
     65    16          If you don't see one, click here:
     66    17          <input type=submit name=submit value=None>
     67    18          <br><br>
     68    19          <input type=hidden name=bji value=$inst->id>
     69    20          <input type=image name=pic src=$path>
     70    21          </form>
     71    22      ";
     72    23      page_tail();
     73    24  }
     74
    7475}}}
     76
     77It calls a Bossa API function to get the job's opaque data (line 9).
     78Then it generates a web page containing the image
     79within a form, so that clicking on the image (or on the None button)
     80will invoke '''bossa_job_finished.php'''.
    7581
    7682The policy functions are as follows.