unconnected views?

unconnected views?

by Çağlar MERSİNLİ -
Number of replies: 12

hi ;

my scenario ;

my dataform has  3 views  (overview(visible),lessons(hidden), assignment(hidden)). lessson and assignment have different fields . 

Q1:

i see enrty in lessons at the same time  ,when i add new entry to assignment view . Where I'm doing wrong. Is it not possible unconnected views?

Q2:

my  assignment(view)  has checkbox as complete or incomplete

now i wanna  display   " enrty at assignment which has selected incomplete checkbox  "  in overview (view) of my dataform.

i used filter in assignment (view)   and  i used  ##viewcontent:assignment##  in overview (view)  . I managed to display  enrty at assignment which has selected incomplete checkbox   in overview (view) of my dataform.  But i wanna display  all enrty in assignment (view) when i go to views Manage whereas  i can see  enrty which only selected incomplete checkbox at assignment 's view.(because i used filter).

also i wanna  put the link at overview (view) as " all asigment 's entries " . so i need   both filtered and unfiltered assignment(view)... how can i do this ?


Average of ratings: -
In reply to Çağlar MERSİNLİ

Re: unconnected views?

by Itamar Tzadok -

I'm not sure I understand the scenario. Can you please illustrate with screenshots? smile

In reply to Itamar Tzadok

Ynt: Re: unconnected views?

by Çağlar MERSİNLİ -

for Q1 ;

now  my dataform has   view1 and view2    ..    i add enrty  view1  but i can display my enrty at view2 at the same time .

i think so  ;  The cause of the problem  ,i used  [ [EAU:edit]]  pattern  in both (view1 and view2). How can I solve?


and added entry  automatically other view


I need to use  [ [EAU:edit]]   because  my dataform is separate Participants mode. 

In reply to Çağlar MERSİNLİ

Re: Ynt: Re: unconnected views?

by Itamar Tzadok -

If I understand you correctly, you have two types of entries and you want to display entries of one type in one view and entries of the other type in the other view. If that's the case, you need add a field to store the entry type, two filters to filter the entries by type and assign the filters to their respective view.

If you allow the students to add the entries capturing the type is a bit trickier but still doable. You need a radiobutton field with one option for each type. Set the default content of each of these fields to the field's option. Then include each field in the respective type view. The way this works is such that when the student adds an entry, the new entry form opens with type field already set and since it is a radiobutton is cannot be unset, and so when the student saves the entry it saves the type.

I'm currently considering a more straightforward way to set entry types and restrict views to particular types. It will probably be included in a near future release.

hth smile

In reply to Itamar Tzadok

Ynt: Re: Ynt: Re: unconnected views?

by Çağlar MERSİNLİ -

hi Itamar;

yes you got it right. I did what you said and I managed. but i have another issue  smile

i want to show to student  incomplete assignment so i add new view (assignment_incomplete has filter )

footnote: I used the filter (view with radio button) for assignment_incomplete  did not work . but filter (view with checbox ) did work. Do I need to report to?

anyway;

i used   ##viewcontent:assignment_incomplete##  pattern in overview   view (another new view) . Everything okay up here . 

on the other hand i want to  number of entries in the  assignment  and assignment_incomplete  views . ( i plan to use charts and i need  number of entries  all assignment  and  incomplete assignment

i tried  put  some patterns in the assignment_incomplete  view;

##numentriestotal##  =  this pattern  give me all entries ( lesson (type1) and assignment (type2)  ) whereas  i want to number of entries in  the assignmet_incomplete view with unfiltered  ( all assignment  like  complete and incomplete assignmet) .

##numentriesdisplayed##  = this pattern  give me  number of entries in  the assignmet_incomplete  with filtered 

##numentriesfiltered##    =  this pattern  give me   number of entries in  the assignmet_incomplete  with filtered  ( this ,one of the things i want )  well;

which pattern can i use  for number of entries in  the assignmet_incomplete  with unfiltered  (all assignmet entires)?

i have to use pattern in the assignmet_incomplete view  because   i used   ##viewcontent:assignment_incomplete##  pattern in overview   view .  overview  is my default view. i plan to do overview like student dashboard



In reply to Çağlar MERSİNLİ

Re: Ynt: Re: Ynt: Re: unconnected views?

by Itamar Tzadok -

Create a filter for the assignment type entries. Create a hidden view, put in the view template only the ##numentriesfiltered##, and nothing in the entry template. This view will display the number of assignment entries. Use the viewcontent pattern to display this number in the overview. hth smile

In reply to Itamar Tzadok

Ynt: Re: Ynt: Re: Ynt: Re: unconnected views?

by Çağlar MERSİNLİ -

yes , very clever smile 

also ,

i need to use patterns in js code for generate charts 

how can i use   pattern like  ##numentriesfiltered##    in js code ?

I tried but did not work .

In reply to Çağlar MERSİNLİ

Re: Ynt: Re: Ynt: Re: Ynt: Re: unconnected views?

by Itamar Tzadok -

Put the pattern in an idenitified container element in the template, and design the js code to read the content of that element. hth smile

In reply to Itamar Tzadok

Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: unconnected views?

by Çağlar MERSİNLİ -

thanks for reply 

please, can you give me examples 

some part of my  js code


var data = google.visualization.arrayToDataTable([
          ['Task', 'Hours per Day'],
          ['Tüm ödevler', ???????????],
        ]);

how can i put ##numentriesfiltered##  pattern  in the question mark ?

best regards;

In reply to Çağlar MERSİNLİ

Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: unconnected views?

by Itamar Tzadok -

In the template:

<div id="my-assignment-num-entries">##numentriesfiltered##</div>

In the js code:

var numentries = document.getElementById('my-assignment-num-entries').innerHTML;
var data = google.visualization.arrayToDataTable([ ['Task', 'Hours per Day'], ['Tüm ödevler', numentries], ]);
hth smile

In reply to Itamar Tzadok

Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: unconnected views?

by Çağlar MERSİNLİ -

thank you for kindly reply;

<div id="my-assignment-num-entries">##numentriesfiltered##</div>    is worked

but

<div id="tum-odevler">##viewcontent:Assignment_1##</div>   is not work 

i see     ##viewcontent:Assignment_1##   has already div tag when i look source code


##viewcontent:## pattern   generate  <div  class=dataformview-tabular>    automatically . how can i fix this issue?

best regards ;


In reply to Çağlar MERSİNLİ

Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: unconnected views?

by Itamar Tzadok -

Instead of document.getElementById use document.querySelector. The selector in the image above can be '#tm-odevler div' or '#tm-odevler .dataformview-tablar.Assignment_1'. smile

In reply to Itamar Tzadok

Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: Ynt: Re: unconnected views?

by Çağlar MERSİNLİ -

Thank you so much  Itamar;

best Regards;