Template: TeacherClasses: Difference between revisions

From TSAS Library
Jump to: navigation, search
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 4: Line 4:
{{TeacherClasses}}
{{TeacherClasses}}
</pre>
</pre>
Which yields the following for teacher [[Kelly Foshee]]:
Which yields the following for teacher [[Ademola Adeyemi]]:


<div><ul class="nav nav-tabs">
{{#tweekihide: sidebar-right}}{{#cargo_query:
  <li class="nav-item"><btn id="tab1Label" data-toggle="tab" class="nav-link active" role="tab" aria-controls="tab1" aria-selected="true">#tab1|Currently Available</btn></li>
  <li><btn id="btn2Label" data-toggle="tab" class="nav-link" role="tab" aria-controls="tab2" aria-selected="false">#tab2|Currently Unavailable</btn></li>
</ul>
<div class="tab-content">
  <div id="tab1" class="tab-pane fade show active" role="tabpanel" aria-labelledby="tab1Label">
    <div class="alert alert-primary">'''Courses available in the upcoming school year.'''</div>
 
 
{{#cargo_query:
tables=Classes
tables=Classes
|fields=Classes.Name, Classes.description, Classes.Requiredby
|fields=Classes.Name, Classes.description, Classes.Requiredby
|where=Classes.Teacher="Kelly Foshee" AND Classes.Offered="Currently"
|where=Classes.Teacher="Ademola Adeyemi" AND Classes.Offered="Currently"
|order by=Classes.Name ASC
|order by=Classes.Name ASC
|format=template
|format=template
Line 24: Line 15:
|named args=yes
|named args=yes
}}
}}
  </div>
  <div id="tab2" class="tab-pane fade" role="tabpanel" aria-labelledby="tab2Label">
    <div class="tip tip">'''Courses offered previously and not currently available.'''</div>


{{#cargo_query:
tables=Classes
|fields=Classes.Name, Classes.description, Classes.Requiredby
|where=Classes.Teacher="{{PAGENAME}}" AND Classes.Offered != "Currently"
|order by=Classes.Name ASC
|format=template
|template=ClassDisplay
|named args=yes
}}
  </div>
</div>
</div>
{{#if:{{CapstoneTeacherFilter|}}|
{{#if:{{CapstoneTeacherFilter|}}|
==Capstones==
==Capstones==
<div class="card-columns">{{CapstoneTeacherFilter}}</div>}}
<div class="card-columns">{{CapstoneTeacherFilter}}</div>}}
</noinclude><includeonly>{{#tweekihide: sidebar-right}}<ul class="nav nav-tabs">
</noinclude><includeonly>
  <li class="nav-item"><btn id="tab1Label" data-toggle="tab" class="nav-link active" role="tab" aria-controls="tab1" aria-selected="true">#tab1|Currently Available</btn></li>
{{#tweekihide: sidebar-right}}{{#cargo_query:
  <li><btn id="btn2Label" data-toggle="tab" class="nav-link" role="tab" aria-controls="tab2" aria-selected="false">#tab2|Currently Unavailable</btn></li>
</ul>
<div class="tab-content">
  <div id="tab1" class="tab-pane fade show active" role="tabpanel" aria-labelledby="tab1Label">
    <div class="alert alert-primary">'''Courses available in the upcoming school year.'''</div>
 
{{#cargo_query:
tables=Classes
tables=Classes
|fields=Classes.Name, Classes.description, Classes.Requiredby
|fields=Classes.Name, Classes.description, Classes.Requiredby
Line 61: Line 29:
|named args=yes
|named args=yes
}}
}}
  </div>
  <div id="tab2" class="tab-pane fade" role="tabpanel" aria-labelledby="tab2Label">
    <div class="tip tip">'''Courses offered previously and not currently available.'''</div>
{{#cargo_query:
tables=Classes
|fields=Classes.Name, Classes.description, Classes.Requiredby
|where=Classes.Teacher="{{PAGENAME}}" AND Classes.Offered != "Currently"
|order by=Classes.Name ASC
|format=template
|template=ClassDisplay
|named args=yes
}}
  </div>
</div>


{{#if:{{CapstoneTeacherFilter|}}|
{{#if:{{CapstoneTeacherFilter|}}|
==Capstones==
==Capstones==
<div class="card-columns">{{CapstoneTeacherFilter}}</div>}}
<div class="card-columns">{{CapstoneTeacherFilter}}</div>}}

Revision as of 13:37, 20 February 2022

This is the 'TeacherClasses' template. It pulls from the table Classes and filters by pagename for teacher, using Template:ClassDisplay to format. Because "Classes.Teacher" is not an included field, it is not displayed. It should be called in the following format:

{{TeacherClasses}}

Which yields the following for teacher Ademola Adeyemi:

Error: operator for the virtual field 'Classes.Teacher' must be 'HOLDS', 'HOLDS NOT', 'HOLDS LIKE' or 'HOLDS NOT LIKE'.

Capstones

No results