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

Add worlimit indicator for essays and quiz sites. #11

Closed
wants to merge 2 commits into from

Conversation

Menrath
Copy link

@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

@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
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