/** * 初期画面 * GETメソッドの場合、呼ばれる */ function getDefaultView() { $context = $this->getContext(); $controller = $context->getController(); $request = $context->getRequest(); $user = $context->getUser(); if (!$this->get_execute_privilege()) { $controller->forward(SECURE_MODULE, SECURE_ACTION); return; } // ログインユーザ情報の設定 $acs_user_info_row =& $user->getAttribute('acs_user_info_row'); $request->setAttributeByRef('acs_user_info_row', $acs_user_info_row); // コミュニティ情報の取得 $target_community_id = $request->getParameter('community_id'); $target_community_row = ACSCommunity::get_community_row($target_community_id); $request->setAttributeByRef('target_community_row', $target_community_row); // コミュニティ人数の取得 $request->setAttribute('member_count', ACSCommunity::get_community_member_count($target_community_id)); // スケジュールインスタンス配列の取得 $schedule_array =& ACSSchedule::get_community_schedule_instance_list($target_community_id); $request->setAttributeByRef('schedules', $schedule_array); // スケジュール人数情報配列の取得 $schedule_persons_array =& ACSSchedule::get_total_person_count($target_community_id); $request->setAttributeByRef('schedule_persons', $schedule_persons_array); return View::SUCCESS; }
/** * スケジュール調整決定通知定型文取得 * * @return true / false */ function get_decision_mail_message($lang, $decide_adjustment_date_id) { $current_lang = ACSMsg::get_lang(); ACSMsg::set_lang($lang); $msg = ACSMsg::get_serial_msg('lib', basename(__FILE__), 'DEC%03d'); // システムURL $system_group = ACSMsg::get_mst('system_config_group', 'D01'); $system_base_url = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_BASE_URL'); $system_base_login_url = ACSSystemConfig::get_keyword_value($system_group, 'SYSTEM_BASE_LOGIN_URL'); // コミュニティ情報の取得 $community_row =& ACSCommunity::get_community_row($this->community_id); // 決定日 $adjustment_dates_list = $this->get_adjustment_dates(); // 回答状況 $person_count_array =& ACSSchedule::get_total_person_count($this->community_id, $this->schedule_id); $person_count = $person_count_array[$this->schedule_id]; // 対象が全員の場合は参加人数をメンバ数に修正 if ($this->is_target_all()) { $person_count['participate_person_count'] = ACSCommunity::get_community_member_count($this->community_id); } // スケジュールURL $schedule_url = $system_base_login_url . SCRIPT_PATH . "?" . MODULE_ACCESSOR . "=Community" . "&" . ACTION_ACCESSOR . "=AnswerSchedule" . "&community_id=" . $this->community_id . "&schedule_id=" . $this->schedule_id; $user_community_row =& ACSUser::get_user_profile_row($this->user_community_id); $msg = ACSMsg::get_tag_replace($msg, array('{SYSTEM_BASE_URL}' => $system_base_url, '{COMMUNITY_ID}' => $this->community_id, '{COMMUNITY_NAME}' => $community_row['community_name'], '{USER_NAME}' => $user_community_row['user_name'], '{USER_COMMUNITY_NAME}' => $user_community_row['community_name'], '{SCHEDULE_NAME}' => $this->schedule_name, '{SCHEDULE_DETAIL}' => $this->schedule_detail, '{SCHEDULE_CLOSING_DATETIME}' => ACSLib::convert_pg_date_to_str($this->schedule_closing_datetime), '{SCHEDULE_ANSWER_COUNT}' => $person_count['answer_person_count'], '{SCHEDULE_PARTICIPATE_COUNT}' => $person_count['participate_person_count'], '{SCHEDULE_DECISION_DATE}' => $adjustment_dates_list[$decide_adjustment_date_id]['date_string'], '{ANSWER_SCHEDULE_URL}' => $schedule_url)); ACSMsg::set_lang($current_lang); return $msg; }