theme applied to questionnaire?

theme applied to questionnaire?

by N Hansen -
Number of replies: 10
Can we expect in the future that our standard Moodle Themes will be able to be applied to the questionnaire module output? It just plops everything down on the background of a Moodle page right now. I want to know whether I should try tweaking styles.php in my theme to reflect the various classes used by phpESP or whether I should hold off until this is better integrated and it draws more heavily from config.php.
Average of ratings: -
In reply to N Hansen

Re: theme applied to questionnaire?

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hopefully. Eventually...

Any efforts you can put towards merging the phpESP themes with the Moodle themes would be greatly appreciated.

mike  
In reply to Mike Churchward

Re: theme applied to questionnaire?

by N Hansen -
My first impression was that certain css classes defined by phpESP really need to be combined into larger classes to achieve a Moodle "look," and that this will require some changing of the php, which I am not able to do myself. However, I can take a look at it and make some suggestions as to how things might be grouped together and what colors from config.php and styles in styles.php could be applied to various elements at least as a first step. I'm very keen on this module because I want to develop a Web site shaped by students' desires and needs and I plan to rely heavily on questionnaires for this purpose.
In reply to N Hansen

Re: theme applied to questionnaire?

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Please. Make all the suggestions you can.

I'd also like to more tightly integrate the whole module with Moodle. Any ideas you have to make the management functions work more Moodle-like would be helpful.

mike
In reply to Mike Churchward

Re: theme applied to questionnaire?

by N Hansen -
Mike-I looked over the questionnaire with an eye towards integrating it theme-wise. I looked for a model on which to base the theme for the questionnaire and decided that the best model is the quiz module. Here's how I would change things in the questionnaire in order to make it more quiz-like in appearance:

  1. The content of the header class "surveyTitle" should look like the Name of Quiz does-in other words, centered and in bold.
  2. The content of the header class "surveySubtitle" should like like "Attempt 1" that appears under the name of the quiz.
  3. The content currently in the classes "addInfo," "message" and "reqQuestion" should appear together and have the classes "generalbox" and 'generalboxcontent" applied to the whole.
  4. Each one of the questions themselves should be in a "generalbox" and "generalboxcontent" of their own themselves.
  5. The "Submit survey" button needs to be centered. It wouldn't hurt either if it were just renamed to "Submit." This would allow the questionnaire to be used for more purposes than just questionnaires and would avoid confusion with the survey module.
For the page that appears after the questionnaire is submitted, if this is chosen, here's what should happen:

  1. "Thankhead" should look like the name of the quiz.
  2. "Thankbody" should go inside a "generalbox" and "generalboxcontent."
  3. The "returnlink," as is, is not clear about where it is returning you to. It needs to be centered as well.
I hope that is of some help to you. Sorry I'm no programmer so I can't actually implement these changes myself.

In reply to N Hansen

Re: theme applied to questionnaire?

by N Hansen -
Mike-Please ignore my various musings on this topic above. Armed with the new Mozilla developers tool, I've managed to implement what I wanted to implement. Here's my css. I am using my own theme here so colors in the standard theme would be slightly different, but I based my changes on the class generalbox as a model for qnOuterTable and surveyTitle so anyone wanting to implement this should just use their own generalbox as a model.

.qnOuterTable { border-width: 1px; border-color: #B1CCFF; border-style: solid; background-color: #E6EFFF; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -moz-border-radius-bottomleft: 15px; -moz-border-radius-bottomright: 15px }

.surveyTitle {border-width: 1px; border-color: #B1CCFF; border-style: solid; background-color: #FFFFFF; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -moz-border-radius-bottomleft: 15px; -moz-border-radius-bottomright: 15px; color: #000000; text-align: center}

.reqQuestion {color: #000000}

.surveySubtitle {color: #000000; text-align: center}

.addInfo {color: #000000; text-align: center}

.message {color: #000000; text-align: center}
In reply to N Hansen

Re: theme applied to questionnaire?

by N Hansen -
Here's the css for the thank you page:


.thankhead {border-width: 1px; border-color: #B1CCFF; border-style: solid; background-color: #FFFFFF; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -moz-border-radius-bottomleft: 15px; -moz-border-radius-bottomright: 15px; color: #000000; text-align: center}

.thankbody {text-align: center}

There's only one problem I can't seem to solve-How do I get the returnlink on the thank you page to be centered? It's a hyperlink, and it isn't inside a div or a p that itself could be centered and so I'm at a loss how to do this. Anyone know what to do?
In reply to N Hansen

Re: theme applied to questionnaire?

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Thanks for all the work. I'll try to get this into the CVS version soon.

You can change the code in the file 'phpESP/admin/include/funcs.inc'. The text that gets written out is there. You can also specify a page to use for a return page when you create the survey.

mike
In reply to Mike Churchward

Re: theme applied to questionnaire?

by N Hansen -
Mike-Stupid me! I thoughtful I didn't bother to test my css before posting it here (can't recall why I did that), but I just uploaded it to my site now and I found a couple problems, which I am working on fixing at the moment.

But while looking at the funcs.inc file, it occurred to me that perhaps the "return" link on the thank you page is unnecessary within Moodle. Since Moodle automatically puts links to all the potential places one might want to "return" to somewhere on the thank you page already, it seems to me that including this return button is unnecessary and potentially confusing. What do you think?
In reply to N Hansen

Re: theme applied to questionnaire?

by N Hansen -
Mike-I will get around to posting the updated CSS sooner or later (I have finished it but want to just test it more this time), but I just wanted to post another suggestion while I came across it. In the handler.php file, I have put all the inputs of type "submit" within divs that center them. For example:

    <div valign="top" align="center">
    <input type="hidden" name="submittype" value="Submit Survey">
    <input type="submit" name="submit" value="<?php print_string('submitsurvey', 'questionnaire'); ?>">
    </div>

In the example page layout that came with phpESP, the submit button is centered, but in the actual implementation within Moodle it doesn't seem to be that way, and instead is way over on the left side of the page. The above hack fixed this.
In reply to N Hansen

Re: theme applied to questionnaire?

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
It might be better to use a class for this. That way, anyone who wants to change the position of the buttons can.

mike