I want to re-populate and hide site URL entry page. In this way, users in my institution do not need to type in Moodle site URL when loginning, since we only have one Moodle site in my institution.
What I do is add a little bit code to the build/mm.bundle.js:
.state('mm_login.site', {
url: '/site',
templateUrl: 'core/components/login/templates/site.html',
controller: 'mmLoginSiteCtrl',
/**-------------------------------add code start----------------------------------------------*/
onEnter: function($state) {
$state.go('mm_login.credentials', {siteurl: 'http://xxx.xxx.edu.cn'}); // (here is my institution Moodle URL)
}
/**--------------------------add code end---------------------------------------------------*/
})
However, the code you provide seems cause another problem. After add the code, the "Grades" icons where a list of courses a user has is lost, as can be seen below.
Before I add the code, the page is shown as below. (I hide some other icons which are unnecessary to my institution.)
I use the code for android phonegap build, version 2001. Here is my code in Github: https://github.com/yezi08/android_start_from_8.16_only_one_login.git
Since "Grades" is quite an important function for both our students and staff to check their personal and overall grades, I really do not want to loss the function. So I wondered whether you know how to both have re-populate and hide entry URL, as well as have the "grades" function.
In addition, there is a Moodle mobile developer contact me personally about how to re-populating and hiding entry URL. So I am quite sure it is a problem that many developers are facing. It is a very useful function and can also help many people if it is solved. Thank you very much for your help!