From: moodler Date: Thu, 16 Dec 2004 12:40:36 +0000 (+0000) Subject: Draft beginning of new messaging system that Martin and Shane are working on. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=172186b8c489a6434f5067873c33e4c44ed34851;p=moodle.git Draft beginning of new messaging system that Martin and Shane are working on. --- diff --git a/message/index.php b/message/index.php new file mode 100644 index 0000000000..c1a0f7d62e --- /dev/null +++ b/message/index.php @@ -0,0 +1,33 @@ +fullname); + +?> + + + + + + + + + + +
contactssearchsettings
+ +
+ + + + diff --git a/message/lib.php b/message/lib.php new file mode 100644 index 0000000000..326dbfb2d2 --- /dev/null +++ b/message/lib.php @@ -0,0 +1,54 @@ +id, '', 'id, contactid'); + echo 'contacts'; +} + +function message_print_search() { + global $USER; + + if ($frm = data_submitted()) { + + message_print_search_results($frm); + + } else { + /// todo make the following queries more efficient + if ($teachers = get_records('user_teachers', 'userid', $USER->id, '', 'id, course')) { + + $courses = get_courses('all', 'c.sortorder ASC', 'c.id, c.shortname'); + $cs = ''; + } + + include('search.html'); + } +} + +function message_print_settings() { + if ($frm = data_submitted()) { + echo 'settings submitted - quick do something'; + } else { + echo 'settings form'; + } +} + +function message_print_search_results($frm) { + if (!empty($frm->personsubmit)) { + echo 'searched for person'; + } else if (!empty($frm->keywordssubmit)) { + echo 'searched for keywords'; + } + + print_single_button($ME, array( 'tab' => 'search'), get_string('newsearch') ); +} + +?> diff --git a/message/search.html b/message/search.html new file mode 100644 index 0000000000..0981c63267 --- /dev/null +++ b/message/search.html @@ -0,0 +1,42 @@ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
:

:
+ +