Note: You are currently viewing documentation for Moodle 3.6. Up-to-date documentation for the latest stable version of Moodle is likely available here: Frank Ralf/Glossary list2.

User:Frank Ralf/Glossary list2: Difference between revisions

From MoodleDocs
Line 2: Line 2:
== Some unsorted ideas ==
== Some unsorted ideas ==


=== Extending the "Context" concept ===
* extending the concept of [[Context]] from courses, roles or site to users
* [[Role permissions]]
* [[Roles and capabilities]]
* [[User:Hubert Chathi/Custom Context Levels]]
* [[Development:Competencies]] for Moodle 2.0
=== Activities Block ===
* use activity_modules block as a template for glossary_list block
* use activity_modules block as a template for glossary_list block
=== Direct SQL ===
* request SQL with dmllib.php?
* 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")
* 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?
: Is there an equivalent at site level?


=== Miscellaneous ===
* Alternatives:  
* Alternatives:  
# get list of all courses (IDs)
# get list of all courses (IDs)
Line 13: Line 24:


* http://localhost/moodle_cvs/moodle/mod/glossary/index.php?id=1 gets a list of all glossaries for the current course
* http://localhost/moodle_cvs/moodle/mod/glossary/index.php?id=1 gets a list of all glossaries for the current course
* extending the concept of [[Context]] from courses, roles or site to users
* [[Role permissions]]
* [[Roles and capabilities]]
* [[User:Hubert Chathi/Custom Context Levels]]
* [[Development:Competencies]] for Moodle 2.0


== Possibly useful functions ==
== Possibly useful functions ==

Revision as of 17:23, 13 November 2009

Ideen für Glossarlisten-Block:

Some unsorted ideas

Extending the "Context" concept

Activities Block

  • use activity_modules block as a template for glossary_list block

Direct SQL

  • 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?

Miscellaneous

  • Alternatives:
  1. get list of all courses (IDs)
  2. collect all glossaries
  3. show only those for the current user

Possibly useful functions

\mod\glossary

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.

= Miscellaneous

  • get_user_courses_bycap()
If you really want to know what courses are assigned to the user,

without any hiding or scheming, call the lower-level get_user_courses_bycap().