Frank Ralf (talk | contribs) |
Frank Ralf (talk | contribs) |
||
Line 20: | Line 20: | ||
datalib.php | datalib.php | ||
* [http://xref.moodle.org/lib/datalib.php.html#get_my_courses get_my_courses] | * [http://xref.moodle.org/lib/datalib.php.html#get_my_courses get_my_courses] | ||
: Convenience function - lists courses that a user has access to view. | |||
* [http://xref.moodle.org/lib/datalib.php.html#get_all_instances_in_courses get_all_instances_in_courses] | * [http://xref.moodle.org/lib/datalib.php.html#get_all_instances_in_courses get_all_instances_in_courses] | ||
: Returns an array of all the active instances of a particular module in given courses, sorted in the order they are defined. | |||
* [http://xref.moodle.org/lib/datalib.php.html#get_coursemodule_from_id get_coursemodule_from_id] | * [http://xref.moodle.org/lib/datalib.php.html#get_coursemodule_from_id get_coursemodule_from_id] | ||
: Given an id of a course module, finds the coursemodule description. | |||
* [http://xref.moodle.org/lib/datalib.php.html#get_coursemodule_from_instance get_coursemodule_from_instance] | * [http://xref.moodle.org/lib/datalib.php.html#get_coursemodule_from_instance get_coursemodule_from_instance] | ||
: Given an instance number of a module, finds the coursemodule description. |
Revision as of 15:50, 13 November 2009
Ideen für Glossarlisten-Block:
Some unsorted ideas
- use activity_modules block as a template for glossary_list block
- request SQL with dmllib.php?
- function get_fast_modinfo in moodle\course\lib.php (1058) - works only on course level ("Returns reference to full info about modules in course")
- Is there an equivalent at site level?
- Alternatives:
- get list of all courses (IDs)
- collect all glossaries
- show only those for the current user
- function "get_all_instances_in_course" in \lib\datalib.php
- or "get_all_instances_in_courses"
- http://localhost/moodle_cvs/moodle/mod/glossary/index.php?id=1 gets a list of all glossaries for the current course
Possibly useful functions
datalib.php
- Convenience function - lists courses that a user has access to view.
- Returns an array of all the active instances of a particular module in given courses, sorted in the order they are defined.
- Given an id of a course module, finds the coursemodule description.
- Given an instance number of a module, finds the coursemodule description.