Changes between Version 23 and Version 24 of BossaExampleOne


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

--

Legend:

Unmodified
Added
Removed
Modified
  • BossaExampleOne

    v23 v24  
    8282
    8383{{{
    84 function job_issued($job, $inst, $user) {
    85     $job->set_priority(0);
    86 }
     84    26  function job_issued($job, $inst, $user) {
     85    27      $job->set_priority(0);
     86    28  }
    8787}}}
    8888
     
    9292
    9393{{{
    94 function job_finished($job, $inst) {
    95     $response = null;
    96     if (get_str('submit', true)) {
    97         $response->have_ellipse = 0;
    98     } else {
    99         $response->have_ellipse = 1;
    100         $response->cx = get_int('pic_x');
    101         $response->cy = get_int('pic_y');
    102     }
    103     $inst->update_info($response);
    104 }
     94    30  function job_finished($job, $inst) {
     95    31      $response = null;
     96    32      if (get_str('submit', true)) {
     97    33          $response->have_ellipse = 0;
     98    34      } else {
     99    35          $response->have_ellipse = 1;
     100    36          $response->cx = get_int('pic_x');
     101    37          $response->cy = get_int('pic_y');
     102    38      }
     103    39      $inst->set_opaque_data($response);
     104    40  }
    105105}}}
    106106
     
    110110
    111111{{{
    112 function job_timed_out($job, $inst, $user) {
    113     $job->set_priority(1);
    114 }
     112    42  function job_timed_out($job, $inst, $user) {
     113    43      $job->set_priority(1);
     114    44  }
    115115}}}
    116116This is called when a job times out.
     
    121121that summarize the opaque data for jobs, instances, and users on the Admin page:
    122122{{{
    123 function job_summary($job) {
    124     $info = $job->get_opaque_data();
    125     return "<a href=".URL_BASE."$info->path>View image</a>";
    126 }
    127 
    128 function instance_summary($inst) {
    129     $info = $inst->get_opaque_data();
    130     if ($info->have_ellipse) {
    131         return "($info->cx, $info->cy)";
    132     } else {
    133         return "no ellipse";
    134     }
    135 }
    136 
    137 function show_user_summary($user) {
    138 }
     123    46  function job_summary($job) {
     124    47      $info = $job->get_opaque_data();
     125    48      return "<a href=".URL_BASE."$info->path>View image</a>";
     126    49  }
     127    50
     128    51  function instance_summary($inst) {
     129    52      $info = $inst->get_opaque_data();
     130    53      if ($info->have_ellipse) {
     131    54          return "($info->cx, $info->cy)";
     132    55      } else {
     133    56          return "no ellipse";
     134    57      }
     135    58  }
     136    59
     137    60  function show_user_summary($user) {
     138    61  }
    139139}}}