What is the example of a module that is local but not endolocal? A module $M$ over a ring $R$ is called local if $M$ has a largest proper submodule. 
A module $M$ over a ring $R$ is called endolocal if $End_R(M)$ is local.
I am trying to find an example for a local module but not endolocal.
 A: If $M$ is a uniserial right $R$-module that is neither hopfian nor cohopfian, then $End(M_R)$ has exactly two maximal left ideals. $M$ is of course local while this endomorphism ring is not.
You can find more details in Lam's First course in noncommutative rings in the appendix on such endomorphism rings.
A: This is a partial answer, since I restrict my attention in the case when $R$ is commutative.
What I want to show is that if $M$ is local, then $M$ is endolocal.
First of all, if $M$ is a local module, then it has a unique maximal submodule $N$. This means that any element $n \in M \setminus N$ is a generator of $M$. As a consequence $M$ is a cyclic module, i.e. $M$ is generated by a single element.
Cyclic modules are characterized by the following: an $R$-module is cyclic if and only if it is isomorphic to some module $R/I$, where $I$ is an ideal of $R$. Hence, there exists an ideal $I \subset R$ such that $$M \cong R/I$$
Moreover there exists a unique maximal ideal $\mathfrak{M} \subset R$ containing $I$, and the unique maximal ideal of $M$ is simply $\mathfrak{M}/I$.
Up to here everything works for non-commutative rings as well. If $M$ is a right (left) $R$-module, then $I$ will be a right (left) ideal of $R$.
Now, if $R$ is commutative, then $R/I$ is a ring, and indeed
$$\mathrm{End}_R (R/I) \cong R/I$$ as $R$-algebras.
To prove this, you can use the first isomorphism theorem on the surjective $R$-algebra morphism $R \to \mathrm{End}_R (R/I)$
$$x \mapsto (r+I \mapsto xr+I)$$
checking that its kernel is $I$.
Since $R/I$ is a local ring (its unique maximal ideal is $\mathfrak{M}/I$), we can conclude that $R/I$ is endolocal.
But $M$ is isomorphic to $R/I$, so $M$ is endolocal.
