Skip to content

Add worlimit indicator for essays and quiz sites.#11

Closed
Menrath wants to merge 2 commits intoSysBind:mainfrom
Menrath:MOODLE_311_STABLE
Closed

Add worlimit indicator for essays and quiz sites.#11
Menrath wants to merge 2 commits intoSysBind:mainfrom
Menrath:MOODLE_311_STABLE

Conversation

@Menrath
Copy link
Copy Markdown

@Menrath Menrath commented Mar 4, 2022

This adds a wordlimit indicator next to the wordcounter value, if the users edits some onlinetext with a supper/maximum wordlimit set.

As maxwordlimit for quiz sections have been introduced in Moodle 3.11 this PR breaks compatibility with older moodle versions.

Feedback welcome.

Copy link
Copy Markdown

@btc989 btc989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was pulling this into our version of wordcount. In wordlimit.php, get_wordlimits() I had to change the url comparison to:

strpos($PAGE->url->get_path(), '/mod/quiz/attempt.php')!== false (same for view.php)

This could be switched to regrex too. Our url paths were showing up differently so the exact comparison just was not working. Just thought I would leave the suggestion. Great work on this!

@Menrath
Copy link
Copy Markdown
Author

Menrath commented May 11, 2022

@btc989 I closed this PR in favour of #12

@Menrath Menrath closed this May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants