@@ 3679-3696 (lines=18) @@ | ||
3676 | * @author Patrick Cool <[email protected]>, Ghent University |
|
3677 | * @version January 2007 |
|
3678 | */ |
|
3679 | public static function get_number_of_survey_invitations() |
|
3680 | { |
|
3681 | $course_id = api_get_course_int_id(); |
|
3682 | ||
3683 | // Database table definition |
|
3684 | $table_survey_invitation = Database :: get_course_table(TABLE_SURVEY_INVITATION); |
|
3685 | ||
3686 | $sql = "SELECT count(user) AS total |
|
3687 | FROM $table_survey_invitation |
|
3688 | WHERE |
|
3689 | c_id = $course_id AND |
|
3690 | survey_id='".intval($_GET['survey_id'])."' AND |
|
3691 | session_id='".api_get_session_id()."' "; |
|
3692 | $res = Database::query($sql); |
|
3693 | $row = Database::fetch_array($res,'ASSOC'); |
|
3694 | ||
3695 | return $row['total']; |
|
3696 | } |
|
3697 | ||
3698 | /** |
|
3699 | * Save the invitation mail |
@@ 4410-4426 (lines=17) @@ | ||
4407 | * @param int $item_id |
|
4408 | * @param array $course_info |
|
4409 | */ |
|
4410 | function makeInvisible($item_id, $course_info) |
|
4411 | { |
|
4412 | $work_table = Database :: get_course_table(TABLE_STUDENT_PUBLICATION); |
|
4413 | $item_id = intval($item_id); |
|
4414 | $course_id = $course_info['real_id']; |
|
4415 | $sql = "UPDATE " . $work_table . " |
|
4416 | SET accepted = 0 |
|
4417 | WHERE c_id = $course_id AND id = '" . $item_id . "'"; |
|
4418 | Database::query($sql); |
|
4419 | api_item_property_update( |
|
4420 | $course_info, |
|
4421 | 'work', |
|
4422 | $item_id, |
|
4423 | 'invisible', |
|
4424 | api_get_user_id() |
|
4425 | ); |
|
4426 | } |
|
4427 | ||
4428 | /** |
|
4429 | * @param int $item_id |