Fix user pictures, boss accept mail response - refs BT#9092

1.10.x
Daniel Barreto 10 years ago
parent 9efadb77bb
commit fbbbf7985c
  1. 11
      plugin/advancedsubscription/ajax/advsub.ajax.php
  2. 2
      plugin/advancedsubscription/src/AdvancedSubscriptionPlugin.class.php
  3. 4
      plugin/advancedsubscription/src/admin_view.php
  4. 7
      plugin/advancedsubscription/views/advsub_request_approve_confirmed.tpl
  5. 2
      plugin/advancedsubscription/views/advsub_request_superior.tpl
  6. 2
      plugin/advancedsubscription/views/advsub_request_superior_reminder.tpl
  7. 2
      plugin/advancedsubscription/views/advsub_request_superior_reminder_max.tpl

@ -79,6 +79,8 @@ if (!empty($a) && !empty($u)) {
$var = $extraSession->get_values_by_handler_and_field_variable($s, 'recommended_number_of_participants');
$sessionArray['recommended_number_of_participants'] = $var['field_valiue'];
$studentArray = api_get_user_info($u);
$studentArray['picture'] = UserManager::get_user_picture_path_by_id($studentArray['user_id'], 'web', false, true);
$studentArray['picture'] = UserManager::get_picture_user($studentArray['user_id'], $studentArray['picture']['file'], 22, USER_IMAGE_SIZE_MEDIUM);
$superiorId = UserManager::getStudentBoss($u);
if (!empty($superiorId)) {
$superiorArray = api_get_user_info($superiorId);
@ -187,7 +189,14 @@ if (!empty($a) && !empty($u)) {
$var = $extraSession->get_values_by_handler_and_field_variable($s, 'recommended_number_of_participants');
$sessionArray['recommended_number_of_participants'] = $var['field_valiue'];
$studentArray = api_get_user_info($u);
$superiorArray = api_get_user_info(UserManager::getStudentBoss($u));
$studentArray['picture'] = UserManager::get_user_picture_path_by_id($studentArray['user_id'], 'web', false, true);
$studentArray['picture'] = UserManager::get_picture_user($studentArray['user_id'], $studentArray['picture']['file'], 22, USER_IMAGE_SIZE_MEDIUM);
$superiorId = UserManager::getStudentBoss($u);
if (!empty($superiorId)) {
$superiorArray = api_get_user_info($superiorId);
} else {
$superiorArray = null;
}
$adminsArray = UserManager::get_all_administrators();
foreach ($adminsArray as &$admin) {
$admin['complete_name'] = $admin['lastname'] . ', ' . $admin['firstname'];

@ -407,7 +407,7 @@ class AdvancedSubscriptionPlugin extends Plugin implements HookPluginInterface
$data['u'],
$data['superior']['user_id'],
$this->get_lang('MailStudentRequest'),
$tpl->fetch('/advancedsubscription/views/advsub_request_approved_info_admin.tpl'),
$tpl->fetch('/advancedsubscription/views/advsub_request_approve_confirmed.tpl'),
$data['s']
);
// Mail to admin

@ -85,8 +85,8 @@ if (!empty($s)) {
$data['e'] = ADV_SUB_QUEUE_STATUS_ADMIN_DISAPPROVED;
$student['dataDisapprove'] = $plugin->encrypt($data);
$student['complete_name'] = $student['lastname'] . ', ' . $student['firstname'];
$student['picture'] = UserManager::get_user_picture_path_by_id($user[0], 'web', false, true);
$student['picture'] = UserManager::get_picture_user($user[0], $student['picture']['file'], 22, USER_IMAGE_SIZE_MEDIUM);
$student['picture'] = UserManager::get_user_picture_path_by_id($student['user_id'], 'web', false, true);
$student['picture'] = UserManager::get_picture_user($student['user_id'], $student['picture']['file'], 22, USER_IMAGE_SIZE_MEDIUM);
}
$tpl->assign('session', $studentList['session']);
$tpl->assign('students', $studentList['students']);

@ -59,9 +59,10 @@
<tr>
<td height="356">&nbsp;</td>
<td valign="top"><p>Estimado:</p>
<h2>{{ student.complete_name }}</h2>
<p>Lamentamos informarle que, en esta oportunidad, su inscripción al curso <strong>{{ session.name }}</strong> NO ha sido aprobada. Esperamos mantenga todo su ánimo y participe en otro curso o, en otra oportunidad, a este mismo curso.</p>
<p>Gracias.</p>
<h2>{{ superior.complete_name }}</h2>
<p>Hemos recibido y registrado su decisión de aprobar el curso <strong>{{ session.name }}</strong> para su colaborador <strong>{{ student.complete_name }}</strong></p>
<p>Ahora la inscripción al curso está pendiente de la disponibilidad de cupos. Le mantendremos informado sobre el resultado de esta etapa</p>
<p>Gracias por su colaboración.</p>
<h3>{{ signature }}</h3></td>
<td>&nbsp;</td>
</tr>

@ -64,7 +64,7 @@
<p>Le invitamos a aprobar o desarprobar esta inscripción, dando clic en el botón correspondiente a continuación.</p>
<table width="100%" border="0" cellspacing="3" cellpadding="4" style="background:#EDE9EA">
<tr>
<td width="58" valign="middle"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/avatar.png" width="50" height="50" alt=""></td>
<td width="58" valign="middle"><img src="{{ student.picture.file }}" width="50" height="50" alt=""></td>
<td width="211" valign="middle"><h4>{{ student.complete_name }}</h4></td>
<td width="90" valign="middle"><a href="{{ acceptUrl }}"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/aprobar.png" width="90" height="25" alt=""></a></td>
<td width="243" valign="middle"><a href="{{ rejectUrl }}"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/desaprobar.png" width="90" height="25" alt=""></a></td>

@ -65,7 +65,7 @@
<table width="100%" border="0" cellspacing="3" cellpadding="4" style="background:#EDE9EA">
{% for student in students %}
<tr>
<td valign="middle"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/avatar.png" width="50" height="50" alt=""></td>
<td valign="middle"><img src="{{ student.picture.file }}" width="50" height="50" alt=""></td>
<td valign="middle"><h4>{{ student.complete_name }}</h4></td>
<td valign="middle"><a href="{{ student.acceptUrl }}"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/aprobar.png" width="90" height="25" alt=""></a></td>
<td valign="middle"><a href="{{ student.rejectUrl }}"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/desaprobar.png" width="90" height="25" alt=""></a></td>

@ -65,7 +65,7 @@
<table width="100%" border="0" cellspacing="3" cellpadding="4" style="background:#EDE9EA">
{% for student in students %}
<tr>
<td valign="middle"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/avatar.png" width="50" height="50" alt=""></td>
<td valign="middle"><img src="{{ student.picture.file }}" width="50" height="50" alt=""></td>
<td valign="middle"><h4>{{ student.complete_name }}</h4></td>
<td valign="middle"><a href="{{ student.approveUrl }}"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/aprobar.png" width="90" height="25" alt=""></a></td>
<td valign="middle"><a href="{{ student.rejectUrl }}"><img src="{{ _p.web_plugin }}advancedsubscription/views/img/desaprobar.png" width="90" height="25" alt=""></a></td>

Loading…
Cancel
Save