LMSouq

Knowledge Base

Browse Moodle Solutions

2108 solutions found

Page 97 of 106
0 votes
1 ans
3 views
How do you use bcrypt for hashing passwords in PHP?

Every now and then I hear the advice "Use bcrypt for storing passwords in PHP, bcrypt rules". But what is `bcrypt`? PHP doesn't offer any such...

php-dev Solved
VI
asked 1 month ago by Vilx-
0 votes
1 ans
3 views
Enumerations on PHP

I know that PHP doesn't yet have native Enumerations. But I have become accustomed to them from the Java world. I would love to use enums as a way to give p...

php-dev Solved
HE
asked 1 month ago by Henrik Paul
0 votes
1 ans
3 views
How can I sanitize user input with PHP?

Is there a catchall function somewhere that works well for sanitizing user input for SQL injection and XSS attacks, while still allowing certain types of HTML t...

php-dev Solved
BR
asked 1 month ago by Brent
0 votes
1 ans
3 views
Secure hash and salt for PHP passwords

It is currently said that MD5 is partially unsafe. Taking this into consideration, I'd like to know which mechanism to use for password protection. This...

php-dev Solved
LU
asked 1 month ago by luiscubal
0 votes
2 ans
3 views
What are Long-Polling, Websockets, Server-Sent Events (SSE) and Comet?

I have tried reading some articles, but I am not very clear on the concepts yet. Would someone like to take a shot at explaining to me what these technologie...

server-admin Solved
US
asked 1 month ago by user1437328
0 votes
1 ans
3 views
PHP array delete by value (not key)

I have a PHP array like so: $messages = [312, 401, 1599, 3, ...]; Given that **the values in the array are unique**, how can I delete the element with...

php-dev Solved
AD
asked 1 month ago by Adam Strudwick
0 votes
1 ans
3 views
How do I expire a PHP session after 30 minutes?

I need to keep a session alive for 30 minutes and then destroy it.

php-dev Solved
TO
asked 1 month ago by Tom
0 votes
1 ans
3 views
What is stdClass in PHP?

Please define what `stdClass` is.

php-dev Solved
KE
asked 1 month ago by Keira Nighly
0 votes
1 ans
3 views
How do I use PHP to get the current year?

I want to put a copyright notice in the footer of a web site, but I think it's incredibly tacky for the year to be outdated. How would I make the year u...

php-dev Solved
JD
asked 1 month ago by JD Graffam
0 votes
1 ans
3 views
Returning JSON from a PHP Script

I want to return JSON from a PHP script. Do I just echo the result? Do I have to set the `Content-Type` header?

php-dev Solved
SC
asked 1 month ago by Scott Nicol
0 votes
1 ans
3 views
What is the difference between public, private, and protected?

When and why should I use `public`, `private`, and `protected` functions and variables inside a class? What is the difference between them? Examples:...

general-dev Solved
AD
asked 1 month ago by Adam Halasz
0 votes
1 ans
3 views
Detecting request type in PHP (GET, POST, PUT or DELETE)

How can I detect which request type was used (GET, POST, PUT or DELETE) in PHP?

php-dev Solved
UN
asked 1 month ago by UnkwnTech
0 votes
1 ans
3 views
Where can I find php.ini?

Today I needed to install the IBM DB2 library. I went through all the steps up to `make install`, and I found ibm_db2.so in `$PHP_HOME/lib/extensions/somecompl...

php-dev Solved
NE
asked 1 month ago by necromancer
0 votes
1 ans
3 views
Login API in moodle angular 8

I need to login my user from my website to the moodle page.I have build function that create user and make enroll to course,Now i need to make auto login....

moodle-core Solved
VL
asked 1 month ago by Vladimir Potapov
0 votes
1 ans
3 views
Moodle change badges image size

when I create a badge in Moodle 3.5, the core automatically creates 3 thumbs for the badge icon (35x35, 100x100, 512x512). I should increase the size of the 100...

moodle-core Solved
BT
asked 1 month ago by btb84
0 votes
1 ans
3 views
"Not available unless: You belong to <Some group>" : How to hide this message in moodle course

I&#39;m building a Moodle course for my students who are part of different batches. Each batch refers same lesson notes, but the Quiz and Assignment activities...

moodle-core Solved
CO
asked 1 month ago by code
0 votes
1 ans
3 views
Adding new moodle UI elements according to the onchange event of a select element

I&#39;m new in moodle and I always programmed at client-side. I think maybe I&#39;m missing something because of that reason. I need to provide the user with di...

moodle-core Solved
GA
asked 1 month ago by gal007
0 votes
1 ans
3 views
Moodle: web service call to get assignments under course

I have an application where I need to fetch records from Moodle using the core Web Service API. I am receiving courses and categories with the following API...

moodle-core Solved
TE
asked 1 month ago by TechNo
0 votes
1 ans
3 views
How to resolve unexpected end of input in file picker moodle

Hi Iam using moodle cms to develop my e-learning website everything OK except one problem when i trying to search any youtube video the first image error shown...

moodle-core Solved
US
asked 1 month ago by user3773761
0 votes
1 ans
3 views
Should I use the datetime or timestamp data type in MySQL?

Would you recommend using a [datetime][1] or a [timestamp][1] field, and why (using MySQL)? I&#39;m working with PHP on the server side. [1]: https:/...

database Solved
GA
asked 1 month ago by Gad