forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-82124 mod_assign: recalculate penalty
- Loading branch information
Nathan Nguyen
committed
Aug 30, 2024
1 parent
ca4f081
commit 10e78b6
Showing
11 changed files
with
201 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import Modal from 'core/modal'; | ||
|
||
// Custom modal. | ||
let modal = null; | ||
|
||
/** | ||
* Override Delete Modal | ||
*/ | ||
export class OverrideDeleteModal extends Modal { | ||
static TYPE = "mod_assign/override_delete_modal"; | ||
static TEMPLATE = "mod_assign/override_delete_modal"; | ||
} | ||
|
||
/** | ||
* Selectors | ||
*/ | ||
const SELECTORS = { | ||
DELETE_BUTTONS: '.delete-override', | ||
}; | ||
|
||
export const init = async () => { | ||
|
||
// Create the modal. | ||
modal = await OverrideDeleteModal.create({}); | ||
|
||
// Add event listeners. | ||
document.querySelectorAll(SELECTORS.DELETE_BUTTONS).forEach(button => { | ||
button.addEventListener('click', async (event) => { | ||
event.preventDefault(); | ||
show(event.target); | ||
}); | ||
}); | ||
|
||
}; | ||
|
||
/** | ||
Check failure on line 36 in mod/assign/amd/src/override_delete_modal.js GitHub Actions / Grunt
|
||
* Show the modal. | ||
*/ | ||
export const show = (target) => { | ||
// | ||
modal.show(); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{! | ||
This file is part of Moodle - http://moodle.org/ | ||
Moodle is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(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/>. | ||
}} | ||
{{! | ||
@template mod_assign/override_delete_modal | ||
Example context (json): | ||
{ | ||
} | ||
|
||
}} | ||
{{< core/modal }} | ||
{{$title}}{{#str}} login {{/str}}{{/title}} | ||
{{$body}} | ||
<div class="container"> | ||
<form> | ||
<div class="form-group row"> | ||
<label for="inputEmail" class="col-sm-2 col-form-label">{{#str}} email {{/str}}</label> | ||
<div class="col-sm-10"> | ||
<input type="email" class="form-control" id="inputEmail" placeholder="{{#str}} email {{/str}}"> | ||
</div> | ||
</div> | ||
<div class="form-group row"> | ||
<label for="inputPassword" class="col-sm-2 col-form-label">{{#str}} password {{/str}}</label> | ||
<div class="col-sm-10"> | ||
<input type="password" class="form-control" id="inputPassword" placeholder="{{#str}} password {{/str}}"> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
{{/body}} | ||
{{$footer}} | ||
<button type="button" class="btn btn-primary" data-action="login">{{#str}} login {{/str}}</button> | ||
<button type="button" class="btn btn-secondary" data-action="cancel">{{#str}} cancel {{/str}}</button> | ||
{{/footer}} | ||
{{/ core/modal }} |