Hi all,

I need to add an extra kind of profile type to my installation. In addition to the normal resume, I have a customized profile type set up for teachers. I would like to add all the goodness that comes with the default resume type to my new profile type, teacher_resume. The new profile type uses all new field collections - totally separate from the existing collections.

I have looked thru the install and the code and I can see that there is probably no magic switch to do what I want. Has anyone done something like this before? If someone is willing to assist me in the integrating of the addition profile type I am willing to compensate for your effort.

Comments

dasjo’s picture

hi danhimes,

you should be able to create other profile types using the profile2 module, that recruiter ships with. just go to admin/structure/profiles/add and proceed from there.

let us know if that works for you

danhimes’s picture

Hi dasjo,

Thanks for the reply~ Let me better clarify what I am trying to do. I have created the new profile type already. :) That part works well.

Now, I am trying to add the same features that the resume profile has. For example, the logic that automatically shows the resume as complete, incomplete, hidden. I think I can manage the rules part, but I noticed that there is some code in recruiter_resume.module that defined the required fields for the resume profile type.

function recruiter_resume_required_fields() {
  $required_fields = array(
    'field_resume_languages',
    'field_resume_personal_info',
    'field_resume_skills_general',
    'field_resume_skills_it',
    'field_resume_job_preferences',
    'field_resume_education',
  );
  drupal_alter('recruiter_resume_required_fields', $required_fields);
  return $required_fields;
}

The part I don't know is how to call a similar function for the new profile type. Is there a better way I can accomplish the same done/not done logic? Am I going about it the wrong way?

If I want the resume and new 'teacher_resume' profile types to have the same functionality within the Recruiter installation, what is the best way to achieve it?

Thanks and cheers!

dasjo’s picture

currently, i don't think you can apply the resume-state workflow to another profile type.

on a conceptual level i think you might either want to
- abstract the resume-state workflow that's currently implemented into a profile-state one and re-use for states for teacher_resume
- replicate the functionality separately for teacher_resume

option 1 might be trickier to implement but comes with less code duplication and could lead into a patch for recruiter so state logic becomes more resuable. option 2 should be more straight forward to do.

danhimes’s picture

I gotcha, I figured there would have to be some heavy lifting done. I might give #2 a try, but it would take me a great deal of trial and error.

dasjo, are you, or is anyone else out there available to do this for compensation? If so, send me a message.

Thanks, Dan

mh86’s picture

Category: feature » support

Actually, if you have your own custom profile type, there is no need to have the hook recruiter_resume_required_fields. This hook stores which fields need to be filled out before a resume can be marked as completed. On some Recruiter websites, the definition of required fields might be different, that's the reason we're having a hook and others can alter the information.

In an older version of the Recruiter we just used Rules conditions that checked each field, but this wasn't flexible enough for a generic distribution (altering of Rules is hard). If you have your own custom profile type, I would recommend you to just do it with Rules condition.

mh86’s picture

Status: Active » Fixed

Marking as fixed. If you still have some problems, feel free to re-open it.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.