Template: TeacherClasses: Difference between revisions

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


{{#tweekihide: sidebar-right}}{{#cargo_query:
<ul class="nav nav-tabs">
  <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
|fields=Classes.Name, Classes.description, Classes.Requiredby
|where=Classes.Teacher="Kelly Foshee" AND Classes.Offered="Currently"
|order by=Classes.Name ASC
|format=template
|template=ClassDisplay
|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
tables=Classes
|fields=Classes.Name, Classes.description, Classes.Requiredby
|fields=Classes.Name, Classes.description, Classes.Requiredby
|where=Classes.Teacher="Ademola Adeyemi" AND Classes.Offered="Currently"
|where=Classes.Teacher="{{PAGENAME}}" AND Classes.Offered != "Currently"
|order by=Classes.Name ASC
|order by=Classes.Name ASC
|format=template
|format=template
Line 15: Line 37:
|named args=yes
|named args=yes
}}
}}
  </div>
</div>


{{#if:{{CapstoneTeacherFilter|}}|
{{#if:{{CapstoneTeacherFilter|}}|
Line 20: Line 44:
<div class="card-columns">{{CapstoneTeacherFilter}}</div>}}
<div class="card-columns">{{CapstoneTeacherFilter}}</div>}}
</noinclude><includeonly>
</noinclude><includeonly>
{{#tweekihide: sidebar-right}}{{#cargo_query:
<ul class="nav nav-tabs">
  <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
Line 29: Line 63:
|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:20, 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 Kelly Foshee:

Courses available in the upcoming school year.
Error: operator for the virtual field 'Classes.Teacher' must be 'HOLDS', 'HOLDS NOT', 'HOLDS LIKE' or 'HOLDS NOT LIKE'.
Courses offered previously and not currently available.
Error: operator for the virtual field 'Classes.Teacher' must be 'HOLDS', 'HOLDS NOT', 'HOLDS LIKE' or 'HOLDS NOT LIKE'.

Capstones

No results