Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Survey of existing page views and markup: Difference between revisions

From MoodleDocs
Line 15: Line 15:
<div class="region-content">
<div class="region-content">
   <span id="maincontent"></span>
   <span id="maincontent"></span>
  <h2 id="resourceheading" class="main">File</h2><!-- included here if Display resource name setting is enabled -->
   <div class="resourcecontent resourcegeneral">
   <div class="resourcecontent resourcegeneral">
     <object id="resourceobject" data="http://localhost/code/moodle22/pluginfile.php/31/mod_resource/content/7/Sample%20PowerPoint.pptx" type="application/vnd.openxmlformats-officedocument.presentationml.presentation" width="800" height="600" style="width: 971px; height: 400px; ">
     <object id="resourceobject" data="http://localhost/code/moodle22/pluginfile.php/31/mod_resource/content/7/Sample%20PowerPoint.pptx" type="application/vnd.openxmlformats-officedocument.presentationml.presentation" width="800" height="600" style="width: 971px; height: 400px; ">

Revision as of 20:02, 6 November 2012

Overall Conventions

  • First, the no-brainer: page content is inside of #region-main #region-content
  • Classes .box and .generalbox are utilized in many screen views, but not consistently across different resource and activity types
  • Most resources and activities use a combination of IDs and classes to style components

File resource

Screenshot of file resource view for a non-image, embedded file
Screenshot of file resource view for a non-image, embedded file, with *Display resource name* setting enabled


Markup as follows:

 

File

    <object id="resourceobject" data="http://localhost/code/moodle22/pluginfile.php/31/mod_resource/content/7/Sample%20PowerPoint.pptx" type="application/vnd.openxmlformats-officedocument.presentationml.presentation" width="800" height="600" style="width: 971px; height: 400px; ">
      <param name="src" value="http://localhost/code/moodle22/pluginfile.php/31/mod_resource/content/7/Sample%20PowerPoint.pptx">
         Click <a href="http://localhost/code/moodle22/pluginfile.php/31/mod_resource/content/7/Sample%20PowerPoint.pptx">Sample PowerPoint.pptx</a> link to view the file.
    </object>

Resource intro text

CSS is alotted using the following selectors: /* Note both body classname .path-mod-resource and body ID #page-mod-resource-view are used */

  1. page-mod-resource-view .resourcecontent {

text-align: center; } .path-mod-resource .resourcecontent { text-align: center; }

  1. page-mod-resource-view .resourcecontent {

text-align: center; margin: 20px; }

.mod_introbox { width: 90%; margin: 1em auto; } .mod_introbox { border-color: #DDD; } .mod_introbox { border: 1px solid; padding: 10px; }


  • #region-content is our content parent on this page
  • there is no parent object (parent of both .resourcecontent and #resourceintro which binds them together

Folder resource

Page resource

URL resource

Assignment Activity

Chat activity

Choice activity

Database activity

Forum activity

Glossary activity

Lesson activity

Quiz activity

SCORM activity

Survey activity

Wiki activity

Workshop activity