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
(New page: Ideen für Glossarlisten-Block: ==================================== activity_modules Block als Vorlage für glossaries-Block SQL mit dmllib.php abrufen? Funktion get_fast_modinfo in mo...)
 
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
Ideen für Glossarlisten-Block:
See also [[User:Frank Ralf/Glossary list]].
====================================


activity_modules Block als Vorlage für glossaries-Block
== Some unsorted ideas ==


SQL mit dmllib.php abrufen?
=== Extending the "Context" concept ===
* extending the concept of [[Context]] from courses, roles or site to users
* [[Development:Roles#Context]]
: ''"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]]


Funktion get_fast_modinfo in moodle\course\lib.php (1058) - nur auf Kursebene
* [http://moodle.org/mod/forum/discuss.php?d=60125 "Roles and contexts in Moodle 1.7"] forum discussion
"Returns reference to full info about modules in course"


Gibt es ein Äquivalent auf Site-Ebene?
* [[Development:Roles#Programming_Interface]] - defining new capabilities with '''access.php'''.


Alternative:
* [[Roles and capabilities]]
a) Liste aller Kurse (IDs) abrufen
* [[Role permissions]]
b) alle Kurse nach Glossaren abfragen
c) nur die anzeigen, für die der Benutzer Schreibrechte hat


Funktion "get_all_instances_in_course" in \lib\datalib.php
* [[User:Hubert Chathi/Custom Context Levels]]


oder "get_all_instances_in_courses"
* ([[Development:Competencies]] for Moodle 2.0)???


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


Möglicher Geltungsbereich:
=== Miscellaneous ===
* Alternatives:  
# get list of all courses (IDs)
# collect all glossaries
# show only those for the current user


1. alle Glossare der Site
* http://localhost/moodle_cvs/moodle/mod/glossary/index.php?id=1 gets a list of all glossaries for the current course
2. des Kurses (= Activities Block?)
3. des Lehrers (kursübergreifend) - welche Berechtigung??


Die URL aus dem Acitivities block http://localhost/moodle_cvs/moodle/mod/glossary/index.php?id=1 liefert alle Glossare aus dem angegebenen Kurs
== Possibly useful functions ==
(kann man da mehrere Parameter übergeben? Nein, ohne Parameter ID erhält man eine entsprechende Fehlermeldung)
 
=== \mod\glossary ===
* [http://xref.moodle.org/mod/glossary/index.php.html glossary/index.php]
* [http://xref.moodle.org/mod/glossary/exportentry.php.html exportentry.php]
 
=== datalib.php ===
* [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.
: 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()''.
 
* [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]
: 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]
: Given an instance number of a module, finds the coursemodule description.
 
=== accesslib.php ===
 
* [http://xref.moodle.org/lib/accesslib.php.html#get_user_courses_bycap get_user_courses_bycap()]
: Lower-level pendant to ''get_my_courses()''.
 
=== course/import/activities/mod.php ===
* [http://xref.moodle.org/nav.html?course/import/activities/mod.php.source.html creates a list of all course of a given teacher]
 
== Moodle 2.0 ==
* [[Development:Roles administration improvements for Moodle 2.0]]

Latest revision as of 16:52, 13 November 2010

See also Frank Ralf/Glossary list.

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

accesslib.php

Lower-level pendant to get_my_courses().

course/import/activities/mod.php

Moodle 2.0