Functions[edit]

Permission[edit]

function require_login[edit]
require_login($courseorid=NULL, $autologinguest=true, $cm=NULL, $setwantsurltome=true, $preventredirect=false)

管理ブロック(settings)[edit]

feedback_extend_settings_navigation[edit]

Log[edit]

function add_to_log[edit]
function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user=0) 

Course[edit]

function get_coursemodule_from_id[edit]
$cm = get_coursemodule_from_id('altwiki', 60);
print_r($cm);

[id] => 60         モジュールオブジェクトのインスタンスID (Moodle全体で一意的)
[course] => 2      コースID 
[module] => 56     モジュールID
[instance] => 2    そのモジュール内でのインスタンスID (モジュール内で一意的.データベースのID)
[section] => 2 
[idnumber] => 
[added] => 1371440189 
[score] => 0 
[indent] => 0 
[visible] => 1 
[visibleold] => 1 
[groupmode] => 0 
[groupingid] => 0 
[groupmembersonly] => 0 
[completion] => 0 
[completiongradeitemnumber] => 
[completionview] => 0 
[completionexpected] => 0 
[availablefrom] => 0 
[availableuntil] => 0 
[showavailability] => 0 
[showdescription] => 0 
[name] => ALT2 
[modname] => altwiki

Classes[edit]

File Storage Class[edit]

class file_storage[edit]
get_file_storage()[edit]
$fs->get_area_files()[edit]

URL[edit]

class moodle_url[edit]
$base_url = new moodle_url('/mod/apply/'.$action_file);
$base_url->params(array('id'=>$id, 'courseid'=>$courseid));

Table[edit]

class flexible_table[edit]

大域変数[edit]

OUTPUT[edit]

$OUTPUT->single_button[edit]
/**
 * Returns a form with a single button.
 *
 * @param string|moodle_url $url
 * @param string $label button text
 * @param string $method get or post submit method
 * @param array $options associative array {disabled, title, etc.}
 * @return string HTML fragment
 */
 public function single_button($url, $label, $method='post', array $options=null);
$OUTPUT->action_link($url, $icon_url, new popup_action('click', $url));[edit]

DB[edit]

$DB->insert_record[edit]
$DB->update_record[edit]
$DB->delete_records[edit]
$DB->get_record[edit]
$DB->get_records[edit]
$DB->get_records_select[edit]
$DB->get_records_sql[edit]
$DB->execute[edit]

Block[edit]

Module[edit]

構成[edit]

SITEID[edit]

Memo[edit]

 mod_form.php: a form to setup/update a module instance
 version.php: defines some meta-info and provides upgrading code
 pix/icon.gif: a 16x16 icon for the module
 db/install.xml: an SQL dump of all the required db tables and data
 index.php: a page to list all instances in a course
 view.php: a page to view a particular instance
 lib.php: any/all functions defined by the module should be in here.
        constants should be defined using MODULENAME_xxxxxx
        functions should be defined using modulename_xxxxxx
        There are a number of standard functions:
        modulename_add_instance()
        modulename_update_instance()
        modulename_delete_instance()
        modulename_user_complete()
        modulename_user_outline()
        modulename_cron()
        modulename_print_recent_activity()

Form[edit]


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2023-08-29 (火) 12:34:11