Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new class for interacting with posts #153

Open
wants to merge 67 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
715e132
new class for interacting with posts
TamaroWalter Jun 13, 2023
6eece3e
WIP: class diagram for new structure
TamaroWalter Jun 19, 2023
e6298dd
WIP: class diagram
TamaroWalter Jun 20, 2023
82fd83e
WIP: better class diagram
TamaroWalter Jun 20, 2023
be057c9
WIP write post_control class
TamaroWalter Jun 26, 2023
f9bac43
First stage of post_control ready
TamaroWalter Jun 27, 2023
3b7842d
Merge branch 'master' into redesign/post
TamaroWalter Jul 3, 2023
c100a20
WIP: writing new post class for interacting with posts
TamaroWalter Jul 3, 2023
c4c3128
run grunt
TamaroWalter Jul 5, 2023
c8ace61
WIP: building post class
TamaroWalter Jul 5, 2023
c120ca4
WIP: building the new post class
TamaroWalter Jul 10, 2023
fad5329
WIP: new post class. Adjusting print function
TamaroWalter Jul 11, 2023
c54fb26
new Discussion class as part of the redesign
TamaroWalter Jul 13, 2023
66f77e5
WIP: updating discussion functions in new discussion.php
TamaroWalter Jul 17, 2023
437e6ea
WIP: new functions in discussion and post for editing posts
TamaroWalter Jul 18, 2023
0e3c972
WIP: post and discussion class ready, post_control refactoring
TamaroWalter Jul 21, 2023
5ea9221
WIP: new post.php file, post control is almost ready
TamaroWalter Jul 26, 2023
70ac6d6
new post.php complete
TamaroWalter Jul 27, 2023
d99ec28
new post structure ready
TamaroWalter Jul 28, 2023
b71565e
change includes
NinaHerrmann Jul 28, 2023
0eed562
WIP: fixing errors
TamaroWalter Jul 28, 2023
ebc4be9
Testing new structure: replies works
TamaroWalter Aug 3, 2023
8961316
first testing completed and successful. Test classes still needed
TamaroWalter Aug 9, 2023
29e3a09
little compatibility fixes with new post structure
TamaroWalter Aug 10, 2023
5b61489
deleting unnecessary functions in the locallib
TamaroWalter Aug 10, 2023
1ffeb5b
new post_test class
TamaroWalter Aug 17, 2023
104a8dc
new phpunit tests for discussion class
TamaroWalter Aug 18, 2023
95b665c
behat fails in older versions fixed
TamaroWalter Sep 7, 2023
e5131ea
capability fixed in post_control
TamaroWalter Sep 7, 2023
8ffc2f0
replace html with html_writer
TamaroWalter Sep 7, 2023
ac61679
edit a discussion subject fixed
TamaroWalter Sep 7, 2023
aedb836
moodlechecker fixes
TamaroWalter Sep 7, 2023
1c7c208
function in locallib changed for behat testing environment
TamaroWalter Sep 7, 2023
2379466
fix in post control for behat testing environment
TamaroWalter Sep 7, 2023
eaa2611
code cleaning: long array syntax to short array syntax
TamaroWalter Oct 27, 2023
a6917ad
codechecker fix in subscriptions_test
TamaroWalter Nov 2, 2023
ef6bef8
grammar fix in comments
TamaroWalter Nov 30, 2023
140bef2
add deprecated comments
TamaroWalter Mar 11, 2024
bb98d33
bootstrap adjustments for Moodle 4.4.
TamaroWalter Mar 11, 2024
a705aa0
Completed updates for moodle 404
TamaroWalter Mar 12, 2024
397d407
user old format_string functions for compatibility
TamaroWalter Mar 12, 2024
586cf03
fix fails
TamaroWalter Mar 12, 2024
cc3e169
delete workflows for unsupported versions
TamaroWalter Mar 12, 2024
411d8de
include new moodle versions
TamaroWalter Mar 13, 2024
5c96fd6
test against master
TamaroWalter Mar 13, 2024
cf17932
syntax fix in workflows
TamaroWalter Mar 13, 2024
fb8ec84
adapt CI to moodle 4.4
TamaroWalter Apr 23, 2024
318ac17
Merge branch 'master' into update/M4.4
TamaroWalter Apr 23, 2024
0e75bcd
Merge branch 'master' into redesign/post
TamaroWalter Apr 23, 2024
c03c799
Change anonymous name from Anonymous to Questioner in attachment
TamaroWalter Apr 23, 2024
0a6d181
fix for behat test
TamaroWalter Apr 26, 2024
b6ecbf5
Shell escape the release notes in the release workflow
TamaroWalter May 2, 2024
7e81760
adapt workflow matrix to Moodle 404
TamaroWalter May 8, 2024
d2413a3
fixes for M4.4
TamaroWalter May 23, 2024
07ec785
more fixes for M4.4
TamaroWalter May 23, 2024
6e882c6
use deprecated behat funtion directly
TamaroWalter May 23, 2024
9605eba
refactor deprecated phpunit function
TamaroWalter May 23, 2024
7ea9f0e
add condition to use deprecated function in older Moodle versions
TamaroWalter May 23, 2024
1af92d1
Merge branch 'master' into update/M4.4
TamaroWalter May 23, 2024
d215afa
add delay for pgsql
TamaroWalter May 24, 2024
f207468
rollback
TamaroWalter May 24, 2024
730b256
WIP: try to fix phpunit test for postgresql
TamaroWalter May 28, 2024
334f619
codecleaning
TamaroWalter May 28, 2024
9bb30d1
enable transaction rollback
TamaroWalter May 28, 2024
9b99c25
pull from update/m4.4
TamaroWalter May 30, 2024
0eb6130
check for php version
TamaroWalter May 30, 2024
121957e
use moodle function to check php version
TamaroWalter May 30, 2024
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
31 changes: 18 additions & 13 deletions .github/workflows/moodle-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:

strategy:
matrix:
php: ['8.2']
moodle-branch: ['MOODLE_403_STABLE']
php: ['8.3']
moodle-branch: ['MOODLE_404_STABLE']
database: ['pgsql']

steps:
Expand Down Expand Up @@ -110,22 +110,27 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.1']
moodle-branch: ['MOODLE_401_STABLE', 'MOODLE_402_STABLE', 'MOODLE_403_STABLE']
php: ['8.0', '8.1', '8.2', '8.3']
moodle-branch: ['MOODLE_401_STABLE', 'MOODLE_402_STABLE', 'MOODLE_403_STABLE', 'MOODLE_404_STABLE']
database: ['mariadb', 'pgsql']
include:
- php: '8.2'
moodle-branch: 'MOODLE_402_STABLE'
database: 'mariadb'
exclude:
- php: '8.0'
moodle-branch: 'MOODLE_404_STABLE'
- php: '8.2'
moodle-branch: 'MOODLE_401_STABLE'
- php: '8.3'
moodle-branch: 'MOODLE_401_STABLE'
- php: '8.3'
moodle-branch: 'MOODLE_402_STABLE'
database: 'pgsql'
- php: '8.2'
moodle-branch: 'MOODLE_403_STABLE'
database: 'mariadb'
- php: '8.2'
- php: '8.3'
moodle-branch: 'MOODLE_403_STABLE'
include:
- php: '7.4'
moodle-branch: 'MOODLE_401_STABLE'
database: 'pgsql'
- php: '7.4'
moodle-branch: 'MOODLE_401_STABLE'
database: 'mariadb'

steps:
- name: Start MariaDB
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/moodle-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
--data-urlencode "vcstag=${TAGNAME}" \
--data-urlencode "changelogurl=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commits/${TAGNAME}" \
--data-urlencode "altdownloadurl=${ZIPURL}" \
--data-urlencode "releasenotes=${BODY}" \
--data-urlencode "releasenotes=${BODY@Q}" \
--data-urlencode "releasenotesformat=4")
echo "response=${RESPONSE}" >> $GITHUB_OUTPUT
- name: Evaluate the response
Expand Down
2 changes: 1 addition & 1 deletion amd/build/activityhelp.min.js.map

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

2 changes: 1 addition & 1 deletion amd/src/activityhelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Selectors = {
};

/**
* Function that shows the help string.
* Function that shows the help icon string.
*/
export const init = () => {
document.addEventListener('click', event => {
Expand Down
2 changes: 1 addition & 1 deletion amd/src/rating.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export function init(userid, allowmultiplemarks) {

/**
* Function to change the String of the post data-action button.
* Only used if mulitplemarks are allowed.
* Only used if multiplemarks are allowed.
* @param {string} htmlclass the class where the String is being updated
* @param {string} action helpful or solved mark
*/
Expand Down
14 changes: 7 additions & 7 deletions backup/moodle2/backup_moodleoverflow_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ protected function define_structure() {
$moodleoverflow = new backup_nested_element('moodleoverflow', ['id'], [
'name', 'intro', 'introformat', 'maxbytes', 'maxattachments',
'forcesubscribe', 'trackingtype', 'timecreated', 'timemodified',
'ratingpreference', 'coursewidereputation', 'allownegativereputation']);
'ratingpreference', 'coursewidereputation', 'allownegativereputation', ]);

// Define each element separated.
$discussions = new backup_nested_element('discussions');
$discussion = new backup_nested_element('discussion', ['id'], [
'name', 'firstpost', 'userid', 'timemodified', 'usermodified', 'timestart']);
'name', 'firstpost', 'userid', 'timemodified', 'usermodified', 'timestart', ]);

$posts = new backup_nested_element('posts');

$post = new backup_nested_element('post', ['id'], [
'parent', 'userid', 'created', 'modified',
'mailed', 'message', 'messageformat', 'attachment']);
'mailed', 'message', 'messageformat', 'attachment', ]);

$ratings = new backup_nested_element('ratings');

$rating = new backup_nested_element('rating', ['id'], [
'userid', 'rating', 'firstrated', 'lastchanged']);
'userid', 'rating', 'firstrated', 'lastchanged', ]);

$discussionsubs = new backup_nested_element('discuss_subs');

Expand All @@ -75,18 +75,18 @@ protected function define_structure() {
$subscriptions = new backup_nested_element('subscriptions');

$subscription = new backup_nested_element('subscription', ['id'], [
'userid']);
'userid', ]);

$readposts = new backup_nested_element('readposts');

$read = new backup_nested_element('read', ['id'], [
'userid', 'discussionid', 'postid', 'firstread',
'lastread']);
'lastread', ]);

$tracking = new backup_nested_element('tracking');

$track = new backup_nested_element('track', ['id'], [
'userid']);
'userid', ]);

// Build the tree.
$moodleoverflow->add_child($discussions);
Expand Down
Loading
Loading