Skip to main content

Posts

How to disable email modification in Moodle

I want to disable user modification of their email account after registration in Moodle 3.1.7 I tried this with no luck https://moodle.org/mod/forum/discuss.php?d=169041 Solved As an administrator, you have to go to the manual accounts authentication manager. Here you have the option to lock profile fields, so the user can't edit them. This option is only available to users you created manually as administrator or created via upload with a CSV file. Go to the corresponding section: Settings > Site Administration > Plugin > Authentication > Manual accounts. And choose the locked value between the 3 available according to the official docs. Lock value: To prevent users from altering some fields (e.g. students changing profile information to inappropriate or misleading information), the site administrator can lock profile fields. It's usually a good idea to lock profile fields if you are maintaining this data in the external aut...
Recent posts

os.getenv("xxx") shows different result while using sudo or not to run python3

It happened to me when I try to use os.getenv. I have edited the "\etc\profile" file to add an env variable and ran the source command. And I wrote some codes to test it.It worked well and I can get the env variable I set when I run python just using python3 command in the command line. But I find it doesn't work when I using sudo python3.The os.getenv("xxx") returns None. That's the question.Why it doesn't work just because of using sudo. Solved sudo does not keep the user's environment variables. Maybe this can help: How to keep Environment Variables when Using SUDO

Can't deploy apk from eclipse in ubuntu 10.10

I've been making some apps for android for quite a while but I've only been using windows 7. Due to some reasons sometimes I'm forced to program in linux so I followed the guide to configure the SDK and eclipse (http://developer.android.com/guide/developing/device.html). After that I ran "adb devices" and got this: List of devices attached ???????????? device As you can see the name is unknown but this also happens in windows so I didn't fret too much over it. Then I launched eclipse and made a very simple project to test the deployment but here two things happened: 1st- It doesn't detect the android SDK version. (http://img515.imageshack.us/img515/5611/escolha.jpg) 2nd- when I try to deploy I get the following output: [2010-10-09 23:06:45 - testeAndroid] Android Launch! [2010-10-09 23:06:45 - testeAndroid] adb is running normally. [2010-10-09 23:06:45 - testeAndroid] Performing com.examples.teste.teste activity launch [2010-10-09 23:06:45...

Angularjs function calls order

I have a dropdown list of options, which are shown or not depending on conditions. Here is my controller: function FormOrderDialogController(tsModulesService, $scope, $q, $http, $uibModalInstance, params, $filter, Requester) Requester.restGet("/events/" + params.eventId, null, params.serverId).then((data)=>{ vm.event = data; }); Requester.restGet('/dic/10', null, null, null, true).then((resp) => { vm.templateTypes = resp; vm.templateType = vm.templateTypes[0].id; }); vm.isShowableTemplate = isShowableTemplate; function isShowableTemplate(templateType) { switch (templateType.id) { case 321: return !!vm.event.info.ticketTemplate; case 322: return !!vm.event.info.ticketETemplate; } } By the time isShowable...