本文整理汇总了PHP中core_competency\api::read_user_evidence方法的典型用法代码示例。如果您正苦于以下问题:PHP api::read_user_evidence方法的具体用法?PHP api::read_user_evidence怎么用?PHP api::read_user_evidence使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core_competency\api
的用法示例。
在下文中一共展示了api::read_user_evidence方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: data_for_user_evidence_page
/**
* Loads the data required to render the user_evidence_page template.
*
* @param int $id User id.
* @return boolean
*/
public static function data_for_user_evidence_page($id)
{
global $PAGE;
$params = self::validate_parameters(self::data_for_user_evidence_page_parameters(), array('id' => $id));
$userevidence = api::read_user_evidence($id);
self::validate_context($userevidence->get_context());
$output = $PAGE->get_renderer('tool_lp');
$renderable = new \tool_lp\output\user_evidence_page($userevidence);
return $renderable->export_for_template($output);
}
示例2: request_review_of_user_evidence_linked_competencies
/**
* Send user evidence competencies to review.
*
* @param int $id The user evidence id.
* @return boolean
*/
public static function request_review_of_user_evidence_linked_competencies($id)
{
$params = self::validate_parameters(self::request_review_of_user_evidence_linked_competencies_parameters(), array('id' => $id));
$userevidence = api::read_user_evidence($id);
self::validate_context($userevidence->get_context());
return api::request_review_of_user_evidence_linked_competencies($id);
}
示例3: require_login
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// 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/>.
/**
* User evidence (evidence of prior learning).
*
* @package tool_lp
* @copyright 2015 Frédéric Massart - FMCorz.net
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
require_once __DIR__ . '/../../../config.php';
require_login(null, false);
if (isguestuser()) {
throw new require_login_exception('Guests are not allowed here.');
}
\core_competency\api::require_enabled();
$id = required_param('id', PARAM_INT);
$userevidence = \core_competency\api::read_user_evidence($id);
$url = new moodle_url('/admin/tool/lp/user_evidence.php', array('id' => $id));
list($title, $subtitle) = \tool_lp\page_helper::setup_for_user_evidence($userevidence->get_userid(), $url, $userevidence);
$output = $PAGE->get_renderer('tool_lp');
echo $output->header();
$page = new \tool_lp\output\user_evidence_page($userevidence);
echo $output->render($page);
echo $output->footer();