Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

User:Frank Ralf/Glossary list2: Difference between revisions

From MoodleDocs
Line 6: Line 6:
* [[Development:Roles#Context]]
* [[Development:Roles#Context]]
: ''"Please note that '''CONTEXT_PERSONAL''' (present in 1.7-1.8) was never implemented and was removed in 1.9."''
: ''"Please note that '''CONTEXT_PERSONAL''' (present in 1.7-1.8) was never implemented and was removed in 1.9."''
: [http://moodle.org/mod/forum/search.php?id=5&search=CONTEXT_PERSONAL CONTEXT_PERSONAL in the forums]
* [[Development:Roles and modules#Context]]
* [[Development:Roles and modules#Context]]
* [[Roles and capabilities]]
* [[Roles and capabilities]]
* [[Role permissions]]
* [[Role permissions]]

Revision as of 17:51, 13 November 2009

Ideen für Glossarlisten-Block:

Some unsorted ideas

Extending the "Context" concept

"Please note that CONTEXT_PERSONAL (present in 1.7-1.8) was never implemented and was removed in 1.9."
CONTEXT_PERSONAL in the forums

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().