Added by greg, last edited by greg on Aug 02, 2011  (view change)

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

Themes change log

ATutor 2.0.3

  • Moved all the styles from the photo gallery's module.css file, into the theme styles.css file. Too may to list them all here. See the section at the end of one of the stock themes that come with ATutor, and copy that section into your theme's styles.css file.
  • Changed the h4.box styles to a h2.box styles to correct an issue with improperly nested heading elements.
  • added stylkes to rtl.css to better align images and text in the detailed view boxes that appear on the home page and student Tools page
div.details-text img{
	float:right;
	clear:right;
	padding-left:.2em;
}

div.details-text{
	line-height:1.5em;
	margin-right:.2em;
}

ATutor 2.0

There is no direct upgrade path from the 1.6 series themes to the 2.0 series themes. See the theme designer documentation in the ATutor Handbook and start creating a new theme.

ATutor 1.6

  • Modified themes/default/login.tmpl.php to adapt admin password encryption
  • line 08: document.form.form_password_hidden.value = hex_sha1(hex_sha1(*document.form.form_password.value)* + "<?php echo $_SESSION['token']; ?>");
  • Added $this->icon for a course icon path

ATutor 1.6.1

  • Added group_form fieldset and legend styles to conform with WCAG 2.0
  • Added inline javascript after the reference to sha-1factory.js:
<script language="JavaScript" src="sha-1factory.js" type="text/javascript"></script>


<script type="text/javascript">
/*
 * Encrypt login password with sha1
 */
function encrypt_password() {
	document.form.form_password_hidden.value = hex_sha1(document.form.form_password.value);
	document.form.form_password.value = "";
	return true;
}
</script>
  • Changed onclick attribute for submit button to:
<input type="submit" name="submit" value="<?php echo _AT('login'); ?>" class="button" onclick="return encrypt_password();" />

(both changes in /theme/login.tmpl.php)

ATutor 1.6.2

  • Added check for "allow registration" system preference setting to hide registration box in login.tmpl.php
    <?php
    if($_config['allow_registration'] ==1){
    ?>
    	<div class="column">
    		<form action="registration.php" method="get">
    			<div class="input-form" style="background-color:white;">
    			<fieldset class="group_form"><legend class="group_form"><?php echo _AT('new_user') ;?></legend>
    			<p><?php echo _AT('registration_text'); ?></p>
    
    			<?php if (defined('AT_EMAIL_CONFIRMATION') && AT_EMAIL_CONFIRMATION): ?>
    				<p><?php echo _AT('confirm_account_text'); ?></p>
    			<?php endif; ?>
    			<div style="width: 20%;margin-left:auto; margin-right:auto;margin-bottom:.6em;padding:.5em;">
    			<br /><br /><br />
    			<input type="submit" name="register" value="<?php echo _AT('register'); ?>" class="button" />
    			</div>
    			</fieldset>
    			</div>
    		</form>
    
    	</div>
    </div>
    <?php } ?>
    
  • Added check for "allow unenroll" system preference setting to hide unenroll link from users/index.tmpl.php
    <?php if ($row['member_id'] != $_SESSION['member_id']  && $_config['allow_unenroll'] == 1): ?>
    	- <a href="users/remove_course.php?course=<?php echo $row['course_id']; ?>"><?php echo _AT('unenroll_me'); ?></a>
    <?php endif; ?>
    

Preference changes in 1.6.2

  • Search for "<div id="breadcrumbs">" and wrap the code below around this div
    (include/header.tmpl.php)
<?php if ($_SESSION["prefs"]["PREF_SHOW_BREAD_CRUMBS"]) { ?>

show breadcrumbs here

<?php } ?>
  • Search for "if ($this->guide)" and change if condition to:
    (include/header.tmpl.php)
if ($this->guide && ($_SESSION["prefs"]["PREF_SHOW_GUIDE"] || $_SESSION["course_id"] == "-1")):

Show guide link here

<?php endif ?>
  • Search for "<div id="sequence-links">" and wrap the code below around the content of this div
    (include/header.tmpl.php)
<?php if ($_SESSION["prefs"]["PREF_SHOW_NEXT_PREVIOUS_BUTTONS"]){ ?>

show next previous links here.

<?php } ?>
  • Add in the code below before section"<div id="content-text">"(content.tmpl.php)
<?php
if ($_SESSION["prefs"]["PREF_SHOW_CONTENTS"] && $this->content_table <> "")
	echo $this->content_table;
?>
  • Add in the code below (styles.css)
/* Table of content attributes */
div#toc{
	margin-left: 20px;
}

fieldset#toc {
	background-color: #FEFDEF;
	border: 1pt solid #B8AE9C;
	width:50%;
}

/* format of "table of contents" on content page */
#toc a 		{ display:block; margin:3px; }
#toc .h2		{ padding:0 0 0 10px;}
#toc .h3		{ padding:0 0 0 30px;}
#toc .h4		{ padding:0 0 0 40px; }
#toc .h5		{ padding:0 0 0 50px; }
#toc .h6		{ padding:0 0 0 60px; }
  • Adjust the code below (registration.tmpl.php)

    Find this line:

<input type="hidden" name="form_password_hidden" value="" />

    Change it to:

<input type="hidden" name="form_password_hidden" value="" />
<input type="hidden" name="registration_token" value="<?php echo sha1($_SESSION['token']); ?>" />

ATutor 1.6.3

  • add to styles.css
    /* jQuery tooltip styles */
    #tooltip{
    	position:absolute;
    	z-index:3000;
    	border:3px solid #111;
    	background-color:#eeeeee;
    	padding:5px;
    }
    #tooltip h3,#tooltip div{
    	margin:0;
    }
    
    /* style for home page modules "detail view" */
    div.home_box {
    	width: 30em;
    	height: 150px;
    	padding-top: 15px;
    	float: left;
    }
    
    .outside_box{
    	margin-left:.4em;
    	background:#e0e0e0;
    	width:28em;
    	height:9.8em;
    }
    
    .inside_box{
    	width:100%;
    	margin:auto;
    	height:52%;
    	margin-bottom:.2em;
    	background:#eeeeee;
    
    }
    .details_or{
    	width:28.8em;
    	height:9.8em;
    	margin:0;
    	background-image:url(images/details_r.png);
    	background-position: top right;
    	background-repeat:no-repeat;
    }
    .details_ol{
    	height:9.8em;
    	margin:0px;
    	width:.45em;
    	background-image:url(images/details_l.png);
    	background-position: top left;
    	background-repeat:no-repeat;
    }
    .details_ir{
    	width:.5em;
    	height:100%;
    	float:right;
    	background-image:url(images/details_ir.png);
    	background-position: top right;
    	background-repeat:no-repeat;
    }
    .details_il{
    	height:100%;
    	float:left;
    	background-image:url(images/details_il.png);
    	background-position: top left;
    	background-repeat:no-repeat;
    }
    .home-title{
    	font-size:12pt;
    }
    .buttonbox{
    	float:right;
    }
    .details_text{
    	margin-left:1em;
    }
    .draggable_selected {
    	background-color: transparent;
    	cursor: move;
    }
    

*add to head area of include/header.tmpl.php calls javascript files
Add before this line:

<?php echo $this->custom_css; ?>

Add in:

<script src="<?php echo $this->base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>

*remove the old overlib line after the body element in include/header.tmpl.php

<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000; <?php if ($this->rtl_css): ?>direction:rtl;<?php endif; ?>"></div>
<script language="JavaScript" src="<?php echo $this->base_path; ?>overlib.js" type="text/javascript"></script>

* add just social if statement around the jump menu in include/header.tmpl.php to hide it when ATutor is used in ATutor Social mode

<?php if(!$this->just_social): ?>
<!-- start the jump menu -->

jump menu code appears here...

<!-- /end the jump menu -->
<?php endif; ?>

ATutor 1.6.4

  • One of the main changes in themes for this version is the moving of the old submenu links, that appeared below the main navigation tabs across the top of the screen, down to the very bottom of the header.tmpl.php file so they are rendered as another set of tabs that sit on top of the tool container, that sits in the content area and wraps around wherever tool might happen to be opened. The block of code to move from its current location below the <div id="topnavlistcontainer">, to the end of the header template file is:
<?php if (count($this->sub_level_pages) > 0): ?>
	<div id="subnavlistcontainer">
		<ul id="subnavlist">
		<?php if (isset($this->back_to_page)): ?>
			<a href="<?php echo $this->back_to_page['url']; ?>">
			<img border="0" width="10" height="11" alt="<?php echo
                        _AT('back_to').' '.$this->back_to_page['title']; ?>"
                       src="<?php echo $this->base_href;?>images/arrowicon.gif"
                       style="float:left;"/></a>&nbsp;&nbsp;
		<?php endif; ?>

		<?php $num_pages = count($this->sub_level_pages); ?>
		<?php for ($i=0; $i<$num_pages; $i++): ?>

			<?php if ($this->sub_level_pages[$i]['url'] == $this->current_sub_level_page): ?>

			<li><?php echo $this->sub_level_pages[$i]['title']; ?></li>
			<?php else: ?>
				<li><a href="<?php echo $this->sub_level_pages[$i]['url']; ?>">
                                  <?php echo $this->sub_level_pages[$i]['title']; ?></a></li>
			<?php endif; ?>
			<?php if ($i < $num_pages-1): ?>
				&nbsp;
			<?php endif; ?>
		<?php endfor; ?>
		</ul>
	</div>
<?php endif; ?>

The other half of this change is the styles added to the end of the styles.css file for the theme. these styles are as follows.

/*****************************/

div#subnavlistcontainer {
	width:95%;
	margin:auto;



}
div.toolcontainer{
	width:90%;
        margin:auto;
        border:thin solid #e8e8e8;
        padding-top:1em;
        padding-bottom:1em;
}

ul#subnavlist {
	padding-top: 5px;
	margin-top: 0px;
	font-family: Verdana,Helvetica,Arial,serif;
}

ul#subnavlist li {
	white-space: nowrap;
  	background-color: #FFFFFF;
	list-style: none;
	display: inline;
	margin: 0px;
	font-weight:700;
	text-align:center;
	border:thin solid #cccccc;
	padding:0em 1em 0em;
}

ul#subnavlist li a:hover, ul#subnavlist li a:focus, ul#subnavlist li a.active{
  	color: black;
	text-decoration:none;
}

ul#subnavlist li a {
    /* The normal, unselected tabs. They are all links */
   	color: #555;
    	height: 1.5em;
   	text-decoration:underline;
	background-color:white;
	font-weight:500;

}

div.menuedit{
        float:right;
        margin-top:-1.2em;
        border:1px solid #cccccc;"
}

To accommodate the width of the new submenu toolbar, the width of tool screens/panels have been updated in many places to a consistent width of 95%. Set any tables or divs that wrap around a tool to 95%. The new toolbar sits on top of the various tool panels.

Contents

* After the javascripts in the head area of the include/header.tmpl.php include this javascript to ensure jQuery scripting does not conflict with other existing scripts.

	<script language="javascript" type="text/javascript">
	//<!--
	jQuery.noConflict();
	//-->
	</script>
  • Add in slow collapsible menus to header.tmpl.php

    To add slow collapsing menus, replace the toggleToc() function with the new one:

//Old function looks like this
function toggleToc(objId) {
	var toc = document.getElementById(objId);
	if (toc == null) {
		return;
	}
	var showlink=document.getElementById(objId + 'showlink');
	var hidelink=document.getElementById(objId + 'hidelink');
	if (hidelink.style.display == 'none') {
		document.getElementById('contentcolumn').id="contentcolumn_shiftright";
		toc.style.display = '';
		hidelink.style.display='';
		showlink.style.display='none';
	} else {
		document.getElementById('contentcolumn_shiftright').id="contentcolumn";
		toc.style.display = 'none';
		hidelink.style.display='none';
		showlink.style.display='';
	}
	setcookie(objId, toc.style.display, 1);
}

    Change it to:

// Replace with this new function
function toggleToc(objId) {
	var toc = document.getElementById(objId);
	if (toc == null) {
		return;
	}
	var showlink=document.getElementById(objId + 'showlink');
	var hidelink=document.getElementById(objId + 'hidelink');

	if (hidelink.style.display == 'none') {
		document.getElementById('contentcolumn').id="contentcolumn_shiftright";
		jQuery("[id="+objId+"]").slideDown("slow");
		hidelink.style.display='';
		showlink.style.display='none';
	} else {
		document.getElementById('contentcolumn_shiftright').id="contentcolumn";
		jQuery("[id="+objId+"]").slideUp("slow");
		hidelink.style.display='none';
		showlink.style.display='';
	}
	setcookie(objId, hidelink.style.display, 1);
}
  • add more javascript functions to the script area in the header.tmpl.php file to control folder toggle open/close icons
    // toggle content folder in side menu "content navigation"
    function toggleFolder(cid)
    {
    	if (jQuery("#tree_icon"+cid).attr("src") == tree_collapse_icon) {
    		jQuery("#tree_icon"+cid).attr("src", tree_expand_icon);
    		jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('expand'); ?>");
    		setcookie("c<?php echo $this->course_id;?>_"+cid, null, 1);
    	}
    	else {
    		jQuery("#tree_icon"+cid).attr("src", tree_collapse_icon);
    		jQuery("#tree_icon"+cid).attr("alt", "<?php echo _AT('collapse'); ?>");
    		setcookie("c<?php echo $this->course_id;?>_"+cid, "1", 1);
    	}
    
    	jQuery("#folder"+cid).slideToggle();
    }
    
    // toggle elements in side menu
    function elementToggle(elem, title)
    {
    	element_collapse_icon = "<?php echo $this->base_path; ?>images/mswitch_minus.gif";
    	element_expand_icon = "<?php echo $this->base_path; ?>images/mswitch_plus.gif";
    
    	if (jQuery(elem).attr("src") == element_collapse_icon) {
    		jQuery(elem).attr("src", element_expand_icon);
    		jQuery(elem).attr("alt", "<?php echo _AT('show'). ' '; ?>"+ title);
    		jQuery(elem).attr("title", "<?php echo _AT('show'). ' '; ?>"+ title);
    		setcookie("m_"+title, 0, 1);
    	}
    	else {
    		jQuery(elem).attr("src", element_collapse_icon);
    		jQuery(elem).attr("alt", "<?php echo _AT('collapse'); ?>");
    		jQuery(elem).attr("alt", "<?php echo _AT('hide'). ' '; ?>"+ title);
    		jQuery(elem).attr("title", "<?php echo _AT('hide'). ' '; ?>"+ title);
    		setcookie("m_"+title, null, 1);;
    	}
    
    	jQuery(elem).parent().next().slideToggle();
    }
    
    function printSubmenuHeader(title)
    {
    	if (getcookie("m_"+title) == "0")
    	{
    		image = "<?php echo $this->base_path?>images/mswitch_plus.gif";
    		alt_text = "<?php echo _AT('show'); ?> " + title;
    	}
    	else
    	{
    		image = "<?php echo $this->base_path?>images/mswitch_minus.gif";
    		alt_text = "<?php echo _AT('hide'); ?> " + title;
    	}
    
    	document.writeln('<h4 class="box">'+
    	'	<input src="'+image+'"' +
    	'	       onclick="elementToggle(this, \''+title+'\'); return false;"' +
    	'	       alt="'+ alt_text + '" ' +
    	'	       title="'+ alt_text + '"' +
    	'	       style="float:right" type="image" /> '+ title +
    	'</h4>');
    }
    
  • In header.tmpl.php & side_menu.inc.php, replace all occurances of $_SESSION['course_id'] with $this->course_id

ATutor 2.0

* change the path in the default/test_questions/matchingdd.tmpl.php from

tools/tests/dd.php
to
mods/_standard/tests/dd.php?qid

* add course categories array to themes API

 $this->cats

* change "sequence-links" in the default/include/header.tmpl.php from

<div id="sequence-links">
to
<div class="sequence-links">

* change "sequence-links" definition in the default/styles.css & default/print.css from

div#sequence-links
to
div.sequence-links