Modifying login form controller in Chamilo LMS - chamilo-lms

I am working on a site based on Chamilo LMS.
I want to change some styles and form fields in the login form. I found the template for the login form, but I am not able to find the PHP code that handles the logic for the login form. Where is this code located?

It depends on your version, but you should find a reasonnable part of the login form logic in main/inc/local.inc.php.
If you are going to modify the login form, I would kindly suggest you look into the "custom pages" feature. Search for the custompages/ folder and, if you're in 1.9.10.2 or 1.10.0, make a copy of the files there before you rename them (to remove the "dist" part) and update them to suit your needs.

Related

Devtool is empty when inspecting it - cannot use FindElementById

I am trying to automate web form data entry by using selenium VBA. We need to submit the forms on our organization SharePoint site, which requires us to log-in. I have already logged into the account. Please see the code below. Whenever I open the page (last step), there is a pop-up window asking me to enter the username and password again. I need to pass this step in order to get to the form that I want to enter all my information. I am not quite sure if this is an extra security that our IT team set up, but I could not inspect the page. I have included a screenshot here. I am hoping to inspect the pop-up window somehow so that I could use FindElementById. Thank you in advance for your reply.
obj.Start "chrome", ""
obj.Get "link"
obj.FindElementById("passwordInput").SendKeys ("password")
obj.FindElementById("submitButton").Submit
obj.FindElementById("idSIButton9").Submit
obj.FindElementByClass("reg-button").Click
obj.Wait ("1000")
obj.FindElementByXPath("//div[#id='slwp_ctl00_ctl41_g_f6ad5b95_2503_406f_ad81_eb5b3f59cad2']/div/div[3]/ul/li[10]/div/a").Click
I had a similar issue. However, in my case the dialog box was coming even before the login page was displayed.
The solution to the issue is given here
Maybe something similar will help for you. Please try following steps.
I am not sure of the syntax in VBA. But these steps should help you.
Get the current URL.
In java this can be done by using the getCurrentUrl() method of WebDriver interface.
Modify this current URL to include username and password.
The modified URL should be of in the following format:
http://username:password#example.com/
In java, this can be done by using the various methods of String class,
Submit the modified URL.
In java this can be done by using the get(String URL) method of WebDriver interface.

How can I duplicate a folder and change the name?

I'm trying to setup a signup form on my webpage, once the user creates there account, I would like to automatically create a folder of what the user typed in a input with the ID of cfinput, the problem i'm running into, is I am not experienced in the jQuery zones, I focus on creating front-end design using CSS and HTML languages. Summarization, I can't figure out how to create a copy of a folder named base_org and change it's name to what the user wrote in the input listed above,
Any help is greatly appreciated, if you have any questions just comment and I will try to re-edit my post to make it more clear.
JavaScript cannot do this on the client side. You need a backend which processes the signup form submission and creates a copy of your base directory.
A general solution is to call the system's copy command. On Linux, you can copy a directory like this:
cp -r /path/to/base_org /path/to/new_folder
You can execute the shell command in your preferred backend language. For example in PHP, you can use shell_exec:
// process the form first and put username in $username
shell_exec("cp -r /path/to/base_org /path/to/$username");
Make sure the username won't contain any invalid or special characters or other shell commands.
Another option would be to use the backend language's API to copy the directory.

Multiple Shiny apps using the ui to populate the second app

I currently have a app that manages projects. The user sees a list of projects and can select one. They can should (it would be nice) be able to click a run button and have another app open. The parameters stored in the project they selected are populated into the second application. The issue I am having is firing the second application. runApp generates the following.
ui code line:
actionButton("RunProj", "Run"),
Warning in run(timeoutMs) :
Unhandled error in observer: Key / already in use
observeEvent(input$RunProj)
I would like to trigger the second app and pass in the location of the project directory I have looked at parseQueryString and still trying to figure out a way to include that. Maybe via a redirect?
Any suggests would be much appreciated.
Regards,
Rich
I'm not 100% sure if I understand your intention correctly but here is a few things I think you may want to think about.
In one project, if you want to run a few kinds of analyses, you may want to try navbarPage
If there are many different types of analyses, you may want to try shinydashboard
If you know the link to each app and you really want to add those "run" buttons, you can add a button manually in ui.R. I think you can write some codes in server.r to generate the link based on your database.
tags$a(href="the link to your apps", class= "btn btn-default", "Run App")

Add A Background

I was wondering if there was any way of changing the background in access. The standard grey is ok but I would like to change it to an image that shows instructions or what was updated last. Also, if I can allow a user to change the background to an image of their choice that would be cool as well.
Can this be done
To be honest, I'm not sure if this is possible or not, but if it is, I'd advise you not to do it. Why?
Users will expect instructions under a help menu or on an intro
splash form
They will expect info. like what was updated last to appear in more
conventional places like the status bar
Allowing users to personalise your application with their photos can
make your application look pretty bad and increase load times.
Only advice though - good luck with it!
I have been able to allow users to change the background of the database. It works great and it works no matter what computer they log onto the database from. I did have a problem with remote users so I added a macro that allows them to disable the functionality. It works great. It was a little complicated to se up initially. Some of the modules below may have more stuff contained in them then what is needed for the purpose of this question. But here is what I did to make it work:
Add the Following modules to your database: modChangeMDI, SetBackgroundImage, and clsCommonDialog
Link to a zip file containing the code for the above modules: http://www.filedropper.com/changebackgroundimage
You can set the default location that a users sees when the search for file dialog pops up. This is located in the ThisFileToOpen function of the SetBackgroundImage module.
clsCommonDialog <-- Used to open the find file dialog box
modChangeMDI <--Used to change the background image
Create a table called $BackgroundLocation with the following fields. On my database this is contained in the backend database.
ID (AutoNumber, Primary Key)
UserID (Text, Required, 250 in length, don't allow zero lengths)
BackgroundLocation (Text, 255 in length, not required)
DisableBackground (boolean)
Create an AutoExec macro and add an action that runs the code SetTheBackgroundPictureOnStartup (1)
Create a BackgroundDisableEnable macro and add an action that runs the code DisableEnableBackground()
Create a BackgroundSet macro and add an action that runs the code SetTheBackgroundPictureOnStartup(2)
Then assign the BackgroundDisableEnable and the BackgroundSet macro to their own menu item.
When the database opens it will run the AutoExec by default.
You can use a start-up form as I suggested above. You can even base the start-up form on a comments table that can be edited by the users and will display the most recent and / or relevant information. The form can be displayed at start-up and then referred to at any time by the users.
In the past, I have included a ? button on forms that open such a form at the relevant page.

Plone and Mysql Searching

I have Mysql and Zope talking to each other nicely.
I can insert values in, and even view one record from the databse and have it show up in the form fields(not that cool really).
I have just been following tutorials, but now I need to search the Database and display the results.
I have been fiddling with this for a while but I haven't gotten far.
I know that using a Zope Page template we can call the Zsql method and show the results with TAL, but I need to some how using a script and a redirect form the search form pass the search data.
Can anyone help we get started?
Can anyone show me a way to do it with formgen and a custom script adapter?
Go into your ZMI, and add a "Z Search Interface" object in the same folder as your ZSQL method. Your ZSQL methods should show as "searchable objects". Select the ZSQL method you want, fill in the rest of the fields, and it will generate form and display page templates. Then modify the templates to taste.