README.txt

  1. 6.x README.txt
  2. 6.x modules/tinymce/README.txt
  3. 6.x modules/student_files/README.txt
  4. 6.x modules/batch/README.txt
  5. 6.x modules/lassie/README.txt
  6. 6.x modules/prereqs/README.txt
  7. 6.x themes/how_to_customize/README.txt
  8. 6.x modules/encryption/README.txt
  9. 6.x custom/files/README.txt
  10. 4.x README.txt
  11. 4.x modules/tinymce/inc/tiny_mce/plugins/style/readme.txt
  12. 4.x modules/tinymce/README.txt
  13. 5.x README.txt
  14. 5.x modules/tinymce/README.txt
  15. 5.x modules/batch/README.txt
  16. 5.x themes/basic/README.txt
  17. 5.x inc/pchart/README.txt
  18. 5.x inc/pchart/pchart/readme.txt
  19. 5.x modules/tinymce/inc/tiny_mce/plugins/style/readme.txt
READEME for Prereqs Module


============================
Hooks
============================

Your custom module can add more prereq conditions through the hook:
  
  hook_prereqs_get_prereq_warnings(&$warnings, Course $course, Student $student)
  
$warnings is the existing array of warning messages, if any exist yet.  It is passed BY REFERENCE.
$course is the course in question.
$student is the student who is trying to take the course, which may or may not be set.

Example:

function mmymodule_prereqs_get_prereq_warnings_for_course(&$warnings, $course, $student) {
    
  if ($course->course_id == 12345) {
    $warnings["some_unique_index"] = "You cannot take this course.";
  }
  
  // We don't return anything, since $warnings was passed by reference.
  
}

File

modules/prereqs/README.txt
View source
  1. READEME for Prereqs Module
  2. ============================
  3. Hooks
  4. ============================
  5. Your custom module can add more prereq conditions through the hook:
  6. hook_prereqs_get_prereq_warnings(&$warnings, Course $course, Student $student)
  7. $warnings is the existing array of warning messages, if any exist yet. It is passed BY REFERENCE.
  8. $course is the course in question.
  9. $student is the student who is trying to take the course, which may or may not be set.
  10. Example:
  11. function mmymodule_prereqs_get_prereq_warnings_for_course(&$warnings, $course, $student) {
  12. if ($course->course_id == 12345) {
  13. $warnings["some_unique_index"] = "You cannot take this course.";
  14. }
  15. // We don't return anything, since $warnings was passed by reference.
  16. }