flagflag  If you want to see English page, please click "English" Button at Left.
1: 2012-04-14 (土) 09:01:07 iseki ソース 現: 2014-11-21 (金) 12:08:46 iseki ソース
Line 1: Line 1:
** Moodle-2.x Hacking [#u16c02ee] ** Moodle-2.x Hacking [#u16c02ee]
 +*** 申し訳ございません、セキュリティ上の理由から、httpsアクセスのみ許可されています。 [#nde47833]
 +- メッセージの変数は sslonlyaccess
 +- lib/setuplib.php の print_error('sslonlyaccess', 'error'); をコメントアウトする
 +#br
 +
 +*** IP アドレスの逆引き [#vdc4090d]
 +- Moodle搭載の Geo City の GeoIP は動かないし,動いても情報は少ないので,NIC.AD.JP のDBを直接叩く
 +- moodle/iplookup/index.php の IP アドレスチェック後に,NIC.AD.JP へリダイレクト
 + $url = 'http://whois.nic.ad.jp/cgi-bin/whois_gw​?type=NET&key='.$ip;
 + redirect($url);
 +
*** 日付 [#d8f40c6e] *** 日付 [#d8f40c6e]
- 2.x で print_time_selector() は非推奨となった (おまけに 2.2.2+ ではバグっとる) - 2.x で print_time_selector() は非推奨となった (おまけに 2.2.2+ ではバグっとる)
 function print_time_selector($hour, $minute, $currenttime=0, $step=5, $return=false) {  function print_time_selector($hour, $minute, $currenttime=0, $step=5, $return=false) {
   debugging('print_time_selector() has been deprecated. Please change your code to use html_writer.');    debugging('print_time_selector() has been deprecated. Please change your code to use html_writer.');
 + 
   $hourselector = html_writer::select_time('hours', $hour, $currenttime);    $hourselector = html_writer::select_time('hours', $hour, $currenttime);
   $minuteselector = html_writer::select_time('minutes', $minute, $currenttime, $step);    $minuteselector = html_writer::select_time('minutes', $minute, $currenttime, $step);
 + 
   $output = $hourselector . $minuteselector;    $output = $hourselector . $minuteselector;
 + 
   if ($return) {    if ($return) {
       return $output;        return $output;
Line 16: Line 27:
   }    }
 }  }
 +- 置き換え関数の html_writer::select_time() もバグっとる :-(  おいおい である.
 +- moodle/lib/outputcomponents.php
 +- ただし,これでも 時刻が 0 (日本時間 AM9:00) の場合は,現時刻になるので 分を +1 するとか工夫が必要
 + case 'hours':
 +     for ($i=0; $i<=23; $i++) {
 +         $strno = sprintf("%02d",$i);
 +         $timeunits[$strno] = $strno;
 +         //$timeunits[$i] = sprintf("%02d",$i);
 +     }
 +     break;
 + case 'minutes':
 +     if ($step != 1) {
 +         $currentdate['minutes'] = ceil($currentdate['minutes']/$step)*$ste​p;
 +     }
 + 
 +     for ($i=0; $i<=59; $i+=$step) {
 +         $strno = sprintf("%02d",$i);
 +         $timeunits[$strno] = $strno;
 +         //$timeunits[$i] = sprintf("%02d",$i);
 +     }


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

107 人のユーザが現在オンラインです。 (29 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 107

もっと...

アクセスカウンタ

今日 : 1195119511951195
昨日 : 1716817168171681716817168
総計 : 2349765623497656234976562349765623497656234976562349765623497656
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com