} ?> <?php if (User::isCurrentUserDomMentor()) { ?> <b>Domain Mentor </b><br> <?php } ?> <?php if (User::isCurrentUserPerMentor()) { ?> <b>Personal Mentor </b><br> <?php } ?> <?php if (User::isCurrentUserProMentor()) { ?> <b>Project Mentor </b> <br><?php } ?> <?php if (User::isCurrentUserMentee()) { ?> <b>Mentee</b> <br><?php } ?> <br> <br> <br>
?> <?php $projectsByCurrentUser = Project::getMenteeProjects(User::getCurrentUserId()); if (count($projectsByCurrentUser) > 0) { $model->assigned_project_id = $projectsByCurrentUser[0]->id; } echo $form->dropDownList($model, 'assigned_project_id', CHtml::listData($projectsByCurrentUser, 'id', 'title'), array('empty' => ' ')); ?> <?php echo $form->error($model, 'assigned_project_id'); ?> <?php /* If the user if project mentor. He has the option of assign the ticket to another project mentor */ if (User::isCurrentUserProMentor() || User::isCurrentUserAdmin()) { $pmentor = User::model()->findAll("isProMentor=:isProMentor and id!=:id", array(':isProMentor' => 1, ':id' => User::model()->getCurrentUserId())); //select * from user where isProMentor = '1' AND username != 'lsanc104' $data = array(); foreach ($pmentor as $mod) { $data[$mod->id] = $mod->fname . ' ' . $mod->lname; } ?> <?php echo $form->labelEx($model, 'Assign to a Project Mentor (optional)'); ?> <?php echo $form->dropDownList($model, 'assign_user_id', $data, array('prompt' => 'Select')); ?> <?php echo $form->error($model, 'assign_user_id');