flagflag  
Page Top

DB anchor.png

  • DataBase には $DB 変数を使用してアクセスする.関数の直接呼出しは全て廃止された.
  • lib/dml/moodle_database.php
  • get_record($table, $field1, $value1, $field2="", $value2="", $field3="", $value3="", $fields='*')
    • $DB-> get_record($table, array $conditions, $fields='*', $strictness=IGNORE_MISSING)
  • get_records($table, $field="", $value="", $sort="", $fields='*', $limitfrom="", $limitnum="")
    • $DB->get_records($table, array $conditions=null, $sort='', $fields='*', $limitfrom=0, $limitnum=0)
 
Page Top

権限 anchor.png

  • 廃止
    • isadmin()
    • isguest()
    • isteacher($course->id)
Page Top
2.x anchor.png
  • see jbxl_moodle_tools.php
     
Page Top

OUTPUT anchor.png

  • print_heading() → echo $OUTPUT->heading()
  • print_footer() → echo $OUTPUT->footer()
  • print_simple_box_start() → echo $OUTPUT->box_start()
  • print_simple_box_end() → echo $OUTPUT->box_end()
  • helpbutton() → echo $OUTPUT->help_icon()
  • popup_form() → echo $OUTPUT->single_select()
  • print_user_picture() → echo $OUTPUT->user_picture($user, array('courseid'=>$courseid)
  • link_to_popup_window($url, $lavel, $icon_url, $height=400, $width=500, $label) → echo $OUTPUT->action_link($url, $icon_url, new popup_action('click', $url));
     
Page Top
$OUTPUT->header() anchor.png
  • print_header($title, $heading, $navigation, $focus, $meta, $cache, $button, $menu, $usexml, $bodytags, $return) は非推奨
    • $PAGE と $OUTPUT を使う
      $PAGE->set_title($title);
      $PAGE->set_heading($heading);
      $PAGE->set_cacheable($cache); // true
      $PAGE->set_button($button); // ' '
      $PAGE->set_headingmenu($menu);
      
      require_login($course->id);
      echo $OUTPUT->header();
Page Top
user_picture(stdClass $user, array $options = null) anchor.png
  • lib/outputrenderers.php
  • lib/outputcomponents.php
  • $user : ユーザオブジェクト
  • $options: courseid, link=true, size=35, alttext=true, popup=false
     
Page Top

html_writer anchor.png

  • choose_from_menu() → html_writer::select()
  • print_date_selector("endday", "endmonth", "endyear") → html_writer::select_time() を3回使用する
    • html_writer::select_time() は 時間,分の既定値(selected)がうまく機能しない(2.2.2+).-> 修正
  • print_table($table) → html_writer::table($table)
     
Page Top
html_writer::select() anchor.png
  • html_writer::select()
    $ltimes = array(1=>0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120);
    echo html_writer::select($ltimes, 'lmin', 1, false);
Page Top
html_writer::select_time() anchor.png
  • html_writer::select_time()
    echo html_writer::select_time('years',  'startyear',  0);
    echo html_writer::select_time('months', 'startmonth', 0);
    echo html_writer::select_time('days',   'startday',   0);
     
Page Top
html_writer::table() anchor.png
  • html_writer::table($table)
    $table = new html_table();
    $table->head = array(title1, title2, title3, ....);
    $table->align = array('left', 'center', 'center', ....);
    $table->width = "100%";
    $table->data[] = array(....) // 1行目
    $table->data[] = array(....) // 2行目
    $table->data[] = array(....) // 3行目
    ....
    echo html_writer::table($table);
     
Page Top

etc.etc. anchor.png

  • error() → print_error()
     

Front page   Freeze Diff Backup Copy Rename Reload   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)
Counter: 1739, today: 1, yesterday: 0
Last-modified: 2013-06-20 (Thu) 17:15:41 (JST) (3966d) by iseki

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthApr 2024Next Month
Su Mo Tu We Th Fr Sa
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
Today

Who's Online

51 user(s) are online (12 user(s) are browsing xpwiki)

Members: 0
Guests: 51

more...

Access Counter

Today : 5234523452345234
Yesterday : 1889718897188971889718897
Total : 2341883123418831234188312341883123418831234188312341883123418831
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com