*/
class url_resolver {
+ /**
+ * The URL where the competency can be found.
+ *
+ * @param int $competencyid The competency ID.
+ * @param int $pagecontextid The ID of the context we are in.
+ * @return moodle_url
+ */
+ public function competency($competencyid, $pagecontextid) {
+ return new moodle_url('/admin/tool/lp/editcompetency.php', array(
+ 'id' => $competencyid,
+ 'pagecontextid' => $pagecontextid
+ ));
+ }
+
+ /**
+ * The URL where the framework can be found.
+ *
+ * @param int $frameworkid The framework ID.
+ * @param int $pagecontextid The ID of the context we are in.
+ * @return moodle_url
+ */
+ public function framework($frameworkid, $pagecontextid) {
+ return new moodle_url('/admin/tool/lp/competencies.php', array(
+ 'competencyframeworkid' => $frameworkid,
+ 'pagecontextid' => $pagecontextid
+ ));
+ }
+
/**
* The URL where the frameworks can be found.
*
return new moodle_url('/admin/tool/lp/plans.php', array('userid' => $userid));
}
+ /**
+ * The URL where the template can be found.
+ *
+ * @param int $templateid The template ID.
+ * @param int $pagecontextid The ID of the context we are in.
+ * @return moodle_url
+ */
+ public function template($templateid, $pagecontextid) {
+ return new moodle_url('/admin/tool/lp/templatecompetencies.php', array(
+ 'templateid' => $templateid,
+ 'pagecontextid' => $pagecontextid
+ ));
+ }
+
+ /**
+ * The URL where the templates can be found.
+ *
+ * @param int $pagecontextid The ID of the context that we are browsing.
+ * @return moodle_url
+ */
+ public function templates($pagecontextid) {
+ return new moodle_url('/admin/tool/lp/learningplans.php', array('pagecontextid' => $pagecontextid));
+ }
+
/**
* The URL where the user competency can be found.
*
- * @param int $usercompetency The user competency ID
+ * @param int $usercompetencyid The user competency ID
* @return moodle_url
*/
public function user_competency($usercompetencyid) {
return new moodle_url('/admin/tool/lp/user_competency.php', array('id' => $usercompetencyid));
}
+ /**
+ * The URL where the user competency can be found in the context of a course.
+ *
+ * @param int $userid The user ID
+ * @param int $competencyid The competency ID.
+ * @param int $courseid The course ID.
+ * @return moodle_url
+ */
+ public function user_competency_in_course($userid, $competencyid, $courseid) {
+ return new moodle_url('/admin/tool/lp/user_competency_in_course.php', array(
+ 'userid' => $userid,
+ 'competencyid' => $competencyid,
+ 'courseid' => $courseid
+ ));
+ }
+
/**
* The URL where the user competency can be found in the context of a plan.
*
/**
* The URL where the user evidence (of prior learning) can be found.
*
- * @param int $usercompetency The user evidence ID
+ * @param int $userevidenceid The user evidence ID
* @return moodle_url
*/
public function user_evidence($userevidenceid) {
return call_user_func_array([static::$resolver, $resource], $args);
}
+ /**
+ * The URL where the competency can be found.
+ *
+ * @param int $competencyid The competency ID.
+ * @param int $pagecontextid The ID of the context we are in.
+ * @return moodle_url
+ */
+ public static function competency($competencyid, $pagecontextid) {
+ return static::get(__FUNCTION__, func_get_args());
+ }
+
+ /**
+ * The URL where the framework can be found.
+ *
+ * @param int $frameworkid The framework ID.
+ * @param int $pagecontextid The ID of the context we are in.
+ * @return moodle_url
+ */
+ public static function framework($frameworkid, $pagecontextid) {
+ return static::get(__FUNCTION__, func_get_args());
+ }
+
/**
* The URL where the frameworks can be found.
*
return static::get(__FUNCTION__, func_get_args());
}
+ /**
+ * The URL where the template can be found.
+ *
+ * @param int $templateid The template ID.
+ * @param int $pagecontextid The ID of the context we are in.
+ * @return moodle_url
+ */
+ public static function template($templateid, $pagecontextid) {
+ return static::get(__FUNCTION__, func_get_args());
+ }
+
+ /**
+ * The URL where the templates can be found.
+ *
+ * @param int $pagecontextid The ID of the context that we are browsing.
+ * @return moodle_url
+ */
+ public function templates($pagecontextid) {
+ return static::get(__FUNCTION__, func_get_args());
+ }
+
/**
* The URL where the user competency can be found.
*
- * @param int $usercompetency The user competency ID
+ * @param int $usercompetencyid The user competency ID
* @return moodle_url
*/
public static function user_competency($usercompetencyid) {
return static::get(__FUNCTION__, func_get_args());
}
+ /**
+ * The URL where the user competency can be found in the context of a course.
+ *
+ * @param int $userid The user ID
+ * @param int $competencyid The competency ID.
+ * @param int $courseid The course ID.
+ * @return moodle_url
+ */
+ public static function user_competency_in_course($userid, $competencyid, $courseid) {
+ return static::get(__FUNCTION__, func_get_args());
+ }
+
/**
* The URL where the user competency can be found in the context of a plan.
*
/**
* The URL where the user evidence (of prior learning) can be found.
*
- * @param int $usercompetency The user evidence ID
+ * @param int $userevidenceid The user evidence ID
* @return moodle_url
*/
public static function user_evidence($userevidenceid) {
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/editcompetency.php', array(
- 'id' => $this->objectid,
- 'pagecontextid' => $this->contextid
- ));
+ return \core_competency\url::competency($this->objectid, $this->contextid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- $urlparams = [
- 'id' => $this->other['usercompetencyid']
- ];
- return new \moodle_url('/admin/tool/lp/user_competency.php', $urlparams);
+ return \core_competency\url::user_competency($this->other['usercompetencyid']);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/editcompetencyframework.php', array(
- 'id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::framework($this->objectid, $this->contextid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/editcompetencyframework.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::framework($this->objectid, $this->contextid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/competencies.php', array(
- 'competencyframeworkid' => $this->objectid,
- 'pagecontextid' => $this->contextid
- ));
+ return \core_competency\url::framework($this->objectid, $this->contextid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/plan.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::plan($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/edittemplate.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::template($this->objectid, $this->contextid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/edittemplate.php',
- array('id' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::template($this->objectid, $this->contextid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/templatecompetencies.php',
- array('templateid' => $this->objectid, 'pagecontextid' => $this->contextid));
+ return \core_competency\url::template($this->objectid, $this->contextid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/editcompetency.php', array(
- 'id' => $this->objectid,
- 'pagecontextid' => $this->contextid
- ));
+ return \core_competency\url::competency($this->objectid, $this->contextid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency_in_plan.php', array(
- 'competencyid' => $this->other['competencyid'],
- 'userid' => $this->relateduserid,
- 'planid' => $this->other['planid']
- ));
+ return \core_competency\url::user_competency_in_plan($this->relateduserid, $this->other['competencyid'],
+ $this->other['planid']);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency.php', array(
- 'id' => $this->objectid
- ));
+ return \core_competency\url::user_competency($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency_in_course.php', array(
- 'competencyid' => $this->other['competencyid'],
- 'userid' => $this->relateduserid,
- 'courseid' => $this->courseid
- ));
+ return \core_competency\url::user_competency_in_course($this->relateduserid, $this->other['competencyid'],
+ $this->courseid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency_in_plan.php', array(
- 'competencyid' => $this->other['competencyid'],
- 'userid' => $this->relateduserid,
- 'planid' => $this->other['planid']
- ));
+ return \core_competency\url::user_competency_in_plan($this->relateduserid, $this->other['competencyid'],
+ $this->other['planid']);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency.php', array(
- 'id' => $this->objectid
- ));
+ return \core_competency\url::user_competency($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency.php', array(
- 'id' => $this->objectid
- ));
+ return \core_competency\url::user_competency($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency.php', array(
- 'id' => $this->objectid
- ));
+ return \core_competency\url::user_competency($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency.php', array(
- 'id' => $this->objectid
- ));
+ return \core_competency\url::user_competency($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency.php', array(
- 'id' => $this->objectid
- ));
+ return \core_competency\url::user_competency($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency_in_course.php', array(
- 'competencyid' => $this->other['competencyid'],
- 'userid' => $this->relateduserid,
- 'courseid' => $this->courseid
- ));
+ return \core_competency\url::user_competency_in_course($this->relateduserid, $this->other['competencyid'],
+ $this->courseid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_competency_in_plan.php', array(
- 'competencyid' => $this->other['competencyid'],
- 'userid' => $this->relateduserid,
- 'planid' => $this->other['planid']
- ));
+ return \core_competency\url::user_competency_in_plan($this->relateduserid, $this->other['competencyid'],
+ $this->other['planid']);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_evidence.php',
- array('id' => $this->objectid));
+ return \core_competency\url::user_evidence($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/user_evidence.php',
- array('id' => $this->objectid));
+ return \core_competency\url::user_evidence($this->objectid);
}
/**
* @return \moodle_url
*/
public function get_url() {
- return new \moodle_url('/admin/tool/lp/editcompetency.php', array(
- 'id' => $this->objectid,
- 'pagecontextid' => $this->contextid
- ));
+ return \core_competency\url::competency($this->objectid, $this->contextid);
}
/**