forumbody.inc.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. $current_thread = get_thread_information($_GET['thread']);
  4. $my_cid_req = Security::remove_XSS($_GET['cidReq']);
  5. $my_forum = Security::remove_XSS($_GET['forum']);
  6. $my_thread = Security::remove_XSS($_GET['thread']);
  7. $my_user_id = Security::remove_XSS($_GET['user_id']);
  8. $user = Security::remove_XSS($_GET['user']);
  9. $my_idtextqualify = isset($_REQUEST['idtextqualify']) ? Security::remove_XSS($_REQUEST['idtextqualify']) : $qualify;
  10. $my_gradebook = Security::remove_XSS($_GET['gradebook']);
  11. $to_origin = Security::remove_XSS($_GET['origin']);
  12. $output = <<<EOF
  13. <div class="forum-body-form">
  14. <table class="data_table">
  15. <form id="forum-thread-qualify" name="forum-thread-qualify" action="forumqualify.php">
  16. <input type="hidden" name="cidReq" value="{$my_cid_req}">
  17. <input type="hidden" name="forum" value="{$my_forum}">
  18. <input type="hidden" name="thread" value="{$my_thread}">
  19. <input type="hidden" name="user" value="{$user}">
  20. <input type="hidden" name="user_id" value="{$my_user_id}">
  21. <input type="hidden" name="gradebook" value="{$my_gradebook}">
  22. <input type="hidden" name="origin" value="{$to_origin}">
  23. <tr>
  24. EOF;
  25. $output .= '
  26. <td width="40%" class="forum-thread-header">'.get_lang('Thread').'&nbsp;:</td >
  27. <td width="60%" class="forum-thread-body">
  28. <div align="left">'.$current_thread['thread_title'].'</div>
  29. </td>
  30. </tr>
  31. <tr>
  32. <td width="40%" class="forum-thread-header">'.get_lang('CourseUsers').'&nbsp;:</td >
  33. <td width="60%" class="forum-thread-body">
  34. <div align="left">'.$result['user_course'].'</div>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td width="40%" class="forum-thread-header">'.get_lang('PostsNumber').'&nbsp;:</td >
  39. <td width="60%" class="forum-thread-body">
  40. <div align="left">'.$result['post'].'</div>
  41. </td>
  42. </tr>
  43. <tr>
  44. <td width="40%" class="forum-thread-header">'.get_lang('NumberOfPostsForThisUser').'&nbsp;:</td >
  45. <td width="60%" class="forum-thread-body">
  46. <div align="left">'.$result['user_post'].'</div>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td width="40%" class="forum-thread-header">'.get_lang('AveragePostPerUser').'&nbsp;:</td >
  51. <td width="60%" class="forum-thread-body">
  52. <div align="left">'.round($result['user_post']/$result['post'],2).'</div>
  53. </td>
  54. </tr>
  55. <tr>
  56. <td width="40%" class="forum-thread-header"><div align="left">'.get_lang('Qualification').'&nbsp;:</div></td >
  57. <td width="60%" class="forum-thread-body"><div align="left">
  58. <input type="text" maxlength="8" id="idtextqualify" style="width:60px;" name="idtextqualify" value="'.$my_idtextqualify.'" />&nbsp;&nbsp;'.get_lang('MaxScore').'&nbsp;: '.$max_qualify.'</div>
  59. </td>
  60. </tr>
  61. <tr>
  62. <td width="40%"></td>
  63. <td width="60%"><div align="left"><button type="button" class="save" id="idbutton_qualify" name="idbutton_qualify" value="'.get_lang('QualifyThisThread').'" onclick="javascript:if(document.getElementById(\'idtextqualify\').value>=0){if(confirm(\''.get_lang('ConfirmUserQualification').'\')){document.getElementById(\'forum-thread-qualify\').submit();}else{return false;};}else{alert(\''.get_lang('InsertQualificationCorrespondingToMaxScore').'\')};" >'.get_lang('QualifyThisThread').'</button></div></td>
  64. </tr>
  65. </form>
  66. </table>
  67. </div>';
  68. echo $output;