Changeset 253
- Timestamp:
- 03/07/08 19:30:30 (9 months ago)
- Files:
-
- regext/README.txt (modified) (1 diff)
- regext/invite_actions.php (modified) (1 diff)
- regext/invite_join.php (modified) (4 diffs)
- regext/invite_register_welcome.php (added)
- regext/lib.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
regext/README.txt
r236 r253 57 57 etc. 58 58 59 *Integration with form module* 60 61 To take the title and description for the join and registration forms from those 62 defined using the form module, as well as the registration form response text, define: 63 64 define('INVITE_USE_FORM_MODULE',true); 65 66 in invite_config.php 67 68 See the form module README for more information. 69 59 70 *Moderated registration* 60 71 regext/invite_actions.php
r222 r253 192 192 } else { 193 193 regext_setup_user($u,$owner,'',false,$displaypassword); 194 $_SESSION['messages'][] = __gettext("Your account was created! You can now log in using the username and password you supplied. "); 195 if (INVITE_MAIL_CLEAR_PASSWORD) { 196 $_SESSION['messages'][] = __gettext("You have been sent an email containing these details for reference purposes."); 194 if (defined("INVITE_USE_FORM_MODULE") && INVITE_USE_FORM_MODULE 195 && $reg_response = get_field('forms','response_text','name','registration')) { 196 $_SESSION['messages'][] = $reg_response; 197 } else { 198 $_SESSION['messages'][] = __gettext("Your account was created! You can now log in using the username and password you supplied. "); 199 if (INVITE_MAIL_CLEAR_PASSWORD) { 200 $_SESSION['messages'][] = __gettext("You have been sent an email containing these details for reference purposes."); 201 } 197 202 } 198 203 } regext/invite_join.php
r222 r253 1 1 <?php 2 2 3 global $CFG, $metatags ;3 global $CFG, $metatags, $title; 4 4 // Join 5 5 6 6 require_once($CFG->dirroot.'mod/profile/profile.config.php'); 7 $problem_fields = $_SESSION['problem_fields']; 8 unset($_SESSION['problem_fields']); 7 8 if ($_SESSION['problem_fields']) { 9 $problem_fields = $_SESSION['problem_fields']; 10 unset($_SESSION['problem_fields']); 11 } 9 12 10 13 $profiledetails = optional_param('profiledetails'); … … 46 49 $username = preg_replace("/[^A-Za-z]/","",$username); 47 50 } 48 49 if(array_key_exists("invite:join:welcome",$function)){ 51 52 if (defined("INVITE_USE_FORM_MODULE") && INVITE_USE_FORM_MODULE && $reg_description = get_field('forms','description','name','registration')) { 53 $run_result .= $reg_description; 54 $title = get_field('forms','title','name','registration'); 55 } else if(array_key_exists("invite:join:welcome",$function)){ 50 56 $run_result.=run("invite:join:welcome"); 51 57 } … … 90 96 91 97 foreach($data['profile:details'] as $field) { 92 if (!is_array($field) && $field->registration) {98 if (!is_array($field) && isset($field->registration) && $field->registration) { 93 99 if (empty($field->user_type) || $field->user_type == '' || $field->user_type == 'person') { 94 100 $registration_fields[] = $field; … … 138 144 $ftype = "text"; 139 145 } 140 $column1 = display_input_field(array("profiledetails[" . $fname . "]",$value->value,$ftype,$fname,@$value->ident, $page_owner));146 $column1 = display_input_field(array("profiledetails[" . $fname . "]",$value->value,$ftype,$fname,@$value->ident,page_owner())); 141 147 142 148 $run_result .= templates_draw(array( regext/lib.php
r222 r253 10 10 $function['invite:init'] = array($CFG->dirroot . "mod/invite/lib/invite_config.php",$CFG->dirroot . "mod/regext/invite_actions.php"); 11 11 $function['invite:join'] = array($CFG->dirroot . "mod/regext/invite_join.php"); 12 $function['invite:register:welcome'] = array($CFG->dirroot . "mod/regext/invite_register_welcome.php"); 12 13 } 13 14
