[svn r17084] open chat in a new window and some improvements in chat

skala
Juan Carlos Raña 17 years ago
parent 590f468658
commit eda92da16e
  1. 46
      main/chat/chat.php
  2. 6
      main/chat/chat_chat.php
  3. 164
      main/chat/chat_message.php
  4. 2
      main/chat/chat_whoisonline.php
  5. 4
      main/course_home/activity.php
  6. 26
      main/course_info/infocours.php
  7. BIN
      main/img/smileys/flag_green_small.gif
  8. BIN
      main/img/smileys/flag_red_small.gif
  9. BIN
      main/img/smileys/flag_yellow_small.gif
  10. BIN
      main/img/smileys/icon_arrow.gif
  11. BIN
      main/img/smileys/icon_biggrin.gif
  12. BIN
      main/img/smileys/icon_confused.gif
  13. BIN
      main/img/smileys/icon_cool.gif
  14. BIN
      main/img/smileys/icon_eek.gif
  15. BIN
      main/img/smileys/icon_exclaim.gif
  16. BIN
      main/img/smileys/icon_hand.gif
  17. BIN
      main/img/smileys/icon_idea.gif
  18. BIN
      main/img/smileys/icon_neutral.gif
  19. BIN
      main/img/smileys/icon_question.gif
  20. BIN
      main/img/smileys/icon_razz.gif
  21. BIN
      main/img/smileys/icon_redface.gif
  22. BIN
      main/img/smileys/icon_sad.gif
  23. BIN
      main/img/smileys/icon_shhh.gif
  24. BIN
      main/img/smileys/icon_silenced.gif
  25. BIN
      main/img/smileys/icon_smile.gif
  26. BIN
      main/img/smileys/icon_snooty.gif
  27. BIN
      main/img/smileys/icon_surprised.gif
  28. BIN
      main/img/smileys/icon_think.gif
  29. BIN
      main/img/smileys/icon_wink.gif
  30. BIN
      main/img/smileys/waiting.gif
  31. 1
      main/inc/lib/add_course.lib.inc.php
  32. 24
      main/inc/tool_navigation_menu.inc.php
  33. 3
      main/install/migrate-db-1.8.5-1.8.6-pre.sql

@ -1,4 +1,4 @@
<?php // $Id: chat.php 17078 2008-12-04 23:23:53Z iflorespaz $
<?php // $Id: chat.php 17084 2008-12-06 16:44:47Z herodoto $
/*
==============================================================================
Dokeos - elearning and course management software
@ -81,6 +81,7 @@ if (!empty($mycourseid) && $mycourseid != -1)
}
}
$open_chat_window=api_get_course_setting('allow_open_chat_window');
}
switch($my_style){
@ -96,22 +97,37 @@ switch($my_style){
case 'baby_orange' :
$footer_size = 120;
break;
case 'public_admin' :
$footer_size = 90;
break;
default :
$footer_size = 48;
break;
}
$cidreq=$_GET['cidReq'];
?>
<frameset rows="130,*,<?php echo $footer_size;?>" border="0" frameborder="0" framespacing="1">
<frame src="chat_banner.php?<?php echo 'cidReq='.$cidreq; ?>" name="chat_banner" scrolling="no">
<frameset cols="200,*,0" border="1" frameborder="1" framespacing="1">
<frame src="chat_whoisonline.php?<?php echo 'cidReq='.$cidreq; ?>" name="chat_whoisonline" scrolling="auto">
<frameset rows="75,15" border="1" frameborder="1" framespacing="1">
<frame src="chat_chat.php?origin=<?php echo $_GET["origin"]; ?>&target=<?php echo $_GET["target"].'&amp;cidReq='.$cidreq; ?>" name="chat_chat" scrolling="auto">
<frame src="chat_message.php?<?php echo 'cidReq='.$cidreq; ?>" name="chat_message" scrolling="no">
</frameset>
<frame src="chat_hidden.php?<?php echo 'cidReq='.$cidreq; ?>" name="chat_hidden" scrolling="no">
</frameset>
<frame src="chat_footer.php?<?php echo 'cidReq='.$cidreq; ?>" name="chat_footer" scrolling="no">
</frameset>
</html>
echo '<html>';
echo'<HEAD><TITLE>'.get_lang('Chat').' - '.$mycourseid.' - '.api_get_setting('siteName').'</TITLE>';
if ($open_chat_window==false)
{
echo'<frameset rows="135,*,'.$footer_size.'" border="0" frameborder="0" framespacing="1">';
echo '<frame src="chat_banner.php?cidReq='.$cidreq.'" name="chat_banner" scrolling="no">';
}
echo '<frameset cols="200,*,0" border="1" frameborder="1" framespacing="1">';
echo '<frame src="chat_whoisonline.php?cidReq='.$cidreq.'" name="chat_whoisonline" scrolling="auto">';
echo'<frameset rows="50,15" border="1" frameborder="1" framespacing="1">';
echo '<frame src="chat_chat.php?origin='.$_GET["origin"].'&target='.$_GET["target"].'&amp;cidReq='.$cidreq.'" name="chat_chat" scrolling="auto">';
echo '<frame src="chat_message.php?cidReq='.$cidreq.'" name="chat_message" scrolling="no">';
echo '</frameset>';
echo '<frame src="chat_hidden.php?cidReq='.$cidreq.'" name="chat_hidden" scrolling="no">';
echo'</frameset>';
if ($open_chat_window==false)
{
echo '<frame src="chat_footer.php?cidReq='.$cidreq.'" name="chat_footer" scrolling="no">';
echo '</frameset>';
}
echo'<noframes></noframes>';
echo '</html>';
?>

@ -37,6 +37,7 @@ require('../inc/global.inc.php');
include(api_get_path(LIBRARY_PATH).'document.lib.php');
include (api_get_path(LIBRARY_PATH).'fileUpload.lib.php');
//$course=api_get_course_id();
$course=$_GET['cidReq'];
// if we have the session set up
@ -134,7 +135,7 @@ if (!empty($course))
echo '<div style="margin-left: 5px;">';
foreach($content as $thisLine)
{
echo strip_tags(html_entity_decode($thisLine),'<br> <span> <b>');
echo strip_tags(html_entity_decode($thisLine),'<br> <span> <b> <i> <img> <font>');
}
echo '</div>';
@ -152,7 +153,8 @@ if (!empty($course))
}
}
else
{ include('header_frame.inc.php');
{
include('header_frame.inc.php');
$message=get_lang('CloseOtherSession');
Display :: display_error_message($message);
}

@ -44,6 +44,30 @@ require('../inc/global.inc.php');
api_protect_course_script();
$course=api_get_course_id();
/////
// Juan Carlos Raña insert smileys
////
?>
<script language="javascript" type="text/javascript">
function insert_smile(text) {
if (text.createTextRange) {
text.smile = document.selection.createRange().duplicate();
}
}
function insert(text) {
var chat = document.formMessage.message;
if (chat.createTextRange && chat.smile) {
var smile = chat.smile;
smile.text = smile.text.charAt(smile.text.length - 1) == ' ' ? text + ' ' : text;
}
else chat.value += text;
chat.focus(smile)
}
</script>
<?php
// if we have the session set up
if (!empty($course))
{
@ -104,9 +128,92 @@ if (!empty($course))
$chat_size=0;
//define emoticons
$emoticon_text1='--)';
$emoticon_img1= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_arrow.gif" alt="'.get_lang('Arrow').'" title="'.get_lang('Arrow').'" />';
$emoticon_text2=':-D';
$emoticon_img2= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_biggrin.gif" alt="'.get_lang('BigGrin').'" title="'.get_lang('BigGrin').'" />';
$emoticon_text3='=8-o';
$emoticon_img3= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_eek.gif" alt="'.get_lang('Clap').'" title="'.get_lang('Clap').'" />';
$emoticon_text4=':-?';
$emoticon_img4= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_confused.gif" alt="'.get_lang('Confused').'" title="'.get_lang('Confused').'" />';
$emoticon_text5='8-)';
$emoticon_img5= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_cool.gif" alt="'.get_lang('Cool').'" title="'.get_lang('Cool').'" />';
$emoticon_text6=':!:';
$emoticon_img6= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_exclaim.gif" alt="'.get_lang('Exclaim').'" title="'.get_lang('Exclaim').'" />';
$emoticon_text7='=;';
$emoticon_img7= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_hand.gif" alt="'.get_lang('Hand').'" title="'.get_lang('Hand').'" />';
$emoticon_text8=';-)';
$emoticon_img8= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_wink.gif" alt="'.get_lang('Wink').'" title="'.get_lang('Wink').'" />';
$emoticon_text9=':-|)';
$emoticon_img9= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_neutral.gif" alt="'.get_lang('Neutral').'" title="'.get_lang('Neutral').'" />';
$emoticon_text10=':?:';
$emoticon_img10= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_question.gif" alt="'.get_lang('Question').'" title="'.get_lang('Question').'" />';
$emoticon_text11=':-P';
$emoticon_img11= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_razz.gif" alt="'.get_lang('Razz').'" title="'.get_lang('Razz').'" />';
$emoticon_text12=':-8';
$emoticon_img12= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_redface.gif" alt="'.get_lang('Redface').'" title="'.get_lang('Redface').'" />';
$emoticon_text13=':-(';
$emoticon_img13= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_sad.gif" alt="'.get_lang('Sad').'" title="'.get_lang('Sad').'" />';
$emoticon_text14=':-=';
$emoticon_img14= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_shhh.gif" alt="'.get_lang('Shhhh').'" title="'.get_lang('Shhhh').'" />';
$emoticon_text15=':-#)';
$emoticon_img15= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_silenced.gif" alt="'.get_lang('Silenced').'" title="'.get_lang('Silenced').'" />';
$emoticon_text16=':-)';
$emoticon_img16= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_smile.gif" alt="'.get_lang('Smile').'" title="'.get_lang('Smile').'" />';
$emoticon_text17=':-o)';
$emoticon_img17= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_surprised.gif" alt="'.get_lang('Surprised').'" title="'.get_lang('Surprised').'" />';
$emoticon_text18=':-k';
$emoticon_img18= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_think.gif" alt="'.get_lang('Think').'" title="'.get_lang('Think').'" />';
$emoticon_text19=':-((';
$emoticon_img19= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_snooty.gif" alt="'.get_lang('Snooty').'" title="'.get_lang('Snooty').'" />';
$emoticon_text20='0-';
$emoticon_img20= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/icon_idea.gif" alt="'.get_lang('Idea').'" title="'.get_lang('Idea').'" />';
//
$emoticon_text201='*';
$emoticon_img201= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/waiting.gif" alt="'.get_lang('AskPermissionSpeak').'" title="'.get_lang('AskPermissionSpeak').'" />';
$emoticon_text202=':speak:';
$emoticon_img202= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/flag_green_small.gif" alt="'.get_lang('GiveTheFloorTo').'" title="'.get_lang('GiveTheFloorTo').'" />';
$emoticon_text203=':pause:';
$emoticon_img203= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/flag_yellow_small.gif" alt="'.get_lang('Pause').'" title="'.get_lang('Pause').'" />';
$emoticon_text204=':stop:';
$emoticon_img204= '<img src="'.api_get_path(WEB_IMG_PATH).'smileys/flag_red_small.gif" alt="'.get_lang('Stop').'" title="'.get_lang('Stop').'" />';
if($sent)
{
$message=trim(htmlspecialchars(stripslashes($_POST['message']),ENT_QUOTES,$charset));
$message=str_replace($emoticon_text1, $emoticon_img1, $message);
$message=str_replace($emoticon_text2, $emoticon_img2, $message);
$message=str_replace($emoticon_text3, $emoticon_img3, $message);
$message=str_replace($emoticon_text4, $emoticon_img4, $message);
$message=str_replace($emoticon_text5, $emoticon_img5, $message);
$message=str_replace($emoticon_text6, $emoticon_img6, $message);
$message=str_replace($emoticon_text7, $emoticon_img7, $message);
$message=str_replace($emoticon_text8, $emoticon_img8, $message);
$message=str_replace($emoticon_text9, $emoticon_img9, $message);
$message=str_replace($emoticon_text10, $emoticon_img10, $message);
$message=str_replace($emoticon_text11, $emoticon_img11, $message);
$message=str_replace($emoticon_text12, $emoticon_img12, $message);
$message=str_replace($emoticon_text13, $emoticon_img13, $message);
$message=str_replace($emoticon_text14, $emoticon_img14, $message);
$message=str_replace($emoticon_text15, $emoticon_img15, $message);
$message=str_replace($emoticon_text16, $emoticon_img16, $message);
$message=str_replace($emoticon_text17, $emoticon_img17, $message);
$message=str_replace($emoticon_text18, $emoticon_img18, $message);
$message=str_replace($emoticon_text19, $emoticon_img19, $message);
$message=str_replace($emoticon_text20, $emoticon_img20, $message);
//
$message=str_replace($emoticon_text201, $emoticon_img201, $message);
$message=str_replace($emoticon_text202, $emoticon_img202, $message);
$message=str_replace($emoticon_text203, $emoticon_img203, $message);
$message=str_replace($emoticon_text204, $emoticon_img204, $message);
$timeNow=date('d/m/y H:i:s');
if(!empty($message))
{
@ -128,12 +235,14 @@ if (!empty($course))
if($isMaster)
{
fputs($fp,'<span id="chat_login_name"><b>'.$firstname.' '.$lastname.'</b></span> : '.$message.'<br>'."\n");
$photo= '<img src="'.api_get_path(WEB_IMG_PATH).'teachers.gif" alt="'.$firstname.' '.$lastname.'" width="11" height="11" align="top" title="'.$firstname.' '.$lastname.'" />';
fputs($fp,'<font color="#CCCCCC" size="-2">['.$timeNow.']</font>'.$photo.' <span id="chat_login_name"><b>'.$firstname.' '.$lastname.'</b></span> : <i>'.$message.'</i><br>'."\n");
}
else
{
fputs($fp,"<b>$firstname $lastname</b> : $message<br>\n");
$photo= '<img src="'.api_get_path(WEB_IMG_PATH).'students.gif" alt="'.$firstname.' '.$lastname.'" width="11" height="11" align="top" title="'.$firstname.' '.$lastname.'" />';
fputs($fp,'<font color="#CCCCCC" size="-2">['.$timeNow.']</font>'.$photo.' <b>'.$firstname.' '.$lastname.'</b> : <i>'.$message.'</i><br>'."\n");
}
fclose($fp);
@ -149,16 +258,51 @@ if (!empty($course))
<input type="hidden" name="sent" value="1">
<table border="0" cellpadding="5" cellspacing="0" width="100%">
<tr>
<td width="520" valign="middle">
<textarea name="message" style="width: 520px; height: 35px" onkeydown="send_message(event);"></textarea>
</td>
<td>
<input type="submit" value="<?php echo get_lang("Send"); ?>" class="background_submit">
</td>
<td width="420" valign="middle">
<textarea name="message" style="width: 420px; height: 35px" onkeydown="send_message(event);" onclick="javascript:insert_smile(this);"></textarea>
</td>
<td>
<input type="submit" value="<?php echo get_lang("Send"); ?>" class="background_submit">
</td>
</tr>
<tr>
<td>
<?php
echo "<a href=\"javascript:insert('".$emoticon_text1."')\">".$emoticon_img1."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text2."')\">".$emoticon_img2."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text3."')\">".$emoticon_img3."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text4."')\">".$emoticon_img4."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text5."')\">".$emoticon_img5."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text6."')\">".$emoticon_img6."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text7."')\">".$emoticon_img7."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text8."')\">".$emoticon_img8."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text9."')\">".$emoticon_img9."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text10."')\">".$emoticon_img10."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text11."')\">".$emoticon_img11."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text12."')\">".$emoticon_img12."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text13."')\">".$emoticon_img13."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text14."')\">".$emoticon_img14."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text15."')\">".$emoticon_img15."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text16."')\">".$emoticon_img16."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text17."')\">".$emoticon_img17."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text18."')\">".$emoticon_img18."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text19."')\">".$emoticon_img19."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text20."')\">".$emoticon_img20."</a>";
?>
</td>
<td>
<?php
echo "<a href=\"javascript:insert('".$emoticon_text201."')\">".$emoticon_img201."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text202."')\">".$emoticon_img202."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text203."')\">".$emoticon_img203."</a>";
echo "<a href=\"javascript:insert('".$emoticon_text204."')\">".$emoticon_img204."</a>";
?>
</td>
</tr>
</table>
</form>
<?php
</form>
<?php
}
include('footer_frame.inc.php');
?>

@ -129,4 +129,4 @@ if (!empty($course))
<?php
}
include('footer_frame.inc.php');
?>
?>

@ -295,6 +295,10 @@ function show_tools_category($course_tool_category)
{
$toollink = "\t" . '<a ' . $class . ' href="#" onclick="window.open(\'' . htmlspecialchars($toolsRow['link']) . '\',\'window_visio\',config=\'height=\'+730+\', width=\'+1020+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $toolsRow['target'] . '">';
}
if(strpos($toolsRow['name'],'chat')!==false && api_get_course_setting('allow_open_chat_window')==true)
{
$toollink = "\t" . '<a ' . $class . ' href="#" onclick="window.open(\'' . htmlspecialchars($toolsRow['link']) . '\',\'window_chat\',config=\'height=\'+480+\', width=\'+725+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $toolsRow['target'] . '">';
}
else
{
$toollink = "\t" . '<a ' . $class . ' href="' . htmlspecialchars($toolsRow['link']) . '" target="' . $toolsRow['target'] . '">';

@ -1,4 +1,4 @@
<?php // $Id: infocours.php 16724 2008-11-12 15:42:23Z pcool $
<?php // $Id: infocours.php 17084 2008-12-06 16:44:47Z herodoto $
/*
==============================================================================
@ -184,8 +184,6 @@ $form->addElement('static', null, null, get_lang("ConfTip"));
$form->add_textfield('course_registration_password', get_lang('CourseRegistrationPassword'), false, array ('size' => '60'));
$form->addElement('html','<div class="sectiontitle" style="margin-top: 40px;">'.get_lang('EmailNotifications').'</div>');
$form->addElement('radio', 'email_alert_manager_on_new_doc', get_lang('WorkEmailAlert'), get_lang('WorkEmailAlertActivate'), 1);
$form->addElement('radio', 'email_alert_manager_on_new_doc', null, get_lang('WorkEmailAlertDeactivate'), 0);
@ -199,8 +197,6 @@ $form->addElement('radio', 'email_alert_manager_on_new_quiz', get_lang('QuizEmai
$form->addElement('radio', 'email_alert_manager_on_new_quiz', null, get_lang('QuizEmailAlertDeactivate'), 0);
$form->addElement('html','<div class="sectiontitle" style="margin-top: 40px;">'.get_lang('UserRights').'</div>');
$form->addElement('radio', 'allow_user_edit_agenda', get_lang('AllowUserEditAgenda'), get_lang('AllowUserEditAgendaActivate'), 1);
$form->addElement('radio', 'allow_user_edit_agenda', null, get_lang('AllowUserEditAgendaDeactivate'), 0);
@ -214,7 +210,10 @@ $form->addElement('radio', 'allow_user_image_forum', get_lang('AllowUserImageFor
$form->addElement('radio', 'allow_user_image_forum', null, get_lang('AllowUserImageForumDeactivate'), 0);
$form -> addElement('html',$linebreak);
$form->addElement('html','<div class="sectiontitle" style="margin-top: 40px;">'.get_lang('ConfigChat').'</div>');
$form->addElement('radio', 'allow_open_chat_window', get_lang('AllowOpenchatWindow'), get_lang('AllowOpenChatWindowActivate'), 1);
$form->addElement('radio', 'allow_open_chat_window', null, get_lang('AllowOpenChatWindowDeactivate'), 0);
$form -> addElement('html',$linebreak);
// Course theme picker
if (api_get_setting('allow_course_theme') == 'true')
@ -224,16 +223,13 @@ if (api_get_setting('allow_course_theme') == 'true')
//Allow Learning path
$form->addElement('radio', 'allow_learning_path_theme', get_lang('AllowLearningPathTheme'), get_lang('AllowLearningPathThemeAllow'), 1);
$form->addElement('radio', 'allow_learning_path_theme', null, get_lang('AllowLearningPathThemeDisallow'), 0);
$form -> addElement('html',$linebreak);
$form -> addElement('html',$linebreak);
$form->addElement('select_theme', 'course_theme', get_lang('Theme'));
$form->applyFilter('course_theme', 'trim');
$form -> addElement('html',$linebreak);
}
$form->addElement('static', null, null, get_lang("ConfTip"));
$form->add_textfield('course_registration_password', get_lang('CourseRegistrationPassword'), false, array ('size' => '60'));
if (is_settings_editable())
{
$form->addElement('submit', null, get_lang('Ok'));
@ -275,6 +271,8 @@ $values['allow_user_edit_agenda'] = api_get_course_setting('allow_user_edit_agen
$values['allow_user_edit_announcement'] = api_get_course_setting('allow_user_edit_announcement');
// get allow_user_image_forum from table
$values['allow_user_image_forum'] = api_get_course_setting('allow_user_image_forum');
// get allow_open_chat_window from table
$values['allow_open_chat_window'] = api_get_course_setting('allow_open_chat_window');
// get course_theme from table
$values['course_theme'] = api_get_course_setting('course_theme');
// get allow_learning_path_theme from table
@ -330,7 +328,11 @@ if ($form->validate() && is_settings_editable())
if($update_values['allow_user_image_forum'] != $values['allow_user_image_forum']){
$sql = "UPDATE $table_course_setting SET value = ".(int)$update_values['allow_user_image_forum']." WHERE variable = 'allow_user_image_forum' ";
api_sql_query($sql,__FILE__,__LINE__);
}
}
if($update_values['allow_open_chat_window'] != $values['allow_open_chat_window']){
$sql = "UPDATE $table_course_setting SET value = ".(int)$update_values['allow_open_chat_window']." WHERE variable = 'allow_open_chat_window' ";
api_sql_query($sql,__FILE__,__LINE__);
}
if($update_values['course_theme'] != $values['course_theme']){
$sql = "UPDATE $table_course_setting SET value = '".$update_values['course_theme']."' WHERE variable = 'course_theme' ";
api_sql_query($sql,__FILE__,__LINE__);

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -2005,6 +2005,7 @@ function fill_Db_course($courseDbName, $courseRepository, $language,$default_doc
api_sql_query("INSERT INTO `".$TABLESETTING . "`(variable,value,category) VALUES ('allow_user_image_forum',1,'forum')", __FILE__, __LINE__);
api_sql_query("INSERT INTO `".$TABLESETTING . "`(variable,value,category) VALUES ('course_theme','','theme')", __FILE__, __LINE__);
api_sql_query("INSERT INTO `".$TABLESETTING . "`(variable,value,category) VALUES ('allow_learning_path_theme','1','theme')", __FILE__, __LINE__);
api_sql_query("INSERT INTO `".$TABLESETTING . "`(variable,value,category) VALUES ('allow_open_chat_window',0,'chat')", __FILE__, __LINE__);
/*
-----------------------------------------------------------
Course homepage tools for platform admin only

@ -1,5 +1,5 @@
<?php
// $Id: tool_navigation_menu.inc.php 16040 2008-08-21 13:48:58Z yannoo $
// $Id: tool_navigation_menu.inc.php 17084 2008-12-06 16:44:47Z herodoto $
/*
==============================================================================
Dokeos - elearning and course management software
@ -198,7 +198,16 @@ function show_navigation_menu()
echo '<dd>';
$url_item = parse_url($navigation_item['link']);
$url_current = parse_url($_SERVER['REQUEST_URI']);
echo '<a href="'.$navigation_item['link'].'"';
if (strpos($navigation_item['link'],'chat')!==false && api_get_course_setting('allow_open_chat_window')==true)
{
echo '<a href="#" onclick="window.open(\''.$navigation_item['link'].'\',\'window_chat\',config=\'height=\'+480+\', width=\'+725+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $navigation_item['target'] . '"';
}
else
{
echo '<a href="'.$navigation_item['link'].'"';
}
if (stristr($url_item['path'],$url_current['path']))
{
if(! isset($_GET['learnpath_id']) || strpos($url_item['query'],'learnpath_id='.$_GET['learnpath_id']) === 0)
@ -242,7 +251,16 @@ function show_navigation_tool_shortcuts($orientation = SHORTCUTS_HORIZONTAL)
$navigation_items = get_navigation_items(false);
foreach ($navigation_items as $key => $navigation_item)
{
echo '<a href="'.$navigation_item['link'].'"';
if (strpos($navigation_item['link'],'chat')!==false && api_get_course_setting('allow_open_chat_window')==true)
{
echo '<a href="#" onclick="window.open(\''.$navigation_item['link'].'\',\'window_chat\',config=\'height=\'+480+\', width=\'+725+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="' . $navigation_item['target'] . '"';
}
else
{
echo '<a href="'.$navigation_item['link'].'"';
}
if (strpos(api_get_self(), $navigation_item['link']) !== false)
{
echo ' id="here"';

@ -130,4 +130,5 @@ ALTER TABLE forum_thread ADD thread_weight smallint default 0;
ALTER TABLE forum_notification CHANGE post_id post_id INT NULL;
ALTER TABLE quiz_answer CHANGE hotspot_coordinates hotspot_coordinates text;
ALTER TABLE group_info ADD forum_state TINYINT NULL AFTER announcements_state;
CREATE TABLE calendar_event_attachment ( id int NOT NULL auto_increment, path varchar(255) NOT NULL, comment text, size int NOT NULL default 0, agenda_id int NOT NULL, filename varchar(255) NOT NULL, PRIMARY KEY (id) );
CREATE TABLE calendar_event_attachment ( id int NOT NULL auto_increment, path varchar(255) NOT NULL, comment text, size int NOT NULL default 0, agenda_id int NOT NULL, filename varchar(255) NOT NULL, PRIMARY KEY (id) );
INSERT INTO course_setting(variable,value,category) VALUES ('allow_open_chat_window',0,'chat');
Loading…
Cancel
Save