本文整理汇总了PHP中feedback_init_feedback_session函数的典型用法代码示例。如果您正苦于以下问题:PHP feedback_init_feedback_session函数的具体用法?PHP feedback_init_feedback_session怎么用?PHP feedback_init_feedback_session使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了feedback_init_feedback_session函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: feedback_print_errors
/**
* print some errors to inform users about this.
*
* @global object
* @return void
*/
function feedback_print_errors()
{
global $SESSION, $OUTPUT;
feedback_init_feedback_session();
if (empty($SESSION->feedback->errors)) {
return;
}
echo $OUTPUT->box_start('generalbox errorboxcontent boxaligncenter boxwidthnormal');
echo $OUTPUT->heading(get_string('handling_error', 'feedback'));
echo '<p align="center"><b><font color="black"><pre>';
print_r($SESSION->feedback->errors) . "\n";
echo '</pre></font></b></p>';
echo $OUTPUT->box_end();
echo '<br /><br />';
$SESSION->feedback->errors = array();
//remove errors
}
示例2: feedback_init_feedback_session
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* prints the form to edit the feedback items such moving, deleting and so on
*
* @author Andreas Grabs
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
* @package feedback
*/
require_once "../../config.php";
require_once "lib.php";
require_once 'edit_form.php';
feedback_init_feedback_session();
$id = required_param('id', PARAM_INT);
if ($formdata = data_submitted() and !confirm_sesskey()) {
print_error('invalidsesskey');
}
$do_show = optional_param('do_show', 'edit', PARAM_ALPHA);
$moveupitem = optional_param('moveupitem', false, PARAM_INT);
$movedownitem = optional_param('movedownitem', false, PARAM_INT);
$moveitem = optional_param('moveitem', false, PARAM_INT);
$movehere = optional_param('movehere', false, PARAM_INT);
$switchitemrequired = optional_param('switchitemrequired', false, PARAM_INT);
$current_tab = $do_show;
$url = new moodle_url('/mod/feedback/edit.php', array('id' => $id, 'do_show' => $do_show));
if (!($cm = get_coursemodule_from_id('feedback', $id))) {
print_error('invalidcoursemodule');
}