diff --git a/main/inc/lib/exercise_show_functions.lib.php b/main/inc/lib/exercise_show_functions.lib.php new file mode 100644 index 0000000000..261f362829 --- /dev/null +++ b/main/inc/lib/exercise_show_functions.lib.php @@ -0,0 +1,341 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
+
+
+ + + + + + + + + '.nl2br(make_clickable($answerComment)).''; + } else { + echo ''.nl2br(make_clickable($answerComment)).''; + } + ?> + + +   + + + + + + + + + +  + + + + + + + + '.nl2br(make_clickable($answerComment)).''; + } + else{ + echo ''.nl2br(make_clickable($answerComment)).''; + } + } + else + { + echo ' '; + } + ?> + + + +   + + + + + '; + if(count($arrques)>0) { + $msg .= ' +

'.get_lang('OpenQuestionsAttempted').' : +

+

'.get_lang('AttemptDetails').' :
+

+ + + + + + + + + + + + + + + + +

  '.get_lang('CourseName').'

#course#

  '.get_lang('TestAttempted').'#exercise#
  '.get_lang('StudentName').'#firstName# #lastName#
  '.get_lang('StudentEmail').' #mail#
+


'.get_lang('OpenQuestionsAttemptedAre').' :

+ '; + + for($i=0;$i + + + + + + '; + + $msg1= str_replace("#exercise#",$exerciseTitle,$msg); + $msg= str_replace("#firstName#",$user_info['firstname'],$msg1); + $msg1= str_replace("#lastName#",$user_info['lastname'],$msg); + $msg= str_replace("#mail#",$user_info['email'],$msg1); + $msg1= str_replace("#questionName#",$arrques[$i],$msg); + $msg= str_replace("#answer#",$arrans[$i],$msg1); + $msg1= str_replace("#i#",$i,$msg); + $msg= str_replace("#course#",$courseName,$msg1); + } + $msg.='
#questionName#
  '.get_lang('Answer').' #answer#

+ '.get_lang('ClickToCommentAndGiveFeedback').',
+ #url#
'; + + $msg1= str_replace("#url#",$url_email,$msg); + $mail_content = $msg1; + + $subject = get_lang('OpenQuestionsAttempted'); + + + $sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS); + $email_admin = api_get_setting('emailAdministrator'); + $result = @api_mail_html('', $to, $subject, $mail_content, $sender_name, $email_admin, array('charset'=>$mycharset)); + } else { + + $msg .= ' +

'.get_lang('ExerciseAttempted').'
+

+ + + + + + + + + + + + '.(api_is_western_name_order() ? '' : '').' + + + + +

  '.get_lang('CourseName').'

#course#

  '.get_lang('TestAttempted').'#exercise#
  '.get_lang('StudentName').'#firstName# #lastName##lastName# #firstName#
  '.get_lang('StudentEmail').' #mail#
'; + + $msg= str_replace("#exercise#",$exerciseTitle,$msg); + $msg= str_replace("#firstName#",$user_info['firstname'],$msg); + $msg= str_replace("#lastName#",$user_info['lastname'],$msg); + $msg= str_replace("#mail#",$user_info['email'],$msg); + $msg= str_replace("#course#",$courseName,$msg); + + $msg.='
+ '.get_lang('ClickToCommentAndGiveFeedback').',
+ #url#
'; + + $msg= str_replace("#url#",$url_email,$msg); + $mail_content = $msg; + + $sender_name = api_get_person_name(api_get_setting('administratorName'), api_get_setting('administratorSurname'), null, PERSON_NAME_EMAIL_ADDRESS); + $email_admin = api_get_setting('emailAdministrator'); + + $subject = get_lang('ExerciseAttempted'); + $result = @api_mail_html('', $to, $subject, $mail_content, $sender_name, $email_admin, array('charset'=>$mycharset)); + } + } +} \ No newline at end of file