Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions UPGRADING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# mod_feedback Upgrade notes
# mod_individualfeedback Upgrade notes

## 4.5

### Deprecated

- The `\feedback_check_is_switchrole()` function has been deprecated as it didn't work.
- The `\individualfeedback_check_is_switchrole()` function has been deprecated as it didn't work.

For more information see [MDL-72424](https://tracker.moodle.org/browse/MDL-72424)
- The method `\mod_feedback\output\renderer::create_template_form()` has been deprecated. It is not used anymore.
- The method `\mod_individualfeedback\output\renderer::create_template_form()` has been deprecated. It is not used anymore.

For more information see [MDL-81742](https://tracker.moodle.org/browse/MDL-81742)
6 changes: 3 additions & 3 deletions amd/build/createtemplate.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/edit.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions amd/build/local/repository.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions amd/build/usetemplate.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions amd/src/createtemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Javascript module for saving a new template.
*
* @module mod_feedback/createtemplate
* @module mod_individualfeedback/createtemplate
* @copyright 2021 Peter Dias
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand All @@ -42,9 +42,9 @@ export const init = () => {

const modalForm = new ModalForm({
modalConfig: {
title: getString('save_as_new_template', 'mod_feedback'),
title: getString('save_as_new_template', 'mod_individualfeedback'),
},
formClass: 'mod_feedback\\form\\create_template_form',
formClass: 'mod_individualfeedback\\form\\create_template_form',
args: {
id: ele.dataset.dataid
},
Expand Down
18 changes: 9 additions & 9 deletions amd/src/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Edit items in feedback module
*
* @module mod_feedback/edit
* @module mod_individualfeedback/edit
* @copyright 2016 Marina Glancy
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand All @@ -30,23 +30,23 @@ import {prefetchStrings} from 'core/prefetch';
import SortableList from 'core/sortable_list';
import {getString, getStrings} from 'core/str';
import {add as addToast} from 'core/toast';
import {reorderQuestions} from 'mod_feedback/local/repository';
import {reorderQuestions} from 'mod_individualfeedback/local/repository';

const Selectors = {
deleteQuestionButton: '[data-action="delete"]',
sortableListRegion: '[data-region="questions-sortable-list"]',
sortableElement: '[data-region="questions-sortable-list"] .feedback_itemlist[id]',
sortableElement: '[data-region="questions-sortable-list"] .individualfeedback_itemlist[id]',
sortableElementTitle: '[data-region="item-title"]',
};

/**
* Returns the Feedback question item id from the DOM id of an item.
*
* @param {String} id The dom id, f.g.: feedback_item_22
* @param {String} id The dom id, f.g.: individualfeedback_item_22
* @return int
*/
const getItemId = (id) => {
return Number(id.replace(/^.*feedback_item_/i, ''));
return Number(id.replace(/^.*individualfeedback_item_/i, ''));
};

/**
Expand Down Expand Up @@ -88,7 +88,7 @@ export const init = (cmId) => {
prefetchStrings('admin', [
'confirmation',
]);
prefetchStrings('mod_feedback', [
prefetchStrings('mod_individualfeedback', [
'confirmdeleteitem',
'questionmoved',
]);
Expand All @@ -102,7 +102,7 @@ export const init = (cmId) => {
event.preventDefault();
const confirmationStrings = await getStrings([
{key: 'confirmation', component: 'admin'},
{key: 'confirmdeleteitem', component: 'mod_feedback'},
{key: 'confirmdeleteitem', component: 'mod_individualfeedback'},
{key: 'yes', component: 'core'},
{key: 'no', component: 'core'},
]);
Expand All @@ -121,11 +121,11 @@ export const init = (cmId) => {
if (!event.detail.positionChanged) {
return;
}
const pendingPromise = new Pending('mod_feedback/questions:reorder');
const pendingPromise = new Pending('mod_individualfeedback/questions:reorder');
const itemOrder = getItemOrder(event.detail.element[0]);
addIconToContainerRemoveOnCompletion(event.detail.element[0], pendingPromise);
reorderQuestions(moduleId, itemOrder)
.then(() => getString('questionmoved', 'mod_feedback'))
.then(() => getString('questionmoved', 'mod_individualfeedback'))
.then(addToast)
.then(() => pendingPromise.resolve())
.catch(Notification.exception);
Expand Down
4 changes: 2 additions & 2 deletions amd/src/local/repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Module to handle feedback AJAX requests
*
* @module mod_feedback/local/repository
* @module mod_individualfeedback/local/repository
* @copyright 2024 Mikel Martín <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand All @@ -32,7 +32,7 @@ import Ajax from 'core/ajax';
*/
export const reorderQuestions = (moduleId, itemOrder) => {
const request = {
methodname: 'mod_feedback_questions_reorder',
methodname: 'mod_individualfeedback_questions_reorder',
args: {cmid: moduleId, itemorder: itemOrder}
};

Expand Down
8 changes: 4 additions & 4 deletions amd/src/usetemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Javascript module for using an existing template
*
* @module mod_feedback/usetemplate
* @module mod_individualfeedback/usetemplate
* @copyright 2021 Peter Dias
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
Expand All @@ -40,9 +40,9 @@ export const init = () => {

const modalForm = new ModalForm({
modalConfig: {
title: getString('use_this_template', 'mod_feedback'),
title: getString('use_this_template', 'mod_individualfeedback'),
},
formClass: 'mod_feedback\\form\\use_template_form',
formClass: 'mod_individualfeedback\\form\\use_template_form',
args: {
id: trigger.getAttribute('data-dataid'),
templateid: trigger.getAttribute('data-templateid')
Expand All @@ -57,7 +57,7 @@ export const init = () => {
} else {
Notification.addNotification({
type: 'error',
message: getString('saving_failed', 'mod_feedback')
message: getString('saving_failed', 'mod_individualfeedback')
});
}
});
Expand Down
Loading