next up previous contents
Next: 會議室編輯 Up: Openmeetings 優化 Previous: 修改 icon   Contents

模組函式

  1. 修改會議室更新設定,在會議室設定為播放錄影,不能變更為會議室,否則會找不到會議室而出錯,room_id=0 代表此會議室為播放錄影型式。
    [root@moodle moodle23]# diff -urN -wbBE mod_tmp/openmeetings/lib.php mod/openmeetings/lib.php
    --- mod_tmp/openmeetings/lib.php	2012-08-02 19:04:40.000000000 +0800
    +++ mod/openmeetings/lib.php	2013-11-06 08:50:30.036148666 +0800
    @@ -83,10 +83,18 @@
     	if ($openmeetings_gateway->openmeetings_loginuser()) {
     		
     		//Roomtype 0 means its and recording, we don't need to update a room for that
    -		if ($openmeetings->type != 0) {
    +		if ($openmeetings->type != 0 and $openmeetings->room_id !=0 ) { //dywang
     			$openmeetings->room_id = $openmeetings_gateway->openmeetings_updateRoomWithModeration($openmeetings);
    +		} elseif ($openmeetings->type != 0 and $openmeetings->room_id == 0 ) { 
    +			echo "只能播放錄影,不能變更為會議或面談。請新增openmeetings進行會議。";
    +			return;
    +		} elseif ($openmeetings->type == 0 and $openmeetings->room_id != 0 ) { 
    +			echo "只能進行會議或面談,不能變更為播放錄影。請新增openmeetings進行播放錄影。";
    +			exit();
     		} else {
    -			$openmeetings->room_id = 0;
    +			//DO nothing;
     		}
     		
     	} else {
    
  2. 改由 room_id 判斷不是播放錄影,也就是會議室時,可進行刪除會議室的動作。
    @@ -113,8 +122,9 @@
     	if ($openmeetings_gateway->openmeetings_loginuser()) {
     		
     		//Roomtype 0 means its and recording, we don't need to update a room for that
    -		if ($openmeetings->type != 0) {
    -			$openmeetings->room_id = $openmeetings_gateway->openmeetings_deleteRoom($openmeetings);
    +		if ($openmeetings->room_id != 0) {
    +			$openmeetings->room_id = $openmeetings_gateway->openmeetings_deleteRoom($openmeetings); //dywang
     		}
     		
     	} else {
    



2017-08-04