mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-71189 core_completion: Adding completion sort order to activities
This implements sort ordering for all completion conditions, in activities which support custom completion conditions.
This commit is contained in:
parent
f105612d7f
commit
b77c66ac10
@ -78,5 +78,17 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionsubmit' => get_string('completiondetail:submit', 'assign')
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completionsubmit',
|
||||
'completionusegrade',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -69,4 +69,16 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionsubmit' => get_string('completiondetail:submit', 'choice')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completionsubmit',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -69,4 +69,17 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionentries' => get_string('completiondetail:entries', 'data', $entries),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completionentries',
|
||||
'completionusegrade',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -67,4 +67,16 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionsubmit' => get_string('completiondetail:submit', 'feedback')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completionsubmit',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -99,4 +99,19 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionposts' => get_string('completiondetail:posts', 'forum', $completionposts),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completiondiscussions',
|
||||
'completionreplies',
|
||||
'completionposts',
|
||||
'completionusegrade',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -73,4 +73,17 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionentries' => get_string('completiondetail:entries', 'glossary', $completionentries),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completionentries',
|
||||
'completionusegrade',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -70,4 +70,14 @@ class custom_completion extends activity_custom_completion {
|
||||
public function manual_completion_always_shown(): bool {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
// This module only supports manual completion.
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
@ -91,4 +91,18 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionendreached' => get_string('completiondetail:reachend', 'lesson'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completiontimespent',
|
||||
'completionendreached',
|
||||
'completionusegrade',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -159,4 +159,18 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionminattempts' => get_string('completiondetail:minattempts', 'mod_quiz', $minattempts),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completionminattempts',
|
||||
'completionusegrade',
|
||||
'completionpassorattemptsexhausted',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -79,4 +79,14 @@ class custom_completion extends activity_custom_completion {
|
||||
|
||||
return in_array($display, $displaytypes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
// This module only supports manual completion.
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
@ -202,4 +202,20 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionstatusallscos' => get_string('completiondetail:allscos', 'scorm'),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completionstatusallscos',
|
||||
'completionstatusrequired',
|
||||
'completionusegrade',
|
||||
'completionscorerequired',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,4 +67,16 @@ class custom_completion extends activity_custom_completion {
|
||||
'completionsubmit' => get_string('completiondetail:submit', 'survey')
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
return [
|
||||
'completionview',
|
||||
'completionsubmit',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -82,4 +82,13 @@ class custom_completion extends activity_custom_completion {
|
||||
return in_array($display, $displaytypes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of all completion rules, in the order they should be displayed to users.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function get_sort_order(): array {
|
||||
// This module only supports manual completion.
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user