Proyectos de Subversion Moodle

Rev

Rev 1333 | Rev 1358 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1333 Rev 1334
Línea 5979... Línea 5979...
5979
    if (empty($mail->MessageID)) {
5979
    if (empty($mail->MessageID)) {
5980
        $mail->MessageID = generate_email_messageid();
5980
        $mail->MessageID = generate_email_messageid();
5981
    }
5981
    }
Línea 5982... Línea 5982...
5982
 
5982
 
5983
    if ($messagehtml && !empty($user->mailformat) && $user->mailformat == 1) {
5983
    if ($messagehtml && !empty($user->mailformat) && $user->mailformat == 1) {
5984
        // Obtener las URLs correctamente
-
 
Línea -... Línea 5984...
-
 
5984
        global $CFG; // Necesario para usar $CFG->wwwroot
5985
        $themeconfig = \theme_config::load('universe_child');
5985
 
5986
 
5986
        // Construir URLs de imágenes basadas en el dominio del sitio
Línea 5987... Línea 5987...
5987
        $header_image_url = $themeconfig->image_url('logo-horizontal-cesa', 'theme')->out(false);
5987
        $header_image_url = $CFG->wwwroot . '/theme/universe_child/pix/logo-horizontal-cesa.png';
5988
        $footer_image_url = $themeconfig->image_url('email-footer', 'theme')->out(false);
5988
        $footer_image_url = $CFG->wwwroot . '/theme/universe_child/pix/email-footer.png';
5989
 
5989
 
5990
        // Armar HTML del header
5990
        // Armado del Header
Línea 5991... Línea 5991...
5991
        $header_html = '<div style="text-align:center; margin-bottom:20px;">'
5991
        $header_html = '<div style="text-align:center; margin-bottom:20px;">'
5992
            . '<img src="' . $header_image_url . '" alt="Header Image" style="max-width:100%; height:auto;">'
5992
            . '<img src="' . $header_image_url . '" alt="Header Image" style="max-width:100%; height:auto;">'
5993
            . '</div>';
5993
            . '</div>';
5994
 
5994
 
Línea 5995... Línea 5995...
5995
        // Armar HTML del footer
5995
        // Armado del Footer
5996
        $footer_html = '<div style="text-align:center; margin-top:40px;">'
5996
        $footer_html = '<div style="text-align:center; margin-top:40px;">'
Línea 5997... Línea 5997...
5997
            . '<img src="' . $footer_image_url . '" alt="Footer Image" style="max-width:100%; height:auto;">'
5997
            . '<img src="' . $footer_image_url . '" alt="Footer Image" style="max-width:100%; height:auto;">'
5998
            . '</div>';
5998
            . '</div>';
5999
 
5999
 
6000
        // Armamos el nuevo body: header + contenido original + footer
6000
        // Unir todo: Header + Contenido original + Footer
6001
        $full_html_message = $header_html . $messagehtml . $footer_html;
6001
        $full_html_message = $header_html . $messagehtml . $footer_html;
6002
 
6002
 
6003
        $mail->isHTML(true);
6003
        $mail->isHTML(true);
6004
        $mail->Encoding = 'quoted-printable';
6004
        $mail->Encoding = 'quoted-printable';