/[drupal]/contributions/modules/pcp/pcp.module
ViewVC logotype

Diff of /contributions/modules/pcp/pcp.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.1, Fri Oct 17 20:45:03 2008 UTC revision 1.1.2.2, Mon Dec 8 17:45:02 2008 UTC
# Line 39  function pcp_menu() { Line 39  function pcp_menu() {
39  function pcp_block($op = 'list', $delta = 0, $edit = array()) {  function pcp_block($op = 'list', $delta = 0, $edit = array()) {
40    switch ($op) {    switch ($op) {
41      case 'list':      case 'list':
42          $blocks = array();
43        $blocks[0]['info'] = t('Profile Complete Percentage');        $blocks[0]['info'] = t('Profile Complete Percentage');
44        return $blocks;        return $blocks;
45        break;        break;
46      case 'view':      case 'view':
47          $block = array();
48        switch ($delta) {        switch ($delta) {
49          case 0:          case 0:
50            global $user;            global $user;
# Line 165  function pcp_admin_settings_form_submit( Line 167  function pcp_admin_settings_form_submit(
167   *    - An indexed array of all (if any) default values for the form.   *    - An indexed array of all (if any) default values for the form.
168   */   */
169  function pcp_admin_settings_form_data() {  function pcp_admin_settings_form_data() {
170      $profile_fields_options = array();
171      $default_values = array();
172    $profile_fields = pcp_get_profile_fields();    $profile_fields = pcp_get_profile_fields();
173    foreach ($profile_fields as $key => $value) {    foreach ($profile_fields as $key => $value) {
174      $profile_fields_options[$value['fid']] = $value['title'];      $profile_fields_options[$value['fid']] = $value['title'];
# Line 173  function pcp_admin_settings_form_data() Line 177  function pcp_admin_settings_form_data()
177    foreach ($tagged_profile_fields as $key => $value) {    foreach ($tagged_profile_fields as $key => $value) {
178      $default_values[] = $value['fid'];      $default_values[] = $value['fid'];
179    }    }
180      $options = array();
181    $options['profile_fields_options'] = $profile_fields_options;    $options['profile_fields_options'] = $profile_fields_options;
182    $options['default_values'] = $default_values;    $options['default_values'] = $default_values;
183    return $options;    return $options;
# Line 236  function pcp_get_complete_percentage_dat Line 241  function pcp_get_complete_percentage_dat
241        $nextpercent = $next * 100;        $nextpercent = $next * 100;
242      }      }
243    }    }
244      $complete_data = array();
245    $complete_data['uid'] = $user->uid;    $complete_data['uid'] = $user->uid;
246    $complete_data['percent'] = $percent;    $complete_data['percent'] = $percent;
247    $complete_data['completed']  = $complete;    $complete_data['completed']  = $complete;

Legend:
Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2

  ViewVC Help
Powered by ViewVC 1.1.2