Browse Source

Minor updating lang var.

Julio Montoya 10 years ago
parent
commit
8d71a839fe
2 changed files with 13 additions and 4 deletions
  1. 11 4
      plugin/courselegal/CourseLegalPlugin.php
  2. 2 0
      plugin/courselegal/lang/english.php

+ 11 - 4
plugin/courselegal/CourseLegalPlugin.php

@@ -258,10 +258,17 @@ class CourseLegalPlugin extends Plugin
 
         $subject = $this->get_lang("AgreementUpdated");
         $message = sprintf($this->get_lang("AgreementWasUpdatedClickHere"), $url);
-        $dataFile = array(
-            'path' => $filePath,
-            'filename' => basename($filePath),
-        );
+
+        $dataFile = array();
+        if (!empty($filePath)) {
+            $dataFile = array(
+                'path' => $filePath,
+                'filename' => basename($filePath),
+            );
+            $message = sprintf($this->get_lang("AgreementWasUpdatedClickHere"), $url)." \n";
+            $message .= $this->get_lang("TheAgreementIsAttachedInThisEmail");
+        }
+
         if (!empty($students)) {
             foreach ($students as $student) {
                 $userInfo = api_get_user_info($student['user_id']);

+ 2 - 0
plugin/courselegal/lang/english.php

@@ -18,6 +18,8 @@ $strings['ReSendMailAgreementLink'] = 'Re send mail agreement link';
 $strings['SendOnlyWarning'] = 'Send only warning';
 $strings['SendAgreementFile'] = 'Send warning and attach the agreement';
 $strings['NoSendWarning'] = 'No send warning';
+$strings['TheAgreementIsAttachedInThisEmail'] = 'A copy of the agreement is attached in this email';
+